:root {
  color-scheme: light;
  --ink: #18232d;
  --muted: #657580;
  --line: #dce5e8;
  --page: #eef2f4;
  --teal: #08766d;
  --red: #c44a4a;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font: 16px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button { font: inherit; }

.customer-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 51px;
  padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
  border-bottom: 1px solid #e2e9eb;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 2px 12px rgba(24, 35, 45, .035);
  backdrop-filter: blur(14px);
}
.customer-top-left { grid-column: 1; grid-row: 1; min-width: 0; }
.customer-brand {
  display: flex;
  grid-column: 2;
  align-items: baseline;
  gap: 7px;
  font-size: 16px;
  font-weight: 920;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.customer-brand span { color: #0f887d; font-size: 10px; letter-spacing: .13em; }
.customer-location {
  grid-column: 3;
  justify-self: end;
  min-width: 0;
  color: #597078;
  font-size: 11px;
  font-weight: 830;
  letter-spacing: .05em;
  white-space: nowrap;
}
.menu-back {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #dce5e7;
  border-radius: 8px;
  color: #176e60;
  background: #f2f8f6;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.menu-back:hover { background: #e5f2ed; }

.customer-content { width: min(1120px, 100%); margin: 0 auto; padding: 10px 15px 26px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.menu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e1e8ea;
  border-radius: 14px;
  color: inherit;
  text-align: left;
  background: #fff;
  box-shadow: 0 3px 10px rgba(19, 38, 45, .04);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.menu-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(19, 38, 45, .11); }
.menu-card-art {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
}
.menu-card-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}
.menu-card-copy {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 auto;
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
}
.menu-card-title { display: grid; min-width: 0; flex: 1 1 auto; gap: 2px; }
.menu-card h2 {
  min-width: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 850;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.menu-card-puff { color: var(--muted); font-size: 12px; line-height: 1.25; font-weight: 560; letter-spacing: .045em; }
.price-line {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--red);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.025em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Promotion plates float over product art. No badge node is created for a
   product without an active rule, so ordinary cards keep identical heights. */
.store-promotion, .detail-promotion {
  --promotion-corner: 8px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(100, 242, 255, .92);
  color: #f7fcff;
  background: linear-gradient(180deg, rgba(3, 8, 27, .62), rgba(8, 4, 23, .48));
  clip-path: polygon(var(--promotion-corner) 0, calc(100% - var(--promotion-corner)) 0, 100% var(--promotion-corner), 100% calc(100% - var(--promotion-corner)), calc(100% - var(--promotion-corner)) 100%, var(--promotion-corner) 100%, 0 calc(100% - var(--promotion-corner)), 0 var(--promotion-corner));
  box-shadow: inset 0 0 13px rgba(49, 81, 186, .2), 0 0 5px rgba(49, 231, 255, .22);
  font-weight: 900;
  line-height: 1;
}
.store-promotion::before, .detail-promotion::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(#65f1ff, #65f1ff) left 10px top 2px / 22px 1px no-repeat,
    linear-gradient(#ff43cb, #ff43cb) right 10px top 2px / 22px 1px no-repeat,
    linear-gradient(#ff43cb, #ff43cb) left 12px bottom 2px / 31px 1px no-repeat,
    linear-gradient(#65f1ff, #65f1ff) right 12px bottom 2px / 31px 1px no-repeat;
  pointer-events: none;
}
.store-promotion::after, .detail-promotion::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 3px;
  border: 1px solid rgba(255, 61, 198, .86);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  box-shadow: 0 0 3px rgba(255, 61, 198, .3), inset 0 0 4px rgba(61, 217, 255, .13);
  pointer-events: none;
}
.store-promotion {
  position: absolute;
  z-index: 2;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 50px;
  padding: 5px 5px 4px;
  pointer-events: none;
}
.promotion-tiers {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: repeat(var(--promotion-columns, 3), minmax(0, 1fr));
  align-items: stretch;
}
.promotion-tier {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px 0 1px;
}
.promotion-tier::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 4px;
  right: 4px;
  top: 15px;
  height: 23px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 20, 42, .46) 0%, rgba(255, 20, 42, .17) 45%, transparent 74%);
  pointer-events: none;
}
.promotion-tier + .promotion-tier::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  top: 5px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, #71f2ff 16%, #71f2ff 47%, #ff58d0 55%, #ff58d0 84%, transparent 100%);
  box-shadow: 0 0 2px rgba(84, 235, 255, .8);
  pointer-events: none;
}
.promotion-tier > b {
  color: #ffe765;
  font-size: 9.5px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .01em;
  white-space: nowrap;
}
.promotion-deal {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  color: #f7fcff;
  white-space: nowrap;
}
.promotion-amount-stack {
  position: relative;
  isolation: isolate;
  display: inline-block;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(14px, 4.65vw, 17.5px);
  line-height: .94;
  font-weight: 900;
  letter-spacing: -.055em;
}
.promotion-amount, .promotion-amount-edge {
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
}
.promotion-amount-edge {
  position: absolute;
  z-index: 0;
  inset: 0;
  color: #f3172d;
  -webkit-text-stroke: 1.7px #76000d;
  pointer-events: none;
}
.promotion-amount {
  position: relative;
  z-index: 1;
  display: inline-block;
  color: #f3172d;
  background: linear-gradient(180deg, #ff4d47 0%, #f31329 50%, #c80019 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .7px #fff2d4;
  paint-order: stroke fill;
  text-shadow: none;
  filter: none;
}
.promotion-tier:first-child .promotion-amount-stack { font-size: clamp(15px, 4.9vw, 18.5px); }
.promotion-deal em {
  color: #79f3ff;
  font-size: clamp(7.5px, 2.35vw, 9px);
  line-height: 1;
  font-style: normal;
  font-weight: 900;
  letter-spacing: -.015em;
}
.store-promotion.promotion-scoped { height: 54px; padding-top: 12px; }
.store-promotion .promotion-scope {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 50%;
  color: #bcf8ff;
  font-size: 7px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .09em;
  white-space: nowrap;
  transform: translateX(-50%);
}
.new-badge {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  border-radius: 999px;
  color: #fff;
  background: #dd5a37;
  box-shadow: 0 2px 7px rgba(182, 61, 31, .25);
  font-size: 9px;
  font-weight: 920;
  letter-spacing: .06em;
}
.pouch-category .menu-card-art img { padding: 12px; }

.detail-content { padding-top: 8px; }
.detail-panel { overflow: hidden; border: 1px solid #dce5e7; border-radius: 15px; background: #fff; }
.detail-hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: clamp(92px, 20vw, 170px);
  overflow: hidden;
  padding: clamp(12px, 3vw, 24px);
  color: #fff;
  background: #162d31;
}
.detail-hero.has-promotion { height: clamp(138px, 24vw, 188px); }
.detail-hero img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.image-loading { opacity: .7; }
.menu-card-art img,
.detail-hero img { transition: opacity .18s ease; }
.menu-card-art img.image-load-failed,
.detail-hero img.image-load-failed { opacity: 0; }
.detail-hero::after { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(8, 16, 22, .28), transparent 62%); }
.detail-hero-copy { position: relative; z-index: 1; max-width: 58%; }
.detail-hero.has-promotion .detail-hero-copy { width: 100%; max-width: 100%; }
.detail-hero h1 { margin: 0; font-size: clamp(18px, 5.3vw, 28px); line-height: 1.12; letter-spacing: -.025em; font-weight: 850; text-shadow: 0 2px 16px rgba(0, 0, 0, .25); }
.detail-hero-puff { display: block; margin-top: 5px; color: rgba(255, 255, 255, .72); font-size: clamp(10px, 2.8vw, 13px); line-height: 1.2; font-weight: 560; letter-spacing: .08em; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.detail-promotion { width: min(100%, 520px); min-height: 58px; max-width: 100%; margin-top: 10px; padding: 7px 10px; }
.detail-promotion.promotion-scoped { padding-top: 18px; }
.detail-promotion .promotion-scope {
  position: absolute;
  z-index: 2;
  top: 5px;
  left: 50%;
  color: #bcf8ff;
  font-size: 8px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .09em;
  white-space: nowrap;
  transform: translateX(-50%);
}
.detail-promotion .promotion-tier > b { font-size: 11px; }
.detail-promotion .promotion-amount-stack { font-size: 24px; }
.detail-promotion .promotion-tier:first-child .promotion-amount-stack { font-size: 25px; }
.detail-promotion .promotion-deal em { font-size: 11px; }
.detail-body { padding: 12px; }
.variant-card { margin-top: 10px; overflow: hidden; border: 1px solid #dce5e7; border-radius: 12px; background: #fff; }
.variant-card:first-child { margin-top: 0; }
.variant-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; color: #fff; background: #0b796f; }
.variant-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 18px; line-height: 1.3; }
.variant-price {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  max-width: 58%;
  margin-left: auto;
  gap: 2px 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--red);
  background: #fff;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.variant-price span { white-space: nowrap; }
.variant-head .detail-promotion {
  flex: 1 0 100%;
  margin-top: 0;
  box-shadow: none;
}
.variant-device-media {
  position: relative;
  isolation: isolate;
  display: grid;
  height: 92px;
  margin: 10px 12px 0;
  overflow: hidden;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(24, 111, 104, .18);
  background:
    radial-gradient(circle at 78% 24%, rgba(55, 192, 178, .22), transparent 33%),
    linear-gradient(135deg, #f7fbfa 0%, #e3f1ef 48%, #f9fbfb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 4px 14px rgba(25, 72, 69, .08);
}
.variant-device-media::before {
  position: absolute;
  z-index: 0;
  width: 145%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent 0%, rgba(18, 139, 128, .24) 30%, rgba(18, 139, 128, .24) 70%, transparent 100%);
  transform: rotate(-8deg);
}
.variant-device-media img {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.variant-device-media.is-horizontal img {
  transform: rotate(90deg) scale(2.45);
}
.variant-device-media.is-catalog {
  display: block;
  height: auto;
  margin: 10px;
  overflow: hidden;
  border: 1px solid rgba(24, 35, 45, .14);
  border-radius: 10px;
  background: #090511;
  box-shadow: 0 5px 18px rgba(13, 15, 27, .14);
}
.variant-device-media.is-catalog::before { content: none; }
.variant-device-media.is-catalog > .variant-catalog-source {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: none;
}
.variant-device-media.is-failed { display: none; }
.variant-price.is-media-embedded,
.status-groups.is-media-replaced {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@media (max-width: 699px) {
  .variant-device-media.is-catalog { height: auto; margin: 8px; }
  .variant-device-media.is-catalog-portrait > .variant-catalog-source {
    max-height: 72dvh;
  }
  .variant-device-media.is-catalog-wide {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-color: rgba(255, 255, 255, .46) rgba(255, 255, 255, .1);
    scrollbar-width: thin;
  }
  .variant-device-media.is-catalog-wide > .variant-catalog-source {
    width: 720px;
    max-width: none;
    height: 300px;
    flex: 0 0 720px;
    margin-left: -135px;
  }
  .variant-device-media.is-catalog-wide::after {
    position: sticky;
    right: 7px;
    z-index: 2;
    align-self: center;
    flex: 0 0 auto;
    margin-left: -70px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 999px;
    color: #fff;
    background: rgba(7, 8, 18, .78);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .24);
    content: "SWIPE →";
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    pointer-events: none;
  }
}
.price-mixed, .price-missing { color: #8b3030; font-size: 12px; letter-spacing: 0; }
.status-groups { padding: 10px 0; }
.stock-group + .stock-group { margin-top: 22px; }
.stock-heading { margin: 0 10px 4px; padding: 9px 12px; border-radius: 6px; font-size: 14px; line-height: 1.3; font-weight: 850; }
.stock-group.available .stock-heading { color: #176b40; background: #e3f3e9; border-left: 4px solid #329464; }
.stock-group.preorder .stock-heading { color: #956210; background: #fff2d6; border-left: 4px solid #d59a33; }
.stock-group.out_of_stock .stock-heading { color: #66727a; background: #edf0f2; border-left: 4px solid #9aa6ad; }
.flavour-list { display: grid; grid-template-columns: minmax(0, 1fr); padding: 4px 12px 8px; }
.flavour-row {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1f2;
  color: #273840;
}
.flavour-row:last-child { border-bottom: 0; }
.flavour-mark { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #45a08e; font-size: 12px; font-weight: 900; }
.flavour-row.preorder .flavour-mark { background: #d4972c; }
.flavour-row.out_of_stock .flavour-mark { background: #b9c1c5; }
.flavour-name {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  color: #187347;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 740;
  overflow-wrap: anywhere;
}
.flavour-label-en { order: 1; }
.flavour-label-zh { order: 2; color: #79898f; font-size: 16px; font-weight: 520; text-decoration: none; }
.hot-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: #df5a2d;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .05em;
}
.flavour-row.preorder .flavour-name { color: #935f08; }
.flavour-row.out_of_stock .flavour-name { color: #98a3a9; text-decoration: line-through; text-decoration-thickness: 1px; }
.flavour-price { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 1px; color: var(--red); font-size: 18px; font-weight: 820; font-variant-numeric: tabular-nums; }
.flavour-row.price-exception { grid-column: 1 / -1; }
.relx-detail .flavour-list { grid-template-columns: 1fr; padding: 4px 14px 8px; }
.relx-detail .flavour-row { min-height: 58px; padding-block: 8px; gap: 10px; }
.relx-detail .flavour-name { font-size: 19px; }
.relx-detail .flavour-label-zh { font-size: 16px; }
.relx-detail .flavour-mark { width: 20px; height: 20px; font-size: 12px; }

.loading { padding: 64px 24px; color: var(--muted); text-align: center; font-weight: 700; }
.loading button { margin-left: 5px; padding: 6px 9px; border: 1px solid #c8d4d8; border-radius: 7px; color: #176e60; background: #fff; cursor: pointer; }

@media (max-width: 380px) {
  .customer-top { min-height: 48px; padding-block: 6px; }
  .customer-brand { font-size: 14px; }
  .customer-location { font-size: 9px; }
  .menu-back { min-height: 32px; padding-inline: 7px; font-size: 12px; }
  .customer-content { padding: 6px 8px 18px; }
  .menu-grid { gap: 8px; }
  .menu-card { border-radius: 11px; }
  .menu-card-copy { padding: 8px; }
  .menu-card h2 { font-size: 13px; }
  .menu-card-puff { font-size: 10px; }
  .price-line { font-size: 18px; }
  .detail-body { padding: 6px; }
  .detail-panel { border-radius: 11px; }
  .variant-head { padding: 10px; gap: 6px; }
  .variant-head h2 { font-size: 16px; }
  .variant-price { max-width: 58%; min-height: 38px; padding: 4px 7px; font-size: 18px; }
  .variant-device-media { height: 84px; margin: 8px 8px 0; }
  .stock-heading { margin-inline: 6px; padding: 7px 9px; }
  .flavour-list { padding-inline: 8px; }
  .flavour-name { font-size: 17px; }
  .flavour-label-zh { font-size: 15px; }
  .flavour-price { font-size: 17px; }
  .hot-badge { padding: 3px 6px; font-size: 10px; }
  .store-promotion { left: 3px; right: 3px; bottom: 3px; height: 46px; padding: 4px 3px 3px; }
  .store-promotion.promotion-scoped { height: 51px; padding-top: 11px; }
  .promotion-tier > b { font-size: 8px; }
  .store-promotion .promotion-amount-stack { font-size: 13.2px; }
  .store-promotion .promotion-tier:first-child .promotion-amount-stack { font-size: 14.2px; }
  .store-promotion .promotion-deal em { font-size: 7.2px; letter-spacing: -.08em; }
}

@media (min-width: 700px) {
  .customer-content { padding: 16px 22px 38px; }
  .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .flavour-list { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); column-gap: 26px; }
  .menu-card h2 { font-size: 16px; }
  .price-line { font-size: 22px; }
}

@media (min-width: 1050px) {
  .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flavour-list { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
