:root {
  --ink: #13221d;
  --muted: #6c756f;
  --paper: #f5f0e4;
  --paper-2: #fffdf8;
  --green: #0d392f;
  --green-2: #155344;
  --orange: #e76036;
  --gold: #d8ad66;
  --line: rgba(19, 34, 29, 0.12);
  --shadow: 0 18px 54px rgba(8, 35, 28, 0.14);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { background: #dde2dc; color: var(--ink); font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 50% -10%, #f2ece0 0, #dfe5df 45%, #cfd8d0 100%); }
button, input, textarea { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.app-shell { width: min(100%, 460px); min-height: 100vh; margin: 0 auto; background: var(--paper); position: relative; box-shadow: 0 0 80px rgba(11, 50, 40, .18); padding-bottom: calc(82px + var(--safe-bottom)); overflow: hidden; }
.topbar { height: 70px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; color: #fff; background: rgba(13, 57, 47, .96); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255,255,255,.09); }
.brand-button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; color: #fff; }
.brand-button strong { display: block; font-family: "Arial Narrow", "PingFang SC", sans-serif; letter-spacing: .13em; font-size: 15px; }
.brand-button small { display: block; margin-top: 2px; color: rgba(255,255,255,.64); font-size: 10px; letter-spacing: .15em; }
.mark-wrap { width: 42px; height: 42px; border-radius: 14px; background: var(--orange); display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-mark { width: 100%; height: 100%; object-fit: cover; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.demo-pill { color: var(--gold); border: 1px solid rgba(216,173,102,.46); padding: 5px 8px; border-radius: 99px; font-size: 9px; letter-spacing: .18em; }
.icon-button { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.07); color: #fff; border-radius: 50%; font-size: 18px; }

#app { min-height: calc(100vh - 152px); }
.page { padding: 18px 16px 28px; animation: reveal .34s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(7px); } }
.eyebrow { margin: 0 0 6px; color: var(--orange); font-size: 11px; letter-spacing: .18em; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: "STSong", "Songti SC", serif; font-size: clamp(31px, 9vw, 42px); line-height: 1.04; letter-spacing: -.04em; margin-bottom: 12px; }
h2 { font-size: 22px; margin-bottom: 12px; letter-spacing: -.02em; }
h3 { font-size: 16px; margin-bottom: 6px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin: 26px 2px 12px; }
.section-head h2 { margin: 0; }
.text-button { border: 0; background: none; color: var(--green-2); padding: 4px; font-size: 12px; font-weight: 700; }

.hero { min-height: 420px; margin: -18px -16px 0; padding: 34px 22px 24px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(5,26,21,.04), rgba(5,26,21,.92)), url('./media/bar.jpg') center/cover, var(--green); }
.hero::after { content: "468"; position: absolute; right: -12px; bottom: 46px; font: 900 128px/.8 "Arial Narrow", sans-serif; letter-spacing: -.08em; color: rgba(255,255,255,.075); }
.hero-copy, .hero-bottom { position: relative; z-index: 1; }
.hero .eyebrow { color: #ffc59f; }
.hero h1 { max-width: 330px; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero p { max-width: 270px; color: rgba(255,255,255,.75); font-size: 13px; line-height: 1.7; }
.hero-bottom { display: flex; justify-content: space-between; align-items: end; }
.open-state { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 99px; background: rgba(255,255,255,.12); backdrop-filter: blur(12px); font-size: 11px; }
.open-state i { width: 7px; height: 7px; border-radius: 50%; background: #7ce1a9; box-shadow: 0 0 0 5px rgba(124,225,169,.12); }
.hero-price { text-align: right; }
.hero-price span { display: block; color: rgba(255,255,255,.6); font-size: 10px; letter-spacing: .13em; }
.hero-price strong { font: 500 21px "STSong", serif; color: #ffe9ca; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: -10px; position: relative; z-index: 2; }
.quick-card { min-height: 104px; border: 1px solid rgba(255,255,255,.68); background: rgba(255,253,248,.92); box-shadow: var(--shadow); border-radius: 18px; padding: 13px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; }
.quick-card span { font-size: 21px; color: var(--orange); }
.quick-card strong { font-size: 13px; }
.quick-card small { color: var(--muted); font-size: 9px; }

.feature-list { display: grid; gap: 10px; }
.feature-row { width: 100%; border: 1px solid var(--line); background: var(--paper-2); border-radius: 18px; padding: 15px; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; }
.feature-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #e8eee8; color: var(--green-2); font-size: 19px; }
.feature-row strong { display: block; font-size: 14px; }
.feature-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.feature-row b { color: var(--orange); font-size: 18px; }

.menu-hero { margin: -18px -16px 18px; padding: 24px 20px; background: var(--green); color: #fff; position: relative; overflow: hidden; }
.menu-hero::before { content: "NIGHT MENU"; position: absolute; right: -24px; top: 8px; font: 900 42px/1 "Arial Narrow", sans-serif; color: rgba(255,255,255,.05); transform: rotate(-8deg); }
.menu-hero h1 { font-size: 31px; margin-bottom: 7px; }
.menu-hero p { color: rgba(255,255,255,.65); margin: 0; font-size: 12px; }
.category-scroll { display: flex; gap: 8px; overflow: auto; padding: 0 0 12px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid var(--line); background: rgba(255,255,255,.45); border-radius: 99px; padding: 8px 14px; font-size: 12px; }
.chip.active { color: #fff; border-color: var(--green); background: var(--green); }
.product-list { display: grid; gap: 13px; }
.product { background: var(--paper-2); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); display: grid; grid-template-columns: 126px 1fr; min-height: 142px; }
.product-photo { width: 100%; height: 100%; object-fit: cover; background: #d9dfda; }
.product-info { padding: 16px 14px 12px; display: flex; flex-direction: column; }
.product-info h3 { font-family: "STSong", serif; font-size: 18px; }
.product-info p { color: var(--muted); font-size: 10px; line-height: 1.55; margin-bottom: 10px; }
.product-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.price { color: var(--green); font-weight: 800; }
.price::before { content: "¥"; font-size: 11px; margin-right: 2px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button, .add-button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--green); color: #fff; }
.stepper button:first-child { background: #e9ece7; color: var(--green); }
.stepper span { min-width: 12px; text-align: center; font-size: 12px; font-weight: 700; }

.cart-float { position: fixed; z-index: 24; left: 50%; bottom: calc(77px + var(--safe-bottom)); transform: translateX(-50%); width: min(calc(100% - 30px), 430px); border: 0; border-radius: 18px; padding: 13px 17px; background: var(--orange); color: #fff; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 14px 32px rgba(157,62,34,.3); }
.cart-float strong { font-size: 14px; }
.cart-float span { font-size: 11px; }

.order-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.order-head, .order-total, .ledger-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.order-number { color: var(--orange); font: 800 24px "Arial Narrow", sans-serif; }
.order-state { padding: 5px 9px; color: var(--green); background: #e7f0e9; border-radius: 99px; font-size: 10px; }
.order-lines { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.order-lines p { display: flex; justify-content: space-between; margin: 6px 0; color: var(--muted); font-size: 12px; }
.order-total { padding-top: 13px; }
.empty { min-height: 320px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--green); font: 500 58px "STSong", serif; }

.profile-hero { margin: -18px -16px 0; padding: 30px 20px 26px; color: #fff; background: radial-gradient(circle at 94% 6%, rgba(231,96,54,.45), transparent 32%), var(--green); }
.member-head { display: flex; align-items: center; gap: 13px; }
.avatar { width: 58px; height: 58px; border-radius: 21px; background: var(--orange); display: grid; place-items: center; font: 800 20px "Arial Narrow"; box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); }
.member-head h2 { margin: 0 0 4px; }
.member-head p { margin: 0; color: rgba(255,255,255,.65); font-size: 11px; }
.asset-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0 0; background: rgba(255,255,255,.12); border-radius: 17px; overflow: hidden; }
.asset-strip button { border: 0; padding: 14px 5px; color: #fff; background: rgba(255,255,255,.05); }
.asset-strip strong { display: block; font-size: 18px; }
.asset-strip span { font-size: 9px; color: rgba(255,255,255,.58); }
.member-code { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; margin-top: 18px; height: 28px; opacity: .75; }
.member-code i { background: rgba(255,255,255,.9); }
.member-code i:nth-child(3n), .member-code i:nth-child(4n) { transform: scaleX(.35); }

.store-card { background: var(--paper-2); border: 1px solid var(--line); border-radius: 22px; padding: 17px; overflow: hidden; position: relative; }
.store-card::after { content: "成都"; position: absolute; right: -10px; bottom: -14px; font: 900 56px "STSong", serif; color: rgba(13,57,47,.04); }
.store-meta { display: flex; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 11px; }

.tabbar { height: calc(67px + var(--safe-bottom)); padding: 7px 16px var(--safe-bottom); width: min(100%, 460px); position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,253,248,.94); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.tabbar button { border: 0; background: none; color: #9a9f9a; font-size: 10px; display: grid; gap: 2px; place-items: center; }
.tabbar span { font-size: 20px; line-height: 1; }
.tabbar button.active { color: var(--green); font-weight: 800; }

.sheet-backdrop { position: fixed; z-index: 50; inset: 0; background: rgba(6,24,20,.55); backdrop-filter: blur(5px); display: flex; align-items: end; justify-content: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(100%, 460px); max-height: 88vh; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--paper); border-radius: 26px 26px 0 0; padding: 20px 18px calc(24px + var(--safe-bottom)); animation: rise .28s ease; }
@keyframes rise { from { transform: translateY(35px); } }
.sheet-handle { width: 42px; height: 4px; background: #c8cbc5; border-radius: 99px; margin: -7px auto 20px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sheet-head h2 { margin: 0; }
.close-button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #e3e7e2; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line strong { font-size: 14px; }
.cart-line small { display: block; color: var(--muted); margin-top: 3px; }
.field-label { display: block; font-size: 11px; color: var(--muted); margin: 16px 0 7px; }
.select-row { display: flex; gap: 7px; overflow: auto; }
.select-card { min-width: 132px; border: 1px solid var(--line); background: var(--paper-2); border-radius: 15px; padding: 11px; text-align: left; }
.select-card.active { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.select-card strong { display: block; font-size: 12px; }
.select-card span { color: var(--orange); font-size: 10px; }
textarea, .text-input { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); padding: 12px; outline: none; resize: vertical; min-height: 44px; }
.quote { margin: 18px 0; padding: 14px; border-radius: 16px; background: #e9eee9; }
.quote p { margin: 5px 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.quote p:last-child { margin-top: 10px; color: var(--ink); font-size: 15px; font-weight: 800; }
.primary-button { width: 100%; border: 0; border-radius: 15px; padding: 14px; background: var(--green); color: #fff; font-weight: 800; }
.primary-button.orange { background: var(--orange); }
.secondary-button { width: 100%; border: 1px solid var(--line); border-radius: 15px; padding: 13px; background: var(--paper-2); color: var(--green); font-weight: 700; }
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pack { border: 1px solid var(--line); background: var(--paper-2); border-radius: 18px; padding: 17px 12px; text-align: left; }
.pack strong { font-size: 22px; }
.pack small { display: block; color: var(--orange); margin-top: 5px; }
.ledger-row { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.ledger-row strong { display: block; font-size: 12px; }
.ledger-row small { color: var(--muted); font-size: 9px; }
.ledger-row b { color: var(--orange); }
.ledger-row b.positive { color: var(--green-2); }
.coupon { border: 1px solid var(--line); background: var(--paper-2); border-radius: 18px; padding: 15px; display: grid; grid-template-columns: 70px 1fr; gap: 12px; margin-bottom: 10px; overflow: hidden; }
.coupon-value { color: var(--orange); font: 800 26px "Arial Narrow"; border-right: 1px dashed var(--line); }
.coupon-value small { display: block; color: var(--muted); font: 10px sans-serif; }
.coupon h3 { margin-bottom: 4px; }
.coupon p { color: var(--muted); margin: 0; font-size: 10px; }
.bottle { display: flex; justify-content: space-between; align-items: center; padding: 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 9px; }
.bottle button { border: 0; padding: 8px 12px; border-radius: 99px; background: #e7eee8; color: var(--green); font-size: 11px; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translate(-50%, 20px); max-width: 320px; padding: 11px 16px; border-radius: 99px; background: #13221d; color: #fff; opacity: 0; pointer-events: none; transition: .25s ease; font-size: 12px; box-shadow: var(--shadow); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.legal-note { padding: 12px; border: 1px dashed rgba(231,96,54,.35); border-radius: 14px; color: #8e553f; background: #fff4ec; font-size: 10px; line-height: 1.6; }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100vh - 48px); border-radius: 28px; }
  .topbar { border-radius: 28px 28px 0 0; }
  .tabbar { bottom: 24px; border-radius: 0 0 28px 28px; }
  .cart-float { bottom: 98px; }
}

@media (max-width: 360px) {
  .product { grid-template-columns: 106px 1fr; }
  .quick-card { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
