:root {
  --accent: #fc443d;
  --accent-deep: #e8342e;
  --ink: #23242a;
  --muted: #888b92;
  --line: #ededee;
  --page: #eef0f3;
  --card: #ffffff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang TC", "PingFang HK", sans-serif;
}

button, input, select { font: inherit; }
.customer-layout {
  display: grid;
  grid-template-columns: clamp(68px, 6.2vw, 88px) clamp(320px, 30vw, 410px) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  padding: clamp(6px, .7vw, 10px);
  gap: clamp(6px, .7vw, 10px);
}

.navigation-rail,
.cart-sidebar,
.checkout-stage {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(28, 32, 42, .07);
}

.navigation-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #292b31;
  color: #fff;
}
.logo-tile {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 70px;
  background: linear-gradient(180deg, #fff7f6 0%, #ffe3e1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 8px 18px rgba(252, 68, 61, .16);
}
.logo-tile img { width: 82%; height: 82%; object-fit: contain; }
.logo-tile span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 27px;
  font-weight: 900;
}
.rail-status {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 28px 0 46px;
  color: #fff;
}
.cloud-mark { font-size: 26px; opacity: .95; }
.rail-status i {
  position: absolute;
  right: 22%;
  bottom: 42px;
  width: 9px;
  height: 9px;
  border: 2px solid #292b31;
  border-radius: 50%;
  background: #38b96a;
}
.rail-banner-size {
  position: absolute;
  bottom: 12px;
  width: 100%;
  padding: 0 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}
.rail-banner-size span { display: block; line-height: 1.05; }
.rail-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 0 0 17px;
  color: #b8bbc2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}
.rail-footer time {
  display: grid;
  gap: 1px;
  width: 100%;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.12;
  text-align: center;
}
.rail-footer time span { display: block; white-space: nowrap; }
.rail-footer time .clock-seconds { font-size: 180%; font-weight: 900; line-height: .9; }

.cart-sidebar { display: grid; grid-template-rows: auto 1fr auto; }
.cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 53px;
  padding: 7px 12px;
  border-bottom: 1px solid #9e9e9e;
}
.cart-header h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 10px 0;
  color: #2d2d2d;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}
.cart-header h1 small { margin-left: 5px; color: var(--muted); font-size: 48%; font-weight: 800; letter-spacing: .12em; }
.item-count {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-top: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 40px;
}
.cart-body { position: relative; min-height: 0; overflow: hidden; }
.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 25px;
  color: var(--muted);
  text-align: center;
}
.empty-symbol {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #fff0ef;
  color: var(--accent);
  font-size: 27px;
}
.empty-state h2 { margin: 0; color: var(--ink); font-size: 22px; }
.empty-state p { margin: 7px 0 0; font-size: 13px; }
.empty-state h2 small,
.empty-state p small {
  display: block;
  margin-top: 3px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}
.item-list { height: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: #d9d9dc transparent; }
.item-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 60px;
  gap: 7px;
  align-items: start;
  min-height: 86px;
  padding: 10px 8px;
  border-bottom: 1px solid #e8e8e8;
}
.item-visual { display: flex; flex-direction: column; align-items: center; width: 54px; gap: 3px; }
.item-picture {
  position: relative;
  width: 50px;
  height: 50px;
  aspect-ratio: 1 / 1;
  margin-top: 1px;
  border-radius: 5px;
  background: #f0f1f3;
}
.item-picture img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.item-picture-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: #b8bac0;
  font-size: 28px;
}
.item-picture.has-image-error img { display: none; }
.item-picture.has-image-error .item-picture-fallback { display: grid; }
.stock-dot {
  position: absolute;
  z-index: 2;
  top: -3px;
  right: -5px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #11bd91;
}
.stock-dot.is-unavailable { background: #ff4848; }
.item-main { min-width: 0; padding-top: 1px; }
.item-title-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.sale-type, .special-tag {
  flex: 0 0 auto;
  padding: 3px 5px;
  border-radius: 3px;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}
.sale-type-0 { background: #50b6dd; }
.sale-type-1 { background: #ff5a5f; }
.sale-type-2 { background: #8e5bd9; }
.sale-type-3 { background: #f39c12; }
.sale-type-100 { background: #37a56b; }
.item-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.item-title-marquee-track {
  display: inline-flex;
  align-items: center;
  max-width: none;
  white-space: nowrap;
  will-change: transform;
}
.item-title-marquee-text,
.item-title-marquee-copy {
  flex: 0 0 auto;
  margin: 0;
  color: #000;
  font-size: 13.2px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.item-title-marquee-copy { padding-left: 28px; }
.item-title-marquee:not(.is-running) .item-title-marquee-copy { display: none; }
@keyframes cartTitleMarquee {
  0%, 18% { transform: translateX(0); }
  82%, 100% { transform: translateX(calc(-1 * var(--marquee-distance, 0px))); }
}
.item-sub {
  margin: 3px 0 0;
  overflow: hidden;
  color: #aaa;
  font-size: 8.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-price-line { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; white-space: nowrap; }
.item-price-line del { color: #999; font-size: 8px; }
.item-unit { color: #2d2d2d; font-size: 14px; font-weight: 700; line-height: 1; }
.item-unit.is-reduced { color: red; }
.item-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.item-meta-top { display: flex; align-items: center; justify-content: flex-end; gap: 4px; width: 100%; }
.special-tag { background: #ff4444; }
.item-qty {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 31px;
}
.item-amount { width: 100%; color: #2d2d2d; font-size: 16px; font-weight: 700; line-height: 1; text-align: right; }
.item-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  align-self: center;
  max-width: 54px;
  padding: 1px 6px;
  border: 1px solid #f39700;
  border-radius: 999px;
  color: #f39700;
  font-size: 8px;
  font-weight: 800;
  line-height: 13px;
  text-align: center;
  white-space: nowrap;
}
.cart-summary {
  display: grid;
  gap: 10px;
  padding: 13px clamp(15px, 1.5vw, 22px);
  border-top: 1px solid var(--line);
  background: #fff;
}
.cart-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cart-summary span { color: #111; font-size: 14.3px; font-weight: 500; }
.cart-summary span b { display: block; font: inherit; font-weight: 600; }
.cart-summary span small { display: block; margin-top: 1px; color: #91949b; font-size: 58%; font-weight: 800; letter-spacing: .08em; }
.cart-summary strong { color: #111; font-size: 18.2px; font-weight: 700; }
.discount-row strong { color: #111; }
.member-summary-row strong { color: var(--accent); }
.member-summary-label b { display: inline !important; }
.member-summary-label em {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  line-height: 15px;
  vertical-align: 1px;
}
.adjustment-summary-row strong { color: var(--accent); }
.points-summary-row strong { color: #f39700; }
.points-summary-row strong,
.member-info-line .member-balance,
.member-info-line .member-points {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.display-value-icon { display: block; flex: 0 0 auto; width: 1em; height: 1em; }
.display-value-icon .icon-body { fill: #34332e; }
.wallet-icon .icon-accent { fill: #078c2f; }
.points-icon .icon-accent { fill: #f39700; }
.member-value-icon { width: 1.05em; height: 1.05em; }
.summary-point-icon { width: 1.12em; height: 1.12em; }
.item-point-icon { width: 1em; height: 1em; }

.checkout-stage { position: relative; display: grid; grid-template-rows: 1fr auto; background: #f5f5f6; }
.banner-stage { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(circle at 50% 32%, #fff 0%, #f7f2f0 48%, #eee9e7 100%); }
.welcome-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 40px;
  text-align: center;
}
.welcome-logo {
  display: grid;
  place-items: center;
  width: clamp(118px, 14vw, 190px);
  height: clamp(118px, 14vw, 190px);
  margin-bottom: 20px;
}
.welcome-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 25px rgba(51, 42, 40, .13)); }
.welcome-logo span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 28%;
  background: var(--accent);
  color: #fff;
  font-size: clamp(50px, 6vw, 80px);
  font-weight: 900;
  box-shadow: 0 20px 48px rgba(252, 68, 61, .2);
}
.welcome-panel p { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .28em; }
.welcome-panel h2 { margin: 0; max-width: 720px; font-size: clamp(28px, 4.3vw, 66px); line-height: 1.05; letter-spacing: -.04em; }
.welcome-panel small { margin-top: 12px; color: #82848b; font-size: clamp(11px, 1.1vw, 16px); }
.banner-list, .banner-slide { position: absolute; inset: 0; }
.banner-slide { opacity: 0; transition: opacity .65s ease; }
.banner-slide.is-active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-slide::after { content: ""; position: absolute; inset: auto 0 0; height: 22%; background: linear-gradient(transparent, rgba(0, 0, 0, .14)); }
.banner-dots {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 15px;
  display: flex;
  gap: 6px;
}
.banner-dot { width: 7px; height: 7px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.banner-dot.is-active { width: 20px; border-radius: 999px; background: #fff; }

.checkout-footer { position: relative; z-index: 4; background: #fff; }
.member-strip {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(150px, .65fr);
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 10px clamp(16px, 2vw, 28px);
  border-top: 1px solid var(--line);
}
.member-copy, .payment-copy { min-width: 0; }
.payment-copy > span { display: block; margin-bottom: 3px; color: #96989f; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.payment-copy strong { overflow: hidden; display: block; font-size: clamp(13px, 1.25vw, 18px); text-overflow: ellipsis; white-space: nowrap; }
.payment-copy strong.is-default-payment {
  overflow: visible;
  line-height: 1.05;
  text-overflow: clip;
  white-space: normal;
}
.payment-copy strong.is-default-payment small {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 70%;
  font-weight: 800;
  letter-spacing: .04em;
}
.member-info-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: #202126;
  font-size: clamp(13px, 1.25vw, 18px);
  font-weight: 700;
  white-space: nowrap;
}
.member-info-line > * { flex: 0 0 auto; }
.member-info-line #memberName { font-weight: 800; }
.member-info-line .member-discount { font-weight: 800; }
.member-info-line .member-balance,
.member-info-line .member-points {
  padding-left: 8px;
  border-left: 2px solid currentColor;
}
.member-info-line .member-balance { color: #078c2f; }
.member-info-line .member-points { color: #f39700; }
.payment-copy { text-align: right; }
.payment-copy strong { color: #009688; }
.grand-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: clamp(52px, 5.88vw, 78px);
  padding: 6px clamp(20px, 2.5vw, 36px);
  background: linear-gradient(100deg, var(--accent-deep), var(--accent));
  color: #fff;
}
.grand-total-bar > span { font-size: clamp(13px, 1.25vw, 18px); font-weight: 800; letter-spacing: .08em; }
.grand-total-bar > span small { display: block; margin-top: 2px; font-size: 55%; letter-spacing: .12em; opacity: .82; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-value.is-negative { color: #8b0000 !important; }
.money .minor { font-size: 70%; }
.money-hero { font-size: clamp(26.46px, 4.032vw, 60.48px); font-weight: 900; line-height: .95; letter-spacing: -.045em; }

.member-prompt {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 36px;
  background: rgba(18, 20, 25, .48);
  backdrop-filter: blur(2px);
}
.member-prompt-card {
  width: min(86vw, 672px);
  min-height: min(48vh, 455px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4.2vh, 50px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
  text-align: center;
}
.member-prompt-icon {
  width: 105px;
  height: 105px;
  margin-bottom: 20px;
}
.member-prompt-icon img { width: 100%; height: 100%; object-fit: contain; }
.member-prompt-card h2 { margin: 0 0 14px; font-size: clamp(24px, 2.94vw, 41px); font-weight: 700; }
.member-prompt-message { color: #747b85; font-size: clamp(15px, 1.89vw, 27px); line-height: 1.55; }
.member-prompt-message strong { color: #6b39ca; font-weight: 600; }
.member-prompt-message small { display: block; margin-top: 7px; font-size: 75%; }
.member-signup-qr { width: 154px; height: 154px; margin: 12px auto; }
.member-signup-qr img, .member-signup-qr canvas { display: block; width: 154px !important; height: 154px !important; }
.member-prompt-form { width: min(476px, 86%); margin-top: 20px; }
.member-prompt-form input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 2px solid #cfd3d9;
  border-radius: 999px;
  outline: none;
  font-size: 16px;
  text-align: center;
}
.member-prompt-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(252, 68, 61, .12); }
.member-prompt-form button {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .customer-layout { grid-template-columns: 68px 300px minmax(0, 1fr); }
  .member-strip { grid-template-columns: 1fr; gap: 6px; }
  .payment-copy { text-align: left; }
  .member-info-line { font-size: 13px; }
}

@media (max-height: 620px) {
  .cart-header { min-height: 53px; padding-top: 7px; padding-bottom: 7px; }
  .cart-summary { padding-top: 8px; padding-bottom: 8px; }
  .item-row { min-height: 66px; padding-top: 10px; padding-bottom: 10px; }
  .member-strip { min-height: 54px; padding-top: 7px; padding-bottom: 7px; }
}
