/* C — Night Stall: mobile app shell + bottom tabs + compact list */
:root {
  --bg: #12100e;
  --panel: #1c1916;
  --ink: #f3ebe0;
  --muted: #a89884;
  --line: rgba(214,181,109,.22);
  --accent: #d7263d;
  --gold: #d6b56d;
  --ok: #3dbe74;
  --danger: #ff6b6b;
  --font: "Noto Sans TC", system-ui, sans-serif;
  --display: "ZCOOL XiaoWei", "Noto Sans TC", serif;
  --tab-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(215,38,61,.18), transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(214,181,109,.1), transparent 40%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.45;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.price-was { display: block; font-weight: 500; color: var(--muted); text-decoration: line-through; font-size: .72rem; }

.back-choose {
  position: fixed; z-index: 400;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  padding: 8px 12px; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-decoration: none;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px; border: 1px solid var(--gold);
  background: transparent; color: var(--ink); font-weight: 800; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; }
.icon-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; position: relative;
}
.cartbtn__count {
  position: absolute; top: 4px; right: 10px; min-width: 16px; height: 16px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .6rem; font-weight: 900;
  display: none; align-items: center; justify-content: center; padding: 0 4px;
}
.tabbar .cartbtn__count { top: 6px; right: 18px; }
.cartbtn__count.show { display: inline-flex; }

.app { min-height: 100vh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px); }

.appbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(18,16,14,.94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.appbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; gap: 10px;
}
.appbar__stamp {
  font-size: .68rem; letter-spacing: .18em; color: var(--gold); margin-bottom: 2px;
}
.logo {
  font-family: var(--display); font-size: 1.55rem; text-decoration: none; color: var(--ink); line-height: 1;
}
.appbar__actions { display: flex; gap: 8px; align-items: center; }

/* Compact promo strip — app banner, not landing hero */
.promo {
  position: relative; margin: 12px 12px 0; height: 148px;
  border: 1px solid var(--line); overflow: hidden; background: #0c0a09;
}
.promo__slides { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(18,16,14,.85), rgba(18,16,14,.15));
}
.promo__caption {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  display: grid; gap: 4px;
}
.promo__caption strong {
  font-family: var(--display); font-size: 1.35rem; color: var(--gold);
}
.promo__caption span { font-size: .8rem; color: #d8cbb8; max-width: 34ch; }
.promo__dots {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 5px; z-index: 2;
}
.promo__dots button {
  width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; position: relative; border-radius: 50%;
}
.promo__dots button::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px;
  transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255,255,255,.35);
}
.promo__dots button.is-active::after { background: var(--accent); }

.quick {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px;
  -webkit-overflow-scrolling: touch;
}
.quick__chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); padding: 8px 14px; min-height: 40px; font-size: .78rem; font-weight: 800;
  cursor: pointer; text-decoration: none;
}
.quick__chip.is-active, .quick__chip:hover { border-color: var(--accent); color: #fff; background: rgba(215,38,61,.25); }

.catalog, .sheet { padding: 8px 12px 20px; }
.section-head { margin-bottom: 10px; }
.section-head h2, .sheet__head h2 {
  font-family: var(--display); font-size: 1.55rem; color: var(--gold); margin-bottom: 4px;
}
.section-head p, .sheet__head p { color: var(--muted); font-size: .88rem; }
.section-kicker {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}

.cats {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 4px;
}
.cat {
  flex: 0 0 auto; border: 1px dashed var(--line); background: transparent; color: var(--muted);
  padding: 7px 12px; font-size: .75rem; font-weight: 700; cursor: pointer;
}
.cat.active { color: var(--ink); border-style: solid; border-color: var(--gold); }

.row-list { display: grid; gap: 8px; }
.row-item {
  display: grid; grid-template-columns: 76px 1fr; gap: 10px;
  padding: 10px; background: var(--panel); border: 1px solid var(--line);
  animation: pop .3s ease both;
}
.row-item__media {
  width: 76px; height: 76px; overflow: hidden; background: #0c0a09; border: 1px solid var(--line);
}
.row-item__top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.row-item__top h3 { font-size: .95rem; font-weight: 800; line-height: 1.2; }
.badge {
  flex: 0 0 auto; font-size: .62rem; font-weight: 800; letter-spacing: .04em;
  color: var(--gold); border: 1px solid var(--line); padding: 2px 6px; text-transform: uppercase;
}
.row-item__desc { color: var(--muted); font-size: .78rem; margin: 4px 0 8px; }
.row-item__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-size: 1.05rem; font-weight: 900; color: #fff; }
.add {
  border: 0; background: var(--accent); color: #fff; min-width: 64px; min-height: 36px;
  font-weight: 900; cursor: pointer; font-size: .75rem; padding: 0 10px;
}

.sheet {
  margin: 8px 12px 12px; background: var(--panel); border: 1px solid var(--line); padding: 18px 14px;
}
.membership__perks { list-style: none; display: grid; gap: 8px; margin: 14px 0; color: var(--muted); font-size: .9rem; }
.membership__perks li { padding-left: 12px; border-left: 2px solid var(--accent); }
.membership__summary {
  border: 1px solid var(--gold); padding: 12px; margin-bottom: 12px; display: grid; gap: 4px; color: var(--gold);
}
.payments__list {
  list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0;
}
.payments__list li {
  text-align: center; padding: 12px 8px; border: 1px solid var(--line);
  font-weight: 800; font-size: .85rem; color: var(--gold);
}
.payments__note { color: var(--muted); font-size: .84rem; }
.newsletter__form { display: grid; gap: 10px; margin-top: 12px; }
.newsletter__form input[type="email"] {
  border: 1px solid var(--line); background: #0c0a09; color: var(--ink); padding: 12px; min-height: 48px;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--muted); }
.form__error { color: var(--danger); font-size: .86rem; }
.newsletter__ok { color: var(--ok); font-size: .9rem; }

.site-footer {
  padding: 18px 16px 28px; color: var(--muted); font-size: .78rem; text-align: center;
}

/* Bottom app tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding: 6px 4px env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #0c0a09; border-top: 1px solid var(--line);
}
.tabbar__item {
  border: 0; background: transparent; color: var(--muted); text-decoration: none;
  display: grid; place-items: center; gap: 2px; font-size: .62rem; font-weight: 800;
  cursor: pointer; position: relative; min-height: 52px; padding: 4px 2px;
}
.tabbar__item.is-active, .tabbar__item:hover { color: var(--ink); }
.tabbar__item--wa { color: #25d366; }
.tabbar__ico { font-size: 1rem; line-height: 1; color: var(--gold); }
.tabbar__item--wa .tabbar__ico { color: #25d366; }

.agegate {
  position: fixed; inset: 0; z-index: 500; background: rgba(8,6,5,.94);
  display: grid; place-items: center; padding: 20px;
}
.agegate__panel {
  width: min(420px, 100%); background: var(--panel); border: 1px solid var(--gold);
  padding: 28px 20px; display: grid; gap: 12px;
}
.agegate__brand { font-family: var(--display); font-size: 1.7rem; color: var(--gold); }
.agegate__kicker { color: var(--accent); font-weight: 900; letter-spacing: .2em; }
.agegate h1 { font-size: 1.35rem; line-height: 1.2; }

.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 350;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; left: 0; right: 0; bottom: 0; height: min(78vh, 640px);
  background: var(--panel); border-top: 2px solid var(--gold); z-index: 360;
  transform: translateY(110%); transition: transform .25s ease;
  display: flex; flex-direction: column; padding: 16px;
  border-radius: 16px 16px 0 0;
}
.drawer.show { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer__head h2 { font-family: var(--display); color: var(--gold); }
.items { flex: 1; overflow: auto; display: grid; gap: 10px; align-content: start; }
.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; }
.item img { width: 56px; height: 56px; border: 1px solid var(--line); }
.item .info { display: grid; gap: 2px; font-size: .86rem; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 32px; height: 32px; border: 1px solid var(--line); background: #0c0a09; color: var(--ink); cursor: pointer; }
.total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 900; margin: 12px 0 6px; }
.cart-note { color: var(--muted); font-size: .8rem; margin-bottom: 10px; }
.checkout { width: 100%; }
.empty { color: var(--muted); padding: 24px 0; }

.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 420; display: grid; place-items: end center; padding: 0; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.modal__panel {
  position: relative; width: min(480px, 100%); background: var(--panel);
  border-top: 2px solid var(--gold); padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow: auto; border-radius: 16px 16px 0 0;
}
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal__head h2 { font-family: var(--display); color: var(--gold); }
.modal__lead { color: var(--muted); margin-bottom: 12px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: .86rem; font-weight: 700; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"] {
  border: 1px solid var(--line); background: #0c0a09; color: var(--ink); padding: 12px; min-height: 48px;
}
.member-card { border: 1px solid var(--gold); padding: 14px; margin-bottom: 12px; display: grid; gap: 6px; }
.notice { background: var(--accent); color: #fff; padding: 10px 14px; font-size: .86rem; text-align: center; }

@keyframes pop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Desktop: keep app feel, center phone-like column */
@media (min-width: 820px) {
  body {
    display: grid; place-items: start center;
    background: #070605;
  }
  .app {
    width: min(430px, 100%);
    min-height: 100vh;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: var(--bg);
  }
  .tabbar { width: min(430px, 100%); left: 50%; transform: translateX(-50%); }
  .drawer {
    width: min(430px, 100%); left: 50%; right: auto;
    transform: translateX(-50%) translateY(110%);
  }
  .drawer.show { transform: translateX(-50%) translateY(0); }
  .modal__panel { width: min(430px, 100%); }
}
