:root {
  --cream: #f8f4ea;
  --paper: #fffdf8;
  --ink: #243128;
  --muted: #788078;
  --green: #496653;
  --green-dark: #344c3d;
  --lime: #dfeab5;
  --peach: #f4d5bd;
  --line: rgba(36, 49, 40, 0.1);
  --shadow: 0 16px 40px rgba(52, 76, 61, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #e9e6dd; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif; }
button { color: inherit; font: inherit; }
button:focus-visible { outline: 3px solid rgba(73, 102, 83, 0.3); outline-offset: 3px; }
.app-shell { width: min(100%, 480px); min-height: 100vh; margin: 0 auto; padding: env(safe-area-inset-top) 18px calc(104px + env(safe-area-inset-bottom)); background: var(--cream); overflow: hidden; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.location-button { display: flex; gap: 9px; align-items: center; padding: 0; border: 0; background: transparent; text-align: left; }
.location-button small, .location-button strong { display: block; }
.location-button small { margin-bottom: 2px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.location-button strong { font-size: 14px; }
.location-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(73,102,83,.12); }
.round-button, .section-heading button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.65); font-size: 19px; }

.hero-card { position: relative; min-height: 264px; padding: 28px 22px; border-radius: 30px; background: linear-gradient(135deg, #dce8b3 0%, #e7efc8 53%, #cfdca5 100%); overflow: hidden; box-shadow: var(--shadow); }
.hero-card::before { content: ""; position: absolute; width: 190px; height: 190px; right: -68px; top: -75px; border: 1px solid rgba(73,102,83,.18); border-radius: 50%; box-shadow: 0 0 0 30px rgba(255,255,255,.08), 0 0 0 60px rgba(255,255,255,.06); }
.hero-copy { position: relative; z-index: 2; width: 62%; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.hero-copy h1 { margin: 10px 0 8px; font-size: clamp(34px, 10vw, 44px); line-height: 1.05; letter-spacing: -.05em; }
.hero-copy p { margin: 0 0 21px; color: #65705e; font-size: 13px; }
.hero-action { padding: 11px 15px; border: 0; border-radius: 14px; color: white; background: var(--green-dark); font-size: 13px; font-weight: 700; box-shadow: 0 8px 20px rgba(52,76,61,.2); }
.hero-action span { margin-left: 8px; }
.hero-art { position: absolute; right: 12px; bottom: 12px; width: 145px; height: 210px; }
.cup { position: absolute; right: 10px; bottom: 0; width: 104px; height: 158px; border-radius: 12px 12px 32px 32px; background: linear-gradient(105deg,#f9eee0,#e9c6a2); transform: rotate(6deg); box-shadow: -15px 18px 25px rgba(86,85,52,.18); }
.cup::after { content: ""; position: absolute; inset: 39px 10px 13px; border-radius: 10px 10px 23px 23px; background: linear-gradient(160deg,rgba(255,255,255,.34),transparent); }
.cup-lid { position: absolute; z-index: 2; top: -7px; left: -7px; width: 118px; height: 17px; border-radius: 8px; background: #fff9eb; box-shadow: 0 5px 10px rgba(50,50,30,.12); }
.straw { position: absolute; width: 8px; height: 65px; top: -59px; left: 63px; border-radius: 5px 5px 0 0; background: var(--green-dark); transform: rotate(-6deg); transform-origin: bottom; }
.cup-logo { position: absolute; z-index: 3; top: 61px; left: 34px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(73,102,83,.4); border-radius: 50%; color: var(--green); font-family: serif; }
.leaf { position: absolute; width: 44px; height: 23px; border-radius: 100% 0 100% 0; background: #769159; }
.leaf-one { top: 32px; left: 3px; transform: rotate(28deg); }.leaf-two { top: 60px; left: 9px; transform: rotate(-35deg) scale(.65); background: #98ad71; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 34px; }
.quick-card { position: relative; display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.68); text-align: left; box-shadow: 0 7px 20px rgba(52,76,61,.04); }
.quick-card strong, .quick-card small { display: block; white-space: nowrap; }
.quick-card strong { margin-bottom: 4px; font-size: 13px; }.quick-card small { color: var(--muted); font-size: 9px; }.quick-card small b { color: var(--green); }
.quick-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; font-size: 22px; font-weight: 700; }.scan-icon { background: var(--peach); }.points-icon { background: var(--lime); }
.chevron { position: absolute; right: 8px; color: #a3aaa4; }
.section-heading { display: flex; align-items: end; justify-content: space-between; }
.section-heading h2 { margin: 6px 0 0; font-size: 25px; letter-spacing: -.04em; }.section-heading button { background: transparent; font-size: 26px; }
.category-tabs { display: flex; gap: 7px; margin: 18px 0; overflow-x: auto; scrollbar-width: none; }.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { flex: 0 0 auto; padding: 9px 15px; border: 0; border-radius: 13px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; }
.category-tabs button.active { color: white; background: var(--green-dark); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.product-card { min-width: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); overflow: hidden; box-shadow: 0 9px 24px rgba(52,76,61,.055); }
.product-visual { position: relative; display: grid; place-items: end center; height: 132px; background: var(--product-bg, #e8e6cf); overflow: hidden; }
.product-visual::after { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.25); top: 12px; right: -28px; }
.product-tag { position: absolute; z-index: 2; left: 10px; top: 10px; padding: 5px 7px; border-radius: 8px; color: var(--green-dark); background: rgba(255,255,255,.62); backdrop-filter: blur(5px); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.mini-cup { position: relative; z-index: 1; width: 68px; height: 101px; margin-bottom: -5px; border-radius: 8px 8px 22px 22px; background: var(--drink, #dec3a2); transform: rotate(3deg); box-shadow: 0 12px 16px rgba(36,49,40,.16); }
.mini-cup::before { content: ""; position: absolute; width: 76px; height: 10px; left: -4px; top: -5px; border-radius: 5px; background: #fff9eb; }.mini-cup::after { content: ""; position: absolute; width: 5px; height: 33px; left: 41px; top: -34px; border-radius: 3px; background: var(--green-dark); }
.mini-cup span { position: absolute; inset: 14px 7px 7px; border-radius: 5px 5px 16px 16px; background: rgba(255,255,255,.13); }.mini-cup b { position: absolute; z-index: 2; top: 39px; left: 22px; font-size: 17px; font-family: serif; font-weight: 500; }
.product-info { padding: 12px; }.product-category { color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .12em; }.product-info h3 { margin: 4px 0 4px; font-size: 15px; }.product-info p { min-height: 28px; margin: 0 0 8px; color: var(--muted); font-size: 9px; line-height: 1.5; }.product-info > div { display: flex; align-items: center; justify-content: space-between; }.price { font-size: 16px; }.add-button { width: 30px; height: 30px; border: 0; border-radius: 10px; color: white; background: var(--green-dark); font-size: 20px; line-height: 1; }

.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5,1fr); align-items: end; width: min(100%, 480px); height: calc(78px + env(safe-area-inset-bottom)); padding: 9px 10px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,248,.92); backdrop-filter: blur(18px); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; color: #949b95; background: transparent; font-size: 9px; }.bottom-nav button span { font-size: 20px; }.bottom-nav button.active { color: var(--green-dark); font-weight: 800; }
.bottom-nav .scan-fab { align-self: start; width: 58px; height: 58px; margin: -25px auto 0; justify-content: center; border: 6px solid var(--cream); border-radius: 50%; color: white; background: var(--green-dark); box-shadow: 0 8px 20px rgba(52,76,61,.28); }.bottom-nav .scan-fab span { font-size: 27px; }
.cart-pill { position: fixed; z-index: 19; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); align-items: center; gap: 10px; width: min(calc(100% - 44px), 436px); padding: 14px 17px; border: 0; border-radius: 18px; color: white; background: var(--green-dark); box-shadow: 0 14px 28px rgba(52,76,61,.28); }.cart-pill:not([hidden]) { display: flex; }.cart-pill strong { margin-left: auto; }.cart-count { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: var(--green-dark); background: var(--lime); font-weight: 800; }

.sheet-backdrop { position: fixed; z-index: 50; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 18px 0 0; background: rgba(25,34,28,.48); backdrop-filter: blur(5px); }.sheet-backdrop[hidden] { display: none; }
.sheet { position: relative; width: min(100%,480px); max-height: 92vh; padding: 27px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--paper); overflow-y: auto; animation: sheetUp .28s ease-out; }
@keyframes sheetUp { from { transform: translateY(25px); opacity: .5; } }
.sheet-close { position: absolute; z-index: 2; right: 18px; top: 18px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0eee8; font-size: 24px; }
.sheet-heading h2 { margin: 6px 0; font-size: 28px; }.sheet-heading p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.camera-box { position: relative; aspect-ratio: 1/1; border-radius: 24px; background: #1b211d; overflow: hidden; }.camera-box video { width: 100%; height: 100%; object-fit: cover; }.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: #d7ddd8; background: radial-gradient(circle at center,#344039,#171c19); }.camera-placeholder span { font-size: 54px; }.camera-placeholder p { font-size: 12px; }
.scan-frame { position: absolute; z-index: 3; inset: 17%; pointer-events: none; }.scan-frame i { position: absolute; width: 38px; height: 38px; border-color: var(--lime); }.scan-frame i:nth-child(1) { left:0;top:0;border-left:3px solid var(--lime);border-top:3px solid var(--lime);border-radius:10px 0 0 0}.scan-frame i:nth-child(2){right:0;top:0;border-right:3px solid var(--lime);border-top:3px solid var(--lime);border-radius:0 10px 0 0}.scan-frame i:nth-child(3){left:0;bottom:0;border-left:3px solid var(--lime);border-bottom:3px solid var(--lime);border-radius:0 0 0 10px}.scan-frame i:nth-child(4){right:0;bottom:0;border-right:3px solid var(--lime);border-bottom:3px solid var(--lime);border-radius:0 0 10px 0}.scan-frame span { position:absolute;left:5px;right:5px;top:12%;height:2px;background:linear-gradient(90deg,transparent,var(--lime),transparent);box-shadow:0 0 10px var(--lime);animation:scan 2.2s ease-in-out infinite}@keyframes scan{50%{top:86%}}
.scan-status { min-height: 18px; margin: 12px 0; color: var(--muted); text-align: center; font-size: 11px; }.primary-button { width: 100%; padding: 15px; border: 0; border-radius: 16px; color: white; background: var(--green-dark); font-weight: 800; box-shadow: 0 9px 20px rgba(52,76,61,.18); }.primary-button:disabled { opacity: .55; }.text-button { width: 100%; padding: 13px; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 700; }
.cart-items { display: grid; gap: 10px; margin: 17px 0; }.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 13px; border-radius: 16px; background: #f4f1e9; }.cart-row h3 { margin: 0 0 4px; font-size: 14px; }.cart-row p { margin: 0; color: var(--muted); font-size: 10px; }.quantity { display: flex; align-items: center; gap: 10px; }.quantity button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 9px; background: white; }.cart-summary { display: flex; justify-content: space-between; align-items: center; margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); }.cart-summary strong { font-size: 23px; }
.toast { position: fixed; z-index: 100; left: 50%; top: calc(22px + env(safe-area-inset-top)); transform: translate(-50%,-20px); max-width: calc(100% - 36px); padding: 11px 17px; border-radius: 13px; color: white; background: #243128; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }.toast.show { transform: translate(-50%,0); opacity: 1; }
body.modal-open { overflow: hidden; }
@media (min-width: 600px) { .app-shell { box-shadow: 0 0 80px rgba(36,49,40,.12); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; } }
