:root {
  --bg: #FBF6EE;
  --bg-deep: #F3EADD;
  --card: #FFFDF9;
  --ink: #2E1D16;
  --ink-soft: #4D382D;
  --muted: #927E70;
  --muted-light: #B6A496;
  --line: rgba(67, 44, 31, 0.09);
  --line-strong: rgba(67, 44, 31, 0.16);
  --brand: #B96F48;
  --brand-deep: #7D452B;
  --brand-soft: #F3DFCD;
  --cream: #FFF6E9;
  --accent: #E9B583;
  --accent-soft: #F6DCC3;
  --sage: #C9D8BE;
  --danger: #B9563D;
  --shadow-card: 0 12px 30px -22px rgba(59, 35, 22, 0.45);
  --shadow-float: 0 20px 45px -18px rgba(44, 27, 18, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg-deep);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 600px at 15% -10%, #FFFDF9 0%, transparent 60%),
    radial-gradient(900px 700px at 100% 10%, #F4E6D5 0%, transparent 55%),
    var(--bg-deep);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

body.is-locked {
  overflow: hidden;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

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

svg {
  display: block;
}

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

[hidden] {
  display: none !important;
}

.app-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: clip;
}

.views {
  position: relative;
}

.view.is-active {
  animation: view-in 0.45s var(--ease-out) both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.page {
  padding: 0 18px calc(112px + var(--safe-bottom));
}

.page-menu {
  padding-bottom: calc(130px + var(--safe-bottom));
}

body.has-cart .page-menu {
  padding-bottom: calc(218px + var(--safe-bottom));
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--brand);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.2;
}

.eyebrow-light {
  color: rgba(255, 241, 225, 0.55);
}

/* ============ 顶部 ============ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 18px 12px;
  background: rgba(251, 246, 238, 0.86);
  border-bottom: 1px solid rgba(67, 44, 31, 0.055);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  backdrop-filter: blur(20px) saturate(1.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #493025, #291811);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 7px 14px -8px rgba(43, 26, 17, 0.6);
  color: #F5DFC6;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
  text-indent: -1px;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.brand-name span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #F2E5D5;
  color: #8A644B;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.store-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.2;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6A9A62;
  box-shadow: 0 0 0 3px rgba(106, 154, 98, 0.12);
}

.bean-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  padding: 0 11px 0 7px;
  border: 1px solid rgba(127, 88, 58, 0.1);
  border-radius: 999px;
  background: #F1E5D5;
  color: #684835;
  transition: transform 0.18s ease, background 0.18s ease;
}

.bean-pill:active {
  transform: scale(0.96);
  background: #EADACA;
}

.bean-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: #D7E4C8;
  color: #4E6E40;
}

.bean-icon svg {
  width: 14px;
  height: 14px;
}

.bean-value {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bean-pill small {
  color: #927B68;
  font-size: 8px;
}

/* ============ Hero ============ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 404px;
  margin-top: 8px;
  padding: 25px 21px 18px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(130% 90% at 88% 0%, rgba(143, 87, 54, 0.4) 0%, transparent 56%),
    linear-gradient(148deg, #3D281E 0%, #2B1912 58%, #21130E 100%);
  box-shadow: 0 24px 48px -28px rgba(48, 28, 18, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--cream);
  isolation: isolate;
}

.hero-grain {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: radial-gradient(rgba(255, 244, 228, 0.12) 0.6px, transparent 0.8px);
  background-size: 5px 5px;
  opacity: 0.24;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 82%);
  mask-image: linear-gradient(180deg, #000, transparent 82%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 67%;
}

.hero h1 {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: clamp(32px, 8.7vw, 40px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.17;
  text-wrap: balance;
}

.hero h1 em {
  color: #EDBD93;
  font-style: normal;
}

.hero-sub {
  margin-top: 14px;
  color: rgba(255, 243, 229, 0.62);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 19px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 43px;
  padding: 0 16px;
  border-radius: 999px;
  background: #F8E9D7;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.55);
  color: #3C261B;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background 0.18s ease;
}

.hero-cta svg {
  width: 16px;
  height: 16px;
}

.hero-cta:active {
  transform: scale(0.96);
  background: #FFF4E5;
}

.hero-note {
  color: rgba(255, 242, 226, 0.38);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.55;
}

.hero-art {
  position: absolute;
  z-index: 2;
  top: 62px;
  right: -7px;
  width: 196px;
  height: 280px;
  pointer-events: none;
}

.hero-halo {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 179, 133, 0.32) 0%, rgba(206, 139, 94, 0.11) 48%, transparent 70%);
  transform: translateX(-50%);
  filter: blur(2px);
}

.hero-cup {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 172px;
  transform: translateX(-50%) rotate(3deg);
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.38));
  animation: cup-float 6.5s ease-in-out infinite;
}

.hero-cup .cup-svg {
  width: 100%;
  height: auto;
}

@keyframes cup-float {
  0%, 100% { transform: translateX(-50%) rotate(3deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(1.5deg) translateY(-7px); }
}

.hero-sticker {
  position: absolute;
  top: 9px;
  right: 19px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px dashed rgba(65, 38, 23, 0.42);
  border-radius: 50%;
  background: #E8B27E;
  box-shadow: 0 8px 18px -9px rgba(0, 0, 0, 0.5);
  color: #402618;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  transform: rotate(9deg);
}

.hero-sticker b {
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #F4D3B2;
  box-shadow: 0 0 12px 3px rgba(244, 211, 178, 0.28);
}

.spark-a { top: 83px; left: 13px; }
.spark-b { top: 198px; right: 8px; width: 3px; height: 3px; }
.spark-c { top: 264px; left: 33px; width: 2.5px; height: 2.5px; opacity: 0.7; }

.hero-stats {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 243, 229, 0.11);
}

.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats strong {
  color: #F9E9D7;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-stats strong small {
  margin-left: 1px;
  color: rgba(249, 233, 215, 0.46);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-stats span {
  color: rgba(255, 240, 223, 0.38);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

/* ============ 菜单 ============ */

.menu-section {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.section-heading-small {
  align-items: center;
  margin: 28px 0 12px;
}

.section-heading-small h2 {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.menu-count {
  padding-bottom: 3px;
  color: var(--muted-light);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chips {
  display: flex;
  gap: 8px;
  margin: 17px -18px 14px;
  padding: 0 18px 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

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

.chip {
  flex: 0 0 auto;
  height: 35px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.8);
  color: #8A7567;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, transform 0.18s ease, border-color 0.2s ease;
}

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

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 7px 14px -9px rgba(46, 29, 22, 0.65);
  color: #FFF4E6;
  font-weight: 600;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.product-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 137px;
  padding: 15px 12px 15px 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s ease;
  animation: card-rise 0.55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.product-card:active {
  transform: scale(0.982);
  box-shadow: 0 4px 14px -12px rgba(59, 35, 22, 0.5);
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-info {
  flex: 1;
  min-width: 0;
  padding-right: 2px;
}

.product-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 17px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 7px;
  border-radius: 999px;
  background: #F4EADC;
  color: #96704F;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag-hot {
  background: #F9E2D3;
  color: #B25E37;
}

.tag-new {
  background: #E7EFE0;
  color: #5F7E51;
}

.product-info h3 {
  margin: 6px 0 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-desc {
  display: -webkit-box;
  min-height: 31px;
  overflow: hidden;
  color: #988477;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 8px;
}

.price {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price small {
  margin-right: 1px;
  font-size: 10px;
  font-weight: 600;
}

.price-note {
  margin-left: 4px;
  color: var(--muted-light);
  font-family: var(--font);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
}

.add-btn {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: -2px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 6px 12px -6px rgba(46, 29, 22, 0.55);
  color: #FFF3E4;
  transition: transform 0.18s var(--ease-out), background 0.18s ease;
}

.add-btn svg {
  width: 14px;
  height: 14px;
}

.product-card:active .add-btn {
  transform: scale(0.92);
  background: var(--brand-deep);
}

.product-art {
  position: relative;
  display: grid;
  flex: 0 0 100px;
  width: 100px;
  height: 121px;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(155deg, var(--tint2, #F6E9DA), var(--tint, #EFD5C1));
  isolation: isolate;
}

.product-art::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -46%);
  filter: blur(1px);
}

.product-art::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 40%);
  pointer-events: none;
}

.product-art .cup-svg {
  position: relative;
  z-index: 1;
  width: 86px;
  height: auto;
  filter: drop-shadow(0 9px 8px rgba(86, 50, 28, 0.16));
}

.cup-cal {
  position: absolute;
  z-index: 3;
  bottom: 6px;
  left: 50%;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.55);
  color: rgba(73, 49, 34, 0.58);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.menu-footnote {
  margin: 24px 0 0;
  color: #B4A294;
  font-size: 9px;
  letter-spacing: 0.02em;
  line-height: 1.7;
  text-align: center;
}

.menu-footnote span {
  margin: 0 4px;
  opacity: 0.55;
}

/* ============ 购物袋浮条 ============ */

.cart-bar {
  position: fixed;
  z-index: 36;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 28px);
  max-width: 492px;
  height: 62px;
  padding: 0 8px 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(145deg, #362219, #261610);
  box-shadow: 0 18px 34px -14px rgba(41, 24, 15, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--cream);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(22px);
  transition: transform 0.4s var(--ease-out), opacity 0.25s ease, visibility 0.25s;
  visibility: hidden;
}

.cart-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

.cart-icon-wrap {
  position: relative;
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 243, 229, 0.09);
}

.cart-icon-wrap > svg {
  width: 23px;
  height: 23px;
  color: #F0D4B8;
}

.cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid #2E1C14;
  border-radius: 999px;
  background: #E2A06C;
  color: #2C1B13;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
}

.cart-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
  text-align: left;
}

.cart-price {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cart-hint {
  overflow: hidden;
  color: rgba(255, 241, 225, 0.48);
  font-size: 9px;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-checkout {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: #F3DEC6;
  color: #382218;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.cart-checkout svg {
  width: 15px;
  height: 15px;
}

/* ============ 标签栏 ============ */

.tabbar {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 520px;
  padding: 7px 28px calc(8px + var(--safe-bottom));
  border-top: 1px solid rgba(67, 44, 31, 0.07);
  background: rgba(255, 253, 249, 0.92);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  transform: translateX(-50%);
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  padding: 3px 0 1px;
  color: #A38F80;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.tab-icon {
  position: relative;
  display: grid;
  width: 38px;
  height: 27px;
  place-items: center;
  border-radius: 10px;
  transition: background 0.22s ease, transform 0.22s var(--ease-out);
}

.tab-icon svg {
  width: 23px;
  height: 23px;
}

.tab.is-active {
  color: var(--ink);
  font-weight: 650;
}

.tab.is-active .tab-icon {
  background: #F1E4D4;
  transform: translateY(-1px);
}

.tab.is-active .tab-icon svg {
  color: var(--brand-deep);
}

.tab-badge {
  position: absolute;
  top: -1px;
  right: 2px;
  display: grid;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  place-items: center;
  border: 1.5px solid #FFFDF9;
  border-radius: 999px;
  background: #C46643;
  color: #FFF8EF;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}

/* ============ 订单页 ============ */

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: calc(24px + var(--safe-top)) 20px 0;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.order-total {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 4px;
  padding: 9px 13px;
  border: 1px solid rgba(122, 88, 62, 0.08);
  border-radius: 15px;
  background: #F3E8D9;
  color: #7C5A43;
}

.order-total strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.order-total span {
  font-size: 8.5px;
}

.page-orders {
  padding-top: 20px;
}

.active-order {
  position: relative;
  padding: 21px 20px 18px;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(100% 90% at 100% 0%, rgba(167, 105, 65, 0.38), transparent 55%),
    linear-gradient(145deg, #3A251B, #25150F);
  box-shadow: 0 22px 40px -25px rgba(46, 27, 17, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: var(--cream);
}

.active-order::after {
  content: "";
  position: absolute;
  top: -58px;
  right: -48px;
  width: 148px;
  height: 148px;
  border: 1px solid rgba(243, 208, 174, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.order-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.order-status-label {
  margin-top: 3px;
  color: #F9EAD8;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.order-eta {
  margin-top: 5px;
  color: rgba(255, 241, 225, 0.52);
  font-size: 9.5px;
  line-height: 1.5;
}

.pickup-code {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-direction: column;
  gap: 1px;
  min-width: 68px;
  padding: 8px 9px 7px;
  border: 1px dashed rgba(247, 218, 187, 0.3);
  border-radius: 15px;
  background: rgba(255, 245, 232, 0.07);
}

.pickup-code span {
  color: rgba(255, 241, 225, 0.5);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.pickup-code strong {
  color: #F4CFA7;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.order-progress {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 242, 226, 0.13);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #D9A171, #F2CEAA);
  box-shadow: 0 0 12px rgba(242, 206, 170, 0.35);
  transition: width 0.9s var(--ease-out);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: rgba(255, 241, 225, 0.3);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.progress-labels span.is-done {
  color: rgba(255, 241, 225, 0.72);
}

.progress-labels span.is-current {
  color: #F2C89E;
  font-weight: 650;
}

.order-items-preview {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 242, 226, 0.1);
  color: rgba(255, 241, 225, 0.68);
  font-size: 9.5px;
  line-height: 1.6;
}

.order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: rgba(255, 241, 225, 0.32);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.order-meta strong {
  color: rgba(255, 241, 225, 0.7);
  font-size: 11px;
  font-weight: 650;
}

.active-empty {
  padding: 16px 18px;
  border: 1px dashed rgba(126, 94, 70, 0.16);
  border-radius: 18px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

.order-history {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.history-card {
  padding: 14px 15px 13px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 19px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.done-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #E7EFE1;
  color: #5D7C50;
  font-size: 8px;
  font-weight: 600;
}

.done-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7BA06A;
}

.history-time {
  color: var(--muted-light);
  font-size: 8.5px;
}

.history-names {
  margin-top: 8px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-names small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.history-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted-light);
  font-size: 8px;
}

.history-bottom strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.order-empty {
  padding: 36px 24px 32px;
  border: 1px dashed rgba(126, 94, 70, 0.16);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.46);
  text-align: center;
}

.order-empty-art {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: #F2E6D7;
  color: #B08E74;
}

.order-empty-art svg {
  width: 38px;
  height: 38px;
}

.order-empty h3 {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.order-empty p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.ghost-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 37px;
  margin-top: 14px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #FFFDF9;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
}

/* ============ 我的 ============ */

.profile-header {
  padding-bottom: 1px;
}

.profile-header h1 {
  font-size: 31px;
  line-height: 1.2;
}

.avatar-lg {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  margin-bottom: 2px;
  place-items: center;
  border: 2px solid #FFFDF9;
  border-radius: 50%;
  background: linear-gradient(145deg, #EBD8C2, #D9B99D);
  box-shadow: 0 10px 20px -14px rgba(76, 46, 27, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #5B3A28;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.08em;
  text-indent: -1px;
}

.page-profile {
  padding-top: 22px;
}

.member-card {
  position: relative;
  min-height: 208px;
  padding: 20px 21px 18px;
  overflow: hidden;
  border-radius: 27px;
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(180, 118, 72, 0.42), transparent 55%),
    linear-gradient(140deg, #3C271C, #25150F);
  box-shadow: 0 24px 42px -26px rgba(44, 26, 16, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #F8E7D4;
}

.member-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 244, 228, 0.12) 0.6px, transparent 0.8px);
  background-size: 5px 5px;
  opacity: 0.2;
  pointer-events: none;
}

.member-card::after {
  content: "";
  position: absolute;
  top: -78px;
  right: -58px;
  width: 194px;
  height: 194px;
  border: 1px solid rgba(242, 207, 173, 0.16);
  border-radius: 50%;
}

.member-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 240, 224, 0.48);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
}

.member-level {
  padding: 3px 8px;
  border: 1px solid rgba(244, 211, 179, 0.22);
  border-radius: 999px;
  color: #EBC8A4;
  font-size: 8px;
  letter-spacing: 0.05em;
}

.member-slogan {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  color: #F9E9D6;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.32;
}

.member-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.bean-total {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.bean-total strong {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.bean-total span {
  color: rgba(255, 240, 224, 0.48);
  font-size: 8px;
}

.member-next {
  color: rgba(255, 240, 224, 0.43);
  font-size: 8.5px;
  line-height: 1.4;
}

.member-progress {
  position: relative;
  z-index: 1;
  height: 4px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 243, 229, 0.12);
}

.member-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #D7A173, #F1CBA5);
  transition: width 0.7s var(--ease-out);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 13px 0 0;
  padding: 15px 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.stats-grid div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--line);
}

.stats-grid div:last-child {
  border-right: 0;
}

.stats-grid strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.stats-grid span {
  color: var(--muted);
  font-size: 8.5px;
}

.badge-section {
  margin-top: 2px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.badge {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  padding: 12px 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 8px 20px -18px rgba(59, 35, 22, 0.4);
  text-align: center;
}

.badge-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #F5E9DA;
  font-size: 17px;
  line-height: 1;
}

.badge-name {
  color: var(--ink-soft);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.badge.is-locked {
  opacity: 0.44;
  box-shadow: none;
}

.badge.is-locked .badge-icon {
  filter: grayscale(1);
}

.install-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 19px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 19px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-align: left;
  transition: transform 0.18s ease;
}

.install-row:active {
  transform: scale(0.985);
}

.install-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: #F1E5D6;
  color: #7F5A41;
}

.install-icon svg {
  width: 21px;
  height: 21px;
}

.install-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.install-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.install-copy small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.chevron {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #B9A696;
}

.settings-card {
  margin-top: 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 19px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 51px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row:active {
  background: #FBF5EC;
}

.settings-row.is-armed {
  background: #FDF1EC;
}

.settings-row.is-armed .settings-value {
  color: var(--danger);
  font-weight: 650;
}

.settings-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
}

.settings-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #F5EBDF;
  color: #8B684E;
}

.settings-icon svg {
  width: 15px;
  height: 15px;
}

.settings-value {
  color: var(--muted-light);
  font-size: 9px;
  white-space: nowrap;
}

.settings-row-static {
  cursor: default;
}

.privacy-note {
  margin: 22px 0 0;
  color: #B3A193;
  font-size: 9px;
  line-height: 1.8;
  text-align: center;
}

.version-line {
  margin: 16px 0 0;
  color: #C3B4A7;
  font-size: 7.5px;
  letter-spacing: 0.17em;
  text-align: center;
}

/* ============ 遮罩与弹层 ============ */

.scrim {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(36, 22, 15, 0.44);
  opacity: 0;
  transition: opacity 0.32s ease;
  -webkit-backdrop-filter: blur(2.5px);
  backdrop-filter: blur(2.5px);
}

.scrim.is-open {
  opacity: 1;
}

.sheet {
  position: fixed;
  z-index: 70;
  bottom: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: min(92dvh, 900px);
  border-radius: 30px 30px 0 0;
  background: #FFFCF8;
  box-shadow: 0 -24px 70px rgba(40, 24, 15, 0.25);
  transform: translate(-50%, 104%);
  transition: transform 0.48s var(--ease-out);
}

.sheet.is-open {
  transform: translate(-50%, 0);
}

.sheet:focus {
  outline: none;
}

.success-card:focus {
  outline: none;
}

.sheet-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: #E2D3C4;
  transform: translateX(-50%);
}

.sheet-close {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #F2E8DC;
  color: #7B6251;
  transition: background 0.18s ease, transform 0.18s ease;
}

.sheet-close:active {
  transform: scale(0.92);
  background: #EADCCB;
}

.sheet-close svg {
  width: 15px;
  height: 15px;
}

.sheet-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 12px;
  padding: 24px 68px 0 22px;
}

.sheet-head h2 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.sheet-body {
  flex: 1;
  padding: 17px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  padding: 12px 22px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.text-btn {
  padding: 5px 2px;
  color: #A58D7B;
  font-size: 10px;
}

.text-btn:active {
  color: var(--danger);
}

.secure-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 2px;
  color: #8AA07B;
  font-size: 8px;
}

.secure-tag svg {
  width: 12px;
  height: 12px;
}

/* ============ 商品定制 ============ */

.product-sheet-hero {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 14px;
  border-radius: 23px;
  background: linear-gradient(150deg, #F8EFE4, #F4E4D4);
}

.sheet-cup-stage {
  position: relative;
  display: grid;
  flex: 0 0 119px;
  width: 119px;
  height: 148px;
  place-items: center;
  border-radius: 19px;
  background: rgba(255, 253, 248, 0.48);
  isolation: isolate;
}

.sheet-cup-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  transform: translate(-50%, -45%);
}

.sheet-cup-stage .cup-svg {
  position: relative;
  z-index: 1;
  width: 106px;
  height: auto;
  filter: drop-shadow(0 10px 9px rgba(91, 56, 34, 0.15));
}

.product-sheet-intro {
  flex: 1;
  min-width: 0;
}

.product-sheet-intro .eyebrow {
  margin-bottom: 5px;
  font-size: 8px;
}

.product-sheet-intro h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.product-sheet-desc {
  margin-top: 6px;
  color: #947D6D;
  font-size: 9.5px;
  line-height: 1.6;
}

.product-sheet-base {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 9px;
}

.product-sheet-base strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.product-sheet-base strong small {
  margin-right: 1px;
  font-size: 10px;
}

.product-sheet-base span {
  color: var(--muted-light);
  font-size: 8.5px;
}

.option-group {
  margin-top: 21px;
}

.option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.option-label h3 {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.option-label span {
  color: var(--muted-light);
  font-size: 8px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.segmented.seg-4 {
  grid-template-columns: repeat(4, 1fr);
}

.segmented.seg-5 {
  grid-template-columns: repeat(5, 1fr);
}

.seg-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  height: 42px;
  padding: 0 4px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: #F4ECE2;
  color: #826D5D;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}

.seg-btn em {
  color: #AA9483;
  font-size: 7px;
  font-style: normal;
  font-weight: 400;
}

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

.seg-btn.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 7px 14px -9px rgba(46, 29, 22, 0.55);
  color: #FFF5E8;
}

.seg-btn.is-selected em {
  color: rgba(255, 245, 232, 0.5);
}

.topping-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.topping-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 48px;
  padding: 0 12px;
  border: 1.5px solid transparent;
  border-radius: 13px;
  background: #F6EEE5;
  color: var(--ink-soft);
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}

.topping-btn:active {
  transform: scale(0.98);
}

.topping-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.topping-dot {
  display: grid;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1.3px solid #D7C4B2;
  border-radius: 50%;
  background: #FFFDF9;
  color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.topping-dot svg {
  width: 10px;
  height: 10px;
}

.topping-name {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topping-price {
  color: #A58D7A;
  font-size: 8.5px;
  white-space: nowrap;
}

.topping-btn.is-selected {
  border-color: rgba(185, 111, 72, 0.48);
  background: #FBEEE1;
}

.topping-btn.is-selected .topping-dot {
  border-color: var(--brand);
  background: var(--brand);
  color: #FFF8EF;
}

.topping-btn.is-selected .topping-price {
  color: var(--brand-deep);
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.qty-label {
  font-size: 12.5px;
  font-weight: 650;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stepper button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #F6EEE4;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease;
}

.stepper button:active {
  transform: scale(0.9);
  background: #EDE1D3;
}

.stepper button:disabled {
  opacity: 0.34;
  pointer-events: none;
}

.stepper-value {
  min-width: 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.selection-summary {
  margin-top: 15px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #F8F2E9;
  color: #9C8573;
  font-size: 8.5px;
  line-height: 1.55;
}

.footer-total {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}

.footer-total span {
  color: var(--muted);
  font-size: 8px;
}

.footer-total strong {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
}

.footer-total strong small {
  margin-right: 1px;
  font-size: 11px;
}

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px;
  width: 100%;
  height: 50px;
  padding: 0 18px;
  border-radius: 15px;
  background: var(--ink);
  box-shadow: 0 12px 22px -14px rgba(46, 29, 22, 0.7);
  color: #FFF4E6;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform 0.18s var(--ease-out), background 0.18s ease;
}

.primary-btn:active {
  transform: scale(0.982);
  background: #1F120D;
}

.primary-btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.primary-btn svg {
  width: 16px;
  height: 16px;
}

/* ============ 购物袋 ============ */

.cart-item {
  display: flex;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line-strong);
}

.cart-item:first-child {
  padding-top: 2px;
}

.cart-thumb {
  display: grid;
  flex: 0 0 59px;
  width: 59px;
  height: 74px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(150deg, var(--tint2, #F5E8D8), var(--tint, #EDD2BB));
}

.cart-thumb .cup-svg {
  width: 46px;
  height: auto;
  filter: drop-shadow(0 5px 4px rgba(85, 50, 28, 0.13));
}

.cart-item-main {
  flex: 1;
  min-width: 0;
}

.cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cart-item-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-price {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cart-item-options {
  margin-top: 3px;
  overflow: hidden;
  color: #A28B79;
  font-size: 8.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.mini-stepper {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mini-stepper button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: #F3E9DC;
  color: #6E5340;
  font-size: 13px;
  line-height: 1;
}

.mini-stepper button:active {
  background: #EADBC9;
}

.mini-stepper span {
  min-width: 10px;
  font-size: 10.5px;
  font-weight: 650;
  text-align: center;
}

.remove-btn {
  color: #B09A89;
  font-size: 8.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cart-summary {
  margin-top: 14px;
  padding: 14px 14px 13px;
  border-radius: 16px;
  background: #F8F1E7;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  color: #907A6A;
  font-size: 9.5px;
}

.summary-row strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.summary-row .is-discount {
  color: #6F8D5E;
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
}

.summary-total strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.summary-total strong small {
  margin-right: 1px;
  font-size: 10px;
}

.cart-empty {
  padding: 34px 20px 28px;
  text-align: center;
}

.cart-empty-art {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  place-items: center;
  border: 1px dashed rgba(151, 114, 85, 0.28);
  border-radius: 50%;
  background: #F8F0E5;
  color: #B4947C;
}

.cart-empty-art svg {
  width: 42px;
  height: 42px;
}

.cart-empty h3 {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.cart-empty p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

/* ============ 支付 ============ */

.pay-hero {
  padding: 2px 0 17px;
  text-align: center;
}

.pay-hero .eyebrow {
  margin-bottom: 7px;
}

.pay-amount {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 47px;
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1;
}

.pay-amount small {
  margin-top: 7px;
  font-size: 17px;
  font-weight: 650;
}

.pay-merchant {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
}

.pay-summary {
  padding: 13px 14px;
  border-radius: 16px;
  background: #F8F1E7;
}

.pay-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  color: #907A6A;
  font-size: 9.5px;
}

.pay-summary-row strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 13px;
  padding: 13px;
  border: 1.5px solid rgba(185, 111, 72, 0.4);
  border-radius: 16px;
  background: #FCF2E7;
}

.pay-method-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #F5DDBF;
  font-size: 15px;
  font-weight: 700;
}

.pay-method-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.pay-method-copy strong {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
}

.pay-method-copy small {
  color: #9C8370;
  font-size: 8.5px;
}

.pay-check {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #FFF8EF;
}

.pay-check svg {
  width: 11px;
  height: 11px;
}

.pay-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 11px;
  background: #F7F2EA;
  color: #9D8775;
  font-size: 8.5px;
  line-height: 1.6;
}

.pay-note svg {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.pay-footer-note {
  margin-top: 9px;
  color: var(--muted-light);
  font-size: 8px;
  text-align: center;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 244, 230, 0.28);
  border-top-color: #FFF4E6;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ 安装说明 ============ */

.install-body {
  padding-top: 26px;
  padding-bottom: calc(24px + var(--safe-bottom));
}

.install-body h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.18;
}

.install-lead {
  margin-top: 9px;
  color: #8E7868;
  font-size: 10.5px;
  line-height: 1.7;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #FFFDF9;
}

.install-steps li > span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #F1E4D4;
  color: #7D5B43;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
}

.install-steps strong {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}

.install-steps p {
  margin-top: 2px;
  color: #9D8877;
  font-size: 9px;
  line-height: 1.55;
}

.install-tip-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  padding: 10px 11px;
  border-radius: 11px;
  background: #F7F2EA;
  color: #9D8775;
  font-size: 8.5px;
  line-height: 1.6;
}

.install-tip-note svg {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.install-body .primary-btn {
  margin-top: 18px;
}

/* ============ 成功页 ============ */

.success-screen {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(28px + var(--safe-top)) 22px calc(28px + var(--safe-bottom));
  overflow-y: auto;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(147, 91, 55, 0.38), transparent 65%),
    radial-gradient(60% 40% at 100% 100%, rgba(99, 61, 36, 0.24), transparent 60%),
    #21130D;
  color: var(--cream);
}

.success-screen.is-open {
  animation: success-in 0.45s var(--ease-out) both;
}

@keyframes success-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.success-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 244, 228, 0.1) 0.6px, transparent 0.8px);
  background-size: 5px 5px;
  opacity: 0.2;
  pointer-events: none;
}

.success-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  margin: auto;
  padding: 8px 0 4px;
  text-align: center;
}

.success-check {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  place-items: center;
  border: 1px solid rgba(241, 207, 172, 0.24);
  border-radius: 50%;
  background: rgba(255, 245, 232, 0.06);
  color: #F0C79E;
  box-shadow: 0 0 0 8px rgba(241, 207, 172, 0.04);
}

.success-check svg {
  width: 58px;
  height: 58px;
}

.success-check path {
  stroke-dasharray: 46;
  stroke-dashoffset: 46;
  animation: draw-check 0.65s 0.18s var(--ease-out) forwards;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

.success-card .eyebrow {
  color: rgba(255, 238, 219, 0.46);
}

.success-card h2 {
  margin-top: 3px;
  color: #FAEAD8;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 750;
  letter-spacing: -0.05em;
  line-height: 1.25;
}

.success-sub {
  margin-top: 10px;
  color: rgba(255, 240, 223, 0.53);
  font-size: 9.5px;
  line-height: 1.6;
}

.success-sub strong {
  color: #F2C99F;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.success-receipt {
  margin: 21px 0 18px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 244, 230, 0.1);
  border-radius: 17px;
  background: rgba(255, 248, 239, 0.055);
  text-align: left;
}

.receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
  color: rgba(255, 240, 223, 0.55);
  font-size: 9.5px;
}

.receipt-row strong {
  flex: 0 0 auto;
  color: #F6E5D3;
  font-size: 10px;
  font-weight: 600;
}

.receipt-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 7px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 244, 230, 0.1);
  color: rgba(255, 240, 223, 0.6);
  font-size: 9.5px;
}

.receipt-total strong {
  color: #F4D2AD;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.success-card .primary-btn {
  height: 50px;
  background: #F4E1C8;
  color: #352116;
  box-shadow: 0 14px 26px -16px rgba(0, 0, 0, 0.65);
}

.success-card .primary-btn:active {
  background: #FFEEDB;
}

.ghost-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 45px;
  margin-top: 9px;
  border: 1px solid rgba(255, 243, 229, 0.17);
  border-radius: 15px;
  color: rgba(255, 241, 225, 0.68);
  font-size: 11.5px;
  font-weight: 500;
}

.ghost-btn:active {
  background: rgba(255, 245, 232, 0.06);
}

.success-note {
  margin-top: 16px;
  color: rgba(255, 240, 223, 0.27);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.confetti {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: -12px;
  width: 6px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall 2.7s ease-in forwards;
}

@keyframes confetti-fall {
  0% { opacity: 0; transform: translateY(-10px) rotate(0deg); }
  12% { opacity: 0.68; }
  100% { opacity: 0; transform: translateY(110vh) rotate(520deg); }
}

/* ============ Toast ============ */

.toast {
  position: fixed;
  z-index: 200;
  bottom: calc(98px + var(--safe-bottom));
  left: 50%;
  max-width: min(80%, 360px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(41, 25, 17, 0.94);
  box-shadow: 0 10px 25px -12px rgba(34, 20, 13, 0.6);
  color: #FFF6EA;
  font-size: 10.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.22s ease, transform 0.3s var(--ease-out);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.has-cart .toast {
  bottom: calc(158px + var(--safe-bottom));
}

/* ============ 杯子插画 ============ */

.cup-svg {
  overflow: visible;
}

.cup-boba {
  animation: boba-bob 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

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

/* ============ 响应式 ============ */

@media (max-width: 370px) {
  .page {
    padding-right: 15px;
    padding-left: 15px;
  }

  .topbar {
    padding-right: 15px;
    padding-left: 15px;
  }

  .hero {
    min-height: 392px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero h1 {
    font-size: 31px;
  }

  .hero-copy {
    max-width: 70%;
  }

  .hero-art {
    right: -15px;
    width: 178px;
  }

  .hero-cup {
    width: 156px;
  }

  .hero-note {
    display: none;
  }

  .hero-sticker {
    right: 6px;
    width: 52px;
    height: 52px;
  }

  .product-art {
    flex-basis: 91px;
    width: 91px;
    height: 113px;
  }

  .product-art .cup-svg {
    width: 79px;
  }

  .product-info h3 {
    font-size: 15.5px;
  }

  .product-desc {
    font-size: 9.5px;
  }

  .product-card {
    padding-left: 14px;
  }

  .chips {
    margin-right: -15px;
    margin-left: -15px;
    padding-right: 15px;
    padding-left: 15px;
  }

  .page-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .sheet-head {
    padding-left: 17px;
    padding-right: 64px;
  }

  .sheet-body,
  .sheet-footer {
    padding-right: 17px;
    padding-left: 17px;
  }

  .segmented.seg-5 {
    gap: 5px;
  }

  .seg-btn {
    font-size: 9.7px;
  }

  .segmented.seg-5 .seg-btn {
    padding: 0 2px;
    font-size: 8.7px;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  .product-sheet-hero {
    gap: 10px;
    padding: 12px 11px;
  }

  .sheet-cup-stage {
    flex-basis: 104px;
    width: 104px;
    height: 136px;
  }

  .sheet-cup-stage .cup-svg {
    width: 93px;
  }

  .product-sheet-intro h2 {
    font-size: 19px;
  }

  .topping-btn {
    padding: 0 9px;
  }

  .topping-name {
    font-size: 10px;
  }
}

@media (min-width: 560px) {
  .app-frame {
    box-shadow: 0 0 90px rgba(80, 52, 33, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
