:root {
  --ink: #14201c;
  --ink-soft: #3a4a43;
  --mist: #eef3f0;
  --paper: #f6f9f7;
  --line: rgba(20, 32, 28, 0.12);
  --accent: #1f6f54;
  --accent-deep: #155541;
  --chili: #c0392b;
  --gold: #a67c2d;
  --white: #ffffff;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", "DM Sans", sans-serif;
  --app-max: 480px;
  --nav-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-body);
  background: #dfe6e2;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
}

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

a {
  color: inherit;
}

/* Phone-width app shell on larger screens */
.app-shell {
  width: min(100%, var(--app-max));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(31, 111, 84, 0.1), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(166, 124, 45, 0.08), transparent 50%),
    linear-gradient(180deg, var(--mist) 0%, var(--paper) 100%);
  box-shadow: 0 0 0 1px rgba(20, 32, 28, 0.06), 0 20px 60px rgba(20, 32, 28, 0.12);
}

.site-nav {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--app-max));
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  color: var(--white);
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.92;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav .links {
  display: flex;
  gap: 14px;
}

.site-nav .brand-mark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.hero {
  position: relative;
  min-height: 72vh;
  min-height: 72dvh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(20, 32, 28, 0.12) 0%, rgba(20, 32, 28, 0.72) 70%, rgba(20, 32, 28, 0.9) 100%),
    center / cover no-repeat
      url("https://images.unsplash.com/photo-1533089860892-a7c6f0a88666?auto=format&fit=crop&w=1200&q=80");
  transform: scale(1.04);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.hero-content {
  width: 100%;
  padding: 0 16px calc(28px + 8px);
  animation: rise 0.9s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 14vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.hero-lede {
  margin: 0 0 22px;
  max-width: 18ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 48px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--white);
  border-radius: 0;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
  background: var(--accent-deep);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section {
  width: 100%;
  padding: 28px 16px 24px;
}

.section-head {
  margin-bottom: 16px;
  animation: rise 0.8s ease both;
}

.section-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.04em;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.95rem;
}

.menu-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.menu-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  animation: rise 0.7s ease both;
}

.menu-item:nth-child(1) { animation-delay: 0.04s; }
.menu-item:nth-child(2) { animation-delay: 0.08s; }
.menu-item:nth-child(3) { animation-delay: 0.12s; }
.menu-item:nth-child(4) { animation-delay: 0.16s; }
.menu-item:nth-child(5) { animation-delay: 0.2s; }
.menu-item:nth-child(6) { animation-delay: 0.24s; }
.menu-item:nth-child(7) { animation-delay: 0.28s; }
.menu-item:nth-child(8) { animation-delay: 0.32s; }

.menu-item:active {
  background: rgba(31, 111, 84, 0.06);
}

.menu-item img {
  width: 88px;
  height: 88px;
  object-fit: cover;
}

.menu-item h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.menu-item p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.4;
}

.menu-price {
  grid-column: 2;
  text-align: left;
}

.menu-price strong {
  display: inline;
  color: var(--gold);
  font-size: 1.05rem;
  margin-right: 8px;
}

.menu-price span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.page-shell {
  width: 100%;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 28px;
}

.page-shell .brand-mark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.detail-media {
  width: calc(100% + 32px);
  margin-left: -16px;
  min-height: 240px;
  background: center / cover no-repeat;
  animation: rise 0.8s ease both;
}

.detail-copy {
  padding-bottom: 72px;
  animation: rise 0.9s ease both;
}

.detail-copy .eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.detail-copy h1 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.detail-copy .price {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 1.55rem;
  font-weight: 700;
}

.detail-copy .pay-note {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.detail-copy .desc {
  margin: 0 0 18px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.checkout-shell {
  width: 100%;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 100px;
}

.checkout-shell h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.04em;
}

.checkout-lede {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pay-panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  animation: rise 0.75s ease both;
}

.order-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.order-summary strong {
  color: var(--ink);
}

.pay-amount {
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 700;
}

.method {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(31, 111, 84, 0.45);
  background: rgba(31, 111, 84, 0.06);
  padding: 14px 14px;
  margin: 10px 0 18px;
}

.method .badge {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #1677ff;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.method strong {
  display: block;
}

.method span {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.hint {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.5;
}

.status {
  margin-top: 10px;
  min-height: 1.3em;
  font-size: 0.92rem;
}

.status.err {
  color: var(--chili);
}

.page-nav {
  display: flex;
  gap: 14px;
  margin: 10px 0 18px;
}

.page-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.site-footer {
  width: 100%;
  padding: 8px 16px 20px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.site-footer .beian {
  margin-top: 8px;
}

.site-footer .beian a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer .beian a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Sticky bottom CTA */
.sticky-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  width: min(100%, var(--app-max));
  padding: 10px 16px;
  background: rgba(246, 249, 247, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 20;
  display: none;
}

.sticky-cta.is-on {
  display: block;
}

.sticky-cta .btn {
  width: 100%;
}

/* Bottom tab bar */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, var(--app-max));
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 0 8px var(--safe-bottom);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  z-index: 30;
  backdrop-filter: blur(12px);
}

.tabbar a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  min-height: var(--nav-h);
}

.tabbar a.active {
  color: var(--accent);
  font-weight: 700;
}

.tabbar .ico {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1;
}

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

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (min-width: 820px) {
  .hero {
    min-height: 78vh;
  }

  .hero-brand {
    font-size: 4.6rem;
  }

  .menu-item {
    grid-template-columns: 100px 1fr auto;
    align-items: center;
  }

  .menu-item img {
    width: 100px;
    height: 88px;
  }

  .menu-price {
    grid-column: auto;
    text-align: right;
  }

  .menu-price strong {
    display: block;
    margin-right: 0;
  }

  .detail-media {
    width: 100%;
    margin-left: 0;
    min-height: 320px;
  }
}
