/* =========================================================
   小鸭专属店铺 · 温馨小黄鸭 / 小白鸭风格
   暖奶油底 + 小鸭插画，移动端优先
   ========================================================= */

:root {
  --cream: #FFFBF2;
  --butter-1: #FFF7E4;
  --butter-2: #FFF0CF;
  --butter-3: #FFE2A8;
  --butter-4: #FFCE6B;
  --honey: #F2A93B;
  --brand: #E89A2E;
  --brand-deep: #B9761A;
  --ink: #5B472C;
  --ink-soft: #9B8568;
  --line: #FBE8BE;
  --white: #FFFFFF;
  --coral: #EF8A68;
  --shadow-soft: 0 10px 26px rgba(214, 164, 72, 0.18);
  --shadow-card: 0 8px 22px rgba(214, 164, 72, 0.14);
  --max: 520px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html.no-scroll {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(700px 460px at 88% -8%, #FFE7A8 0%, rgba(255, 231, 168, 0) 62%),
    radial-gradient(560px 420px at -8% 10%, #FFF3D2 0%, rgba(255, 243, 210, 0) 58%),
    linear-gradient(180deg, #FFFAEE 0%, #FFFDF7 48%, #FFF8E9 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 2px, transparent 2.4px);
  background-size: 26px 26px;
  opacity: 0.5;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* ================= 背景漂浮爱心 ================= */

.bg-hearts {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.float-heart {
  position: absolute;
  color: #F7CE85;
  opacity: 0.6;
  animation: floatHeart 9s ease-in-out infinite;
}

.h1 { left: 6%; top: 16%; font-size: 18px; animation-delay: 0s; }
.h2 { right: 8%; top: 26%; font-size: 26px; animation-delay: 1.6s; opacity: 0.45; }
.h3 { left: 12%; bottom: 22%; font-size: 22px; animation-delay: 3.2s; opacity: 0.4; }
.h4 { right: 12%; bottom: 12%; font-size: 16px; animation-delay: 4.6s; }

@keyframes floatHeart {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

.app {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  min-height: 100vh;
  margin: 0 auto;
}

.view[hidden] {
  display: none;
}

.is-hidden {
  display: none !important;
}

/* ================= 首页头图 ================= */

.hero {
  position: relative;
  padding: 18px 20px 4px;
  text-align: center;
}

.hero-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid #FFE7B8;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(214, 164, 72, 0.14);
  backdrop-filter: blur(6px);
}

.pill-live {
  color: #C9821F;
  border-color: #FFE0A0;
  background: rgba(255, 255, 255, 0.92);
}

.pill-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--honey);
  box-shadow: 0 0 0 3px rgba(242, 169, 59, 0.18);
}

/* ---- 首页三幕小动画：羊 + 鸭 ---- */

.hero-scene {
  position: relative;
  width: min(100%, 300px);
  margin: 6px auto 0;
  aspect-ratio: 300 / 186;
  filter: drop-shadow(0 12px 16px rgba(220, 168, 76, 0.22));
}

.hero-scene::before {
  content: "";
  position: absolute;
  inset: -5% -3%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 58%, #FFFFFF 44%, rgba(255, 255, 255, 0) 74%);
}

.love-stage {
  position: absolute;
  inset: 0;
}

.love-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.love-scene.is-on {
  opacity: 1;
}

.love-scene svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 角色轻轻起伏 */
.love-scene .bob {
  animation: bobSoft 2.4s ease-in-out infinite;
}

.love-scene .bob-delay {
  animation-delay: 0.7s;
}

@keyframes bobSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.6px); }
}

/* 扇子来回扇 */
.love-scene .fan {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: fanWave 1.5s ease-in-out infinite;
}

@keyframes fanWave {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(11deg); }
}

/* 风线 */
.love-scene .wind {
  animation: windPuff 1.5s ease-out infinite;
}

.love-scene .wind.w2 { animation-delay: 0.25s; }
.love-scene .wind.w3 { animation-delay: 0.5s; }

@keyframes windPuff {
  0% { opacity: 0; transform: translateX(8px); }
  35% { opacity: 0.85; }
  100% { opacity: 0; transform: translateX(-10px); }
}

/* 手机屏幕的光 */
.love-scene .phone-glow {
  animation: glowPulse 2.6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.72; }
}

/* 爱心飘一飘 */
.love-scene .heart-fly {
  animation: heartFloat 3.2s ease-in-out infinite;
}

.love-scene .hf2 {
  animation-delay: 0.8s;
}

@keyframes heartFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

/* 小星星闪一闪 */
.love-scene .spark {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: sparkle 2.4s ease-in-out infinite;
}

.love-scene .spark.s2 { animation-delay: 0.6s; }
.love-scene .spark.s3 { animation-delay: 1.2s; }

@keyframes sparkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes duckFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero h1 {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand-deep);
  text-shadow: 0 2px 0 #FFFFFF;
}

.hero-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px dashed #FFD98A;
  font-size: 11.5px;
  color: #C9821F;
  box-shadow: 0 4px 12px rgba(214, 164, 72, 0.14);
}

.mini-heart {
  font-size: 10px;
  color: var(--coral);
}

/* ================= 分类 ================= */

.cat-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  overflow-x: auto;
  background: rgba(255, 251, 242, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  scrollbar-width: none;
}

.cat-nav::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid #FFE7B8;
  background: #FFFFFF;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-chip.is-active {
  background: linear-gradient(135deg, #FFD166, var(--honey));
  border-color: transparent;
  color: #5A3B0E;
  box-shadow: 0 6px 16px rgba(226, 160, 50, 0.32);
  transform: translateY(-1px);
}

/* ================= 菜品 ================= */

.menu-wrap {
  padding: 8px 14px calc(120px + env(safe-area-inset-bottom));
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 6px;
  margin: 6px 0 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.section-head h2::before {
  content: "♥";
  margin-right: 6px;
  font-size: 12px;
  color: var(--coral);
  vertical-align: 2px;
}

.section-head span {
  font-size: 11.5px;
  color: #C0AC8C;
}

.menu-list {
  display: grid;
  gap: 12px;
}

.item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border-radius: 22px;
  background: #FFFFFF;
  border: 2px solid #FFF3D9;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s, box-shadow 0.18s;
}

.item.is-sold {
  opacity: 0.62;
}

.item-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #FFF6E2;
}

.item-icon--porridge { background: #FFF0DC; color: #DE9450; }
.item-icon--game { background: #EDF3FB; color: #7B9BC4; }
.item-icon--company { background: #FFECE4; color: #E58A6B; }

.item-icon svg {
  width: 32px;
  height: 32px;
}

.item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.item-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.item-top h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: #FFF6E2;
  border: 1px solid #FFE2A8;
  color: #C9821F;
  font-size: 9.5px;
  font-weight: 700;
}

.item-desc {
  margin: 5px 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hearts {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 800;
  color: #E0962A;
}

.add-btn {
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFD166, var(--honey));
  color: #5A3B0E;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(226, 160, 50, 0.3);
  transition: transform 0.15s;
}

.add-btn:active {
  transform: scale(0.95);
}

.add-btn:disabled {
  background: #F6EEDC;
  color: #C0AE8E;
  box-shadow: none;
  cursor: not-allowed;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: #FFFAEC;
  border: 1.5px solid #FFE7B8;
}

.stepper button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #C9821F;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

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

.stepper .plus {
  background: linear-gradient(135deg, #FFD166, var(--honey));
  color: #5A3B0E;
  font-weight: 800;
}

.stepper .qty {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.menu-foot {
  margin: 24px 0 0;
  text-align: center;
  font-size: 11px;
  color: #C2AE8E;
  letter-spacing: 0.04em;
}

/* ================= 购物车条 ================= */

.cartbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: 100%;
  max-width: var(--max);
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: linear-gradient(to top, #FFF9EA 36%, rgba(255, 249, 234, 0.9) 68%, rgba(255, 249, 234, 0));
  pointer-events: none;
}

.cart-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 13px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 2px solid #FFE7B8;
  box-shadow: 0 14px 30px rgba(214, 164, 72, 0.2);
  pointer-events: auto;
}

.cart-open {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.cart-icon-wrap {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #FFF4DA;
  color: #D99327;
}

.cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #FFD166;
  border: 2px solid #FFFFFF;
  color: #5A3B0E;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
}

.cart-badge.pulse {
  animation: badgePulse 0.36s ease;
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.cart-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-meta strong {
  font-size: 15px;
  font-weight: 800;
  color: #D98A1F;
  line-height: 1.2;
}

.cart-meta small {
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  padding: 10px 20px;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #FFD166, var(--honey));
  color: #5A3B0E;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(226, 160, 50, 0.32);
  transition: transform 0.15s, opacity 0.2s;
}

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

.btn-primary:disabled {
  background: #F6EEDC;
  color: #C0AE92;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-primary.block {
  width: 100%;
  padding: 14px;
}

/* ================= 购物车抽屉 ================= */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(91, 71, 44, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 60;
  width: 100%;
  max-width: var(--max);
  transform: translate(-50%, 105%);
  transition: transform 0.34s cubic-bezier(0.22, 0.9, 0.3, 1);
}

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

.sheet-inner {
  display: flex;
  flex-direction: column;
  max-height: 82vh;
  max-height: 82dvh;
  border-radius: 28px 28px 0 0;
  background: #FFFFFF;
  border-top: 2px solid #FFE7B8;
  box-shadow: 0 -20px 50px rgba(214, 164, 72, 0.2);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.sheet-inner::before {
  content: "";
  width: 38px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 2px;
  background: #FFE2A8;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 10px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.link-btn {
  padding: 4px 2px;
  border: none;
  background: none;
  color: #B49E7F;
  font-size: 12px;
  cursor: pointer;
}

.sheet-body {
  flex: 1;
  min-height: 90px;
  overflow-y: auto;
  padding: 0 20px;
  -webkit-overflow-scrolling: touch;
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px dashed #FBEDCB;
}

.cart-line:last-child {
  border-bottom: none;
}

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

.cl-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cl-price {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.cl-del {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid #FFE7B8;
  background: transparent;
  color: #C0AC8C;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.cl-del:active {
  transform: scale(0.92);
}

.cart-empty {
  padding: 42px 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink);
}

.cart-empty span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #B7A184;
}

.sheet-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 18px;
  border-top: 1.5px solid #FFF6E2;
}

.sheet-total {
  flex: 1;
}

.sheet-total small {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.sheet-total strong {
  font-size: 20px;
  font-weight: 800;
  color: #D98A1F;
}

/* ================= 结算页 ================= */

.page-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 251, 242, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.page-head h1 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.head-spacer {
  width: 38px;
  flex: none;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1.5px solid #FFE7B8;
  background: #FFFFFF;
  color: #C9821F;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(214, 164, 72, 0.12);
}

.checkout-body {
  display: grid;
  gap: 12px;
  padding: 8px 14px calc(112px + env(safe-area-inset-bottom));
}

.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF6DF, #FFFBF2);
  border: 1.5px solid #FFE7B8;
  font-size: 12px;
  color: var(--brand-deep);
  line-height: 1.5;
}

.notice-icon {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--honey);
  color: #FFFFFF;
  font-size: 9px;
}

.card {
  padding: 16px;
  border-radius: 22px;
  background: #FFFFFF;
  border: 2px solid #FFF3D9;
  box-shadow: var(--shadow-card);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.card-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--butter-3);
  box-shadow: 0 0 0 3px #FFF7E4;
}

.field {
  display: block;
  margin-top: 14px;
}

.field:first-of-type {
  margin-top: 0;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1.5px solid #FFE9C2;
  background: #FFFBF1;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #CBB894;
}

.field input:focus,
.field textarea:focus {
  background: #FFFFFF;
  border-color: var(--butter-4);
  box-shadow: 0 0 0 4px rgba(255, 206, 107, 0.24);
}

.field.is-error input,
.field.is-error textarea {
  border-color: #F56A6A;
  background: #FFF7F7;
}

.err {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: #E25959;
}

.err:empty {
  display: none;
}

.quick-times {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.chip {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid #FFE7B8;
  background: #FFFBF1;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.chip.is-active {
  background: #FFF3D9;
  border-color: var(--butter-4);
  color: #C9821F;
}

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--ink);
}

.summary-list li .s-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-list li .s-qty {
  flex: none;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.summary-list li .s-heart {
  flex: none;
  font-weight: 800;
  color: #E0962A;
}

.sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.sum-row.total {
  margin-top: 8px;
  padding-top: 13px;
  border-top: 1.5px dashed #FFE9C2;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.sum-row.total strong {
  font-size: 19px;
  font-weight: 800;
  color: #D98A1F;
}

.checkout-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: 100%;
  max-width: var(--max);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: linear-gradient(to top, #FFF9EA 58%, rgba(255, 249, 234, 0.86), rgba(255, 249, 234, 0));
}

.cf-total {
  flex: 1;
}

.cf-total small {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 2px;
}

.cf-total strong {
  font-size: 21px;
  font-weight: 800;
  color: #D98A1F;
}

.checkout-footer .btn-primary {
  padding: 13px 28px;
  border-radius: 16px;
  font-size: 15px;
}

/* ================= 成功弹窗 ================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(91, 71, 44, 0.38);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 340px;
  padding: 22px 20px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, #FFFFFF, #FFFBEF);
  border: 2px solid #FFE7B8;
  box-shadow: 0 30px 60px rgba(214, 164, 72, 0.26);
  text-align: center;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.3, 1);
}

.modal.is-open .modal-card {
  transform: none;
}

.mini-duck {
  display: flex;
  justify-content: center;
  margin: -4px auto 2px;
  animation: duckFloat 4.6s ease-in-out infinite;
}

.modal-card h2 {
  margin: 6px 0 6px;
  font-size: 21px;
  font-weight: 800;
  color: var(--brand-deep);
  letter-spacing: 0.04em;
}

.modal-sub {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--ink-soft);
}

.order-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #FFFAEC;
  border: 1.5px dashed #FFD98A;
  font-size: 12px;
  color: var(--ink-soft);
}

.order-box strong {
  flex: 1;
  text-align: left;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.ghost-btn {
  flex: none;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1.5px solid #FFE7B8;
  background: #FFFFFF;
  color: #C9821F;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.order-meta {
  display: grid;
  gap: 9px;
  margin: 14px 0 16px;
}

.order-meta div {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.order-meta b {
  color: var(--ink);
  font-weight: 700;
}

.demo-tip {
  margin: -2px 0 14px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FFF9E8;
  border: 1px solid #FFE9AF;
  font-size: 11px;
  color: #A97E1F;
  line-height: 1.5;
  text-align: left;
}

/* ================= 轻提示 ================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 122px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid #FFE7B8;
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(214, 164, 72, 0.2);
  opacity: 0;
  transform: translate(-50%, 0);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}

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

/* ================= 桌面端 ================= */

@media (min-width: 600px) {
  .app {
    margin: 22px auto 60px;
    border-radius: 30px;
  }

  .cartbar {
    bottom: 16px;
  }

  .checkout-footer {
    bottom: 16px;
  }

  .sheet {
    bottom: 6px;
  }

  .sheet-inner {
    border-radius: 28px;
    margin-bottom: 10px;
  }

  .toast {
    bottom: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
