:root {
  --ink: #1b2559;
  --ink-2: #4a5478;
  --muted: #7d86a5;
  --line: #e5e1e8;
  --paper: #fffdfd;
  --cream: #f8f3f5;
  --gold: #c2185b;
  --gold-dark: #9e1449;
  --teal: #1b2559;
  --teal-soft: #f7e8ee;
  --green: #2f7a5a;
  --red: #b3493f;
  --shadow: 0 18px 50px rgba(31, 45, 48, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; }
p { margin: 0 0 12px; }
ul { margin: 0; padding-left: 18px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--teal); background: var(--teal); color: #fff;
  font-weight: 600; font-size: 14px; transition: .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(24,59,67,.18); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary { background: transparent; color: var(--teal); }
.btn.secondary:hover { background: var(--teal-soft); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.danger { background: transparent; border-color: #e2c4c0; color: var(--red); }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 12px; }
.btn.full { width: 100%; }
.lang-select { width: auto; min-width: 104px; padding: 7px 10px; border-radius: 999px; font-size: 12px; background: #fff; }
.shop-head .lang-select, .lp-cta .lang-select { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.shop-head .lang-select option, .lp-cta .lang-select option { color: var(--ink); }

label { display: block; font-size: 12px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(194,135,61,.12); }
textarea { resize: vertical; min-height: 84px; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; color: var(--ink-2); }
.tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--cream); color: var(--ink-2); font-size: 11px; font-weight: 650; }
.tag.ok { background: #e6f3ec; color: var(--green); }
.tag.warn { background: #fbf0dd; color: var(--gold-dark); }
.tag.bad { background: #f8e6e4; color: var(--red); }

/* ---------- Landing page ---------- */
.lp-head { position: sticky; top: 0; z-index: 20; background: rgba(255,253,249,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.lp-head-in { max-width: 1180px; margin: auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand small { display: block; font-size: 10px; letter-spacing: .18em; color: var(--muted); font-weight: 600; }
.lp-nav { display: flex; gap: 22px; font-size: 13px; color: var(--ink-2); }
.lp-nav button { border: 0; background: none; padding: 4px 0; color: inherit; }
.lp-nav button:hover { color: var(--gold-dark); }
.lp-wrap { max-width: 1180px; margin: auto; padding: 0 24px; }
.lp-hero { padding: 72px 0 52px; background: radial-gradient(circle at 78% 30%, #f9e2ea 0, transparent 42%), linear-gradient(180deg, #fffdfd, #f8f3f5); border-bottom: 1px solid var(--line); }
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.lp-logo { width: 64px; height: 64px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; margin-bottom: 18px; overflow: hidden; }
.lp-logo img { width: 86%; height: 86%; object-fit: contain; }
.lp-badge { display: inline-block; padding: 6px 12px; border: 1px solid #efd2dd; border-radius: 999px; background: #fff5f8; color: var(--gold-dark); font-size: 12px; font-weight: 650; margin-bottom: 20px; }
.lp-hero h1 { font-size: clamp(38px, 5vw, 62px); line-height: 1.06; }
.lp-hero h1 em { font-style: normal; color: var(--gold); }
.lp-lead { margin-top: 20px; max-width: 560px; font-size: 17px; color: var(--ink-2); }
.lp-hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.lp-points { display: flex; gap: 24px; margin-top: 34px; flex-wrap: wrap; }
.lp-points div { font-size: 13px; color: var(--ink-2); }
.lp-points b { display: block; font-size: 22px; color: var(--ink); }
.lp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 44px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.lp-stats div { padding: 20px 26px; border-right: 1px solid var(--line); }
.lp-stats div:last-child { border-right: 0; }
.lp-stats span { display: block; font-size: 12px; color: var(--muted); }
.lp-stats b { display: block; font-size: 24px; margin-top: 4px; color: var(--ink); }
.lp-hero-art { position: relative; min-height: 360px; }
.hero-orbit { position: absolute; inset: 10px 0 0 20px; background: #f7dce6; border-radius: 46% 54% 52% 48%; }
.hero-bottles { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; }
.hero-bottles svg { filter: drop-shadow(0 18px 18px rgba(27,37,89,.18)); }
.hero-bottles svg:nth-child(2) { transform: translateY(-32px) scale(1.06); z-index: 2; }
.hero-bottles svg:nth-child(3) { transform: translateY(16px); }
.hero-note { position: absolute; right: 2px; bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 12px; color: var(--ink-2); }
.hero-note b { display: block; color: var(--gold-dark); font-size: 15px; }
.lp-section { padding: 74px 0; }
.lp-section.alt { background: var(--cream); border-block: 1px solid var(--line); }
.lp-section h2 { font-size: clamp(26px, 3vw, 36px); }
.lp-sub { margin: 10px 0 30px; color: var(--ink-2); max-width: 660px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card-lp { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 6px 24px rgba(31,45,48,.04); }
.card-lp.featured { border-color: #f0c6d6; background: linear-gradient(160deg, #fff, #fff5f8); }
.card-lp h3 { font-size: 22px; }
.card-lp .kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); font-weight: 700; margin-bottom: 10px; }
.card-lp ul { color: var(--ink-2); font-size: 14px; margin: 18px 0 24px; }
.card-lp li { margin-bottom: 8px; }
.card-lp .price { font-size: 26px; color: var(--teal); font-weight: 700; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px; }
.step i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.step b { font-size: 14px; }
.step p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.faq { max-width: 780px; margin: auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item button { width: 100%; display: flex; justify-content: space-between; padding: 18px 0; background: none; border: 0; text-align: left; font-weight: 600; color: var(--ink); }
.faq-item p { color: var(--ink-2); padding-bottom: 16px; }
.lp-cta { padding: 64px 0; background: var(--teal); color: #fff; text-align: center; }
.lp-cta h2 { font-size: 32px; }
.lp-cta p { color: #e6d6df; margin: 12px 0 24px; }
.lp-cta .btn.secondary { color: #fff; border-color: rgba(255,255,255,.5); }
.lp-foot { padding: 26px 0; background: #171f4c; color: #c8cce0; font-size: 12px; }
.lp-foot .lp-wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Shop ---------- */
.shop-head { background: var(--teal); color: #fff; padding: 26px 0; }
.shop-head .lp-wrap { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.shop-head h1 { font-size: 28px; }
.shop-head p { color: #e4d6de; font-size: 13px; margin: 4px 0 0; }
.ref-pill { padding: 8px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: 12px; }
.shop-grid { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; padding: 36px 0 70px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.product-art { height: 150px; background: #fdf1f5; display: grid; place-items: center; }
.product-body { padding: 16px; }
.product-body h3 { font-size: 15px; min-height: 40px; }
.product-body .sku { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.product-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.product-foot b { color: var(--teal); font-size: 18px; }
.cart-panel { position: sticky; top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.cart-panel h3 { margin-bottom: 14px; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.cart-line input { width: 58px; padding: 5px; text-align: center; }
.cart-total { display: flex; justify-content: space-between; margin: 16px 0; font-size: 17px; font-weight: 700; }
.pay-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- App shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; background: #fbfaf7; }
.side { background: var(--teal); color: #dbe7e7; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; }
.side .brand { color: #fff; padding: 0 8px; }
.side .brand small { color: #94aeae; }
.nav-group-label { font-size: 10px; letter-spacing: .16em; color: #8fa7a7; text-transform: uppercase; padding: 0 12px; margin-bottom: 8px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: #d5e2e2; text-align: left; font-size: 13px; }
.side-nav button:hover { background: rgba(255,255,255,.08); }
.side-nav button.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 650; }
.side-nav a { display: flex; align-items: center; width: 100%; padding: 9px 12px; border-radius: 10px; color: #d5e2e2; font-size: 13px; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-foot { margin-top: auto; font-size: 11px; color: #8fa7a7; padding: 0 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 66px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; gap: 14px; }
.topbar h2 { font-size: 17px; }
.topbar .who { font-size: 12px; color: var(--ink-2); }
.account-wrap { position: relative; display: flex; align-items: center; }
.account-trigger { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 10px; border: 0; border-radius: 999px; background: transparent; }
.account-trigger:hover { background: var(--cream); }
.account-trigger .who { white-space: nowrap; }
.account-trigger .who span { color: var(--muted); }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--teal); display: grid; place-items: center; }
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.account-pop { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: 310px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 60px rgba(12,28,32,.18); }
.account-pop::before { content: ''; position: absolute; top: -6px; right: 18px; width: 10px; height: 10px; background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.account-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.account-mark { width: 42px; height: 42px; flex: none; border-radius: 12px; overflow: hidden; background: var(--teal); }
.account-mark img { width: 100%; height: 100%; display: block; }
.account-email { font-size: 13px; font-weight: 650; word-break: break-all; line-height: 1.4; }
.account-head .sub { font-size: 12px; color: var(--muted); }
.account-info { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.account-info > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 1.5; }
.account-info span { color: var(--muted); flex: none; }
.account-info b { font-weight: 650; text-align: right; word-break: break-all; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.account-actions .btn { flex: 1 1 auto; }
.account-pwd { display: grid; gap: 10px; padding-top: 12px; }
.account-pwd label { margin: 0 0 4px; }
.account-pwd input { width: 100%; }
.account-pwd .inline .btn { flex: 1 1 auto; }
.content { padding: 26px 28px 60px; max-width: 1240px; width: 100%; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 18px; }
.panel h3 { margin-bottom: 6px; font-size: 18px; }
.panel .hint { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat b { display: block; font-size: 26px; margin-top: 4px; }
.stat.gold b { color: var(--gold-dark); }
.funnel { display: grid; gap: 14px; margin-bottom: 14px; }
.funnel-row { display: grid; grid-template-columns: 62px 1fr 44px; align-items: center; gap: 10px; font-size: 12px; }
.funnel-row > span { color: var(--ink-2); }
.funnel-row > b { text-align: right; }
.funnel-track { height: 10px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.funnel-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--teal)); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid #f0ece6; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td select, td input { padding: 6px 8px; font-size: 12px; }
.empty { padding: 32px; text-align: center; color: var(--muted); font-size: 13px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input { max-width: 300px; }
.modal-mask { position: fixed; inset: 0; z-index: 50; background: rgba(12,28,32,.55); display: grid; place-items: center; padding: 20px; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); border-radius: 20px; padding: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-head h3 { font-size: 22px; }
.modal-close { border: 0; background: var(--cream); border-radius: 50%; width: 30px; height: 30px; font-size: 18px; line-height: 1; color: var(--ink-2); }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); font-size: 13px; margin-bottom: 16px; }
.notice.warn { background: #fbf0dd; color: var(--gold-dark); }
.mail-body { width: 100%; min-height: 250px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: #fff; }
.wallet-hero { background: linear-gradient(135deg, #173b43, #245861); color: #fff; border-radius: 18px; padding: 26px; margin-bottom: 18px; }
.wallet-hero span { font-size: 12px; color: #bcd0d1; }
.wallet-hero b { display: block; font-size: 38px; margin: 4px 0 10px; }
.link-box { display: flex; gap: 8px; align-items: center; background: #f6f2ea; border: 1px dashed #d9cbb7; border-radius: 10px; padding: 10px 12px; }
.link-box input { border: 0; background: transparent; padding: 4px; }
.product-mini { display: flex; align-items: center; gap: 10px; }
.product-mini svg { flex: none; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); max-width: 420px; }
.toast.err { background: var(--red); }

@media (max-width: 1000px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-hero-art { min-height: 300px; }
  .cards3, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .shop-grid { grid-template-columns: 1fr; }
  .cart-panel { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .lp-nav { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { padding: 14px; }
  .side-nav { flex-direction: row; overflow-x: auto; }
  .side-nav button { white-space: nowrap; }
  .side-foot { display: none; }
  .content { padding: 18px 14px 50px; }
  .topbar { padding: 0 14px; }
  .account-trigger .who { display: none; }
  .account-pop { width: min(310px, calc(100vw - 28px)); }
  .cards2, .cards3, .product-grid, .grid2, .grid3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
