/* 足小芽 H5 效果图 · 设计系统
   视觉对齐现有首页：深绿 #154B33 + 米色 + 金色 LOGO + 圆角卡片 */

/* 字体走系统栈（Noto / PingFang）；本地 fonts/ 未随仓库提供，避免 @font-face 404 */

:root {
  --green: #154B33;
  --green-deep: #0E3A26;
  --green-mid: #1D5C3E;
  --green-soft: #2A6B4A;
  --green-mist: #E7EFE8;
  --green-pale: #F1F5EE;
  --gold: #E8D48A;
  --gold-deep: #C7B06A;
  --gold-text: #8A6A1E;
  --cream: #F6F3E8;
  --cream-2: #FEFCF3;
  --cream-3: #EFEBD9;
  --page: #F4F1E4;
  --white: #FFFFFF;
  --text: #1C2B22;
  --text-2: #5C6B62;
  --text-3: #8A9388;
  --line: #E6E2D2;
  --danger: #C45C3A;
  --plus: #1D5C3E;
  --minus: #C45C3A;
  --shadow: 0 6px 20px rgba(21, 75, 51, 0.08);
  --shadow-sm: 0 2px 8px rgba(21, 75, 51, 0.06);
  --shadow-card: 0 8px 24px rgba(21, 75, 51, 0.12), 0 0 0 1px rgba(21, 75, 51, 0.08);
  --home-floor: #E3DFD2;
  --card-line: rgba(21, 75, 51, 0.1);
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --tab-h: 64px;
  --nav-h: 46px;
  --status-h: 0px;
  /* 真机状态栏 / 刘海区（需 viewport-fit=cover + iOS black-translucent） */
  --top-inset: constant(safe-area-inset-top);
  --top-inset: env(safe-area-inset-top, 0px);
  --safe-top: var(--top-inset);
  --safe-bottom: constant(safe-area-inset-bottom);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  font-family: "Noto Sans CJK SC", "ZXY Sans", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #d8d3c2;
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
ul, ol { list-style: none; }

.device {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--page);
  position: relative;
  overflow-x: hidden;
  box-shadow: none;
  padding-top: 0;
  padding-left: constant(safe-area-inset-left);
  padding-right: constant(safe-area-inset-right);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* 桌面 / 画廊预览：保留 375 画框 */
@media (min-width: 768px) {
  body:not(.gallery) {
    background: #d8d3c2;
  }
  body:not(.gallery) .device {
    width: 375px;
    max-width: 375px;
    margin-top: 16px;
    margin-bottom: 16px;
    min-height: calc(100vh - 32px);
    border-radius: 0;
    box-shadow: 0 0 0 1px rgba(21, 75, 51, 0.06), 0 16px 48px rgba(21, 75, 51, 0.16);
    padding-top: 0;
  }
}

@media (max-width: 767px) {
  body:not(.gallery) {
    background: var(--page);
  }
}

/* Status bar（效果图不再展示模拟 9:41 系统栏） */
.status {
  display: none !important;
}
.status.light { color: var(--text); background: var(--page); }
.status.light .sb-icon { color: var(--text); }
.status .time { width: 64px; }
.status .sb-icons { display: flex; align-items: center; gap: 6px; }
.sb-icon { width: 18px; height: 12px; display: inline-block; }

/* Nav */
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 8px 0 4px;
  background: var(--green);
  color: #fff;
  position: sticky;
  top: var(--status-h);
  z-index: 49;
}
.nav.light {
  background: var(--page);
  color: var(--text);
  border-bottom: 1px solid transparent;
}
.nav .back, .nav .nav-right, .nav .nav-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 44px;
}
.nav .title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.nav.home-nav {
  padding: var(--top-inset) 16px 0 16px;
  height: auto;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  border-bottom: none;
  box-shadow: none;
}
.home-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}
.nav.home-nav .home-search {
  flex: none;
  width: 100%;
  height: 36px;
  font-size: 13px;
  margin-bottom: 12px;
}
.nav.home-nav .nav-tools {
  flex-shrink: 0;
  gap: 4px;
}
.nav.home-nav .nav-icon {
  width: 40px;
  height: 40px;
}
body:not(.gallery) .device > .nav:first-child:not(.home-nav) {
  padding-top: var(--top-inset);
}
.logo-lockup { height: 32px; width: auto; flex: 0 0 auto; }
.logo-icon { width: 32px; height: 32px; object-fit: contain; }
.search {
  flex: 1;
  height: 34px;
  background: #F7F3E3;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--text-3);
  font-size: 13px;
}
.search svg { flex: 0 0 auto; opacity: .55; }
.nav-tools { display: flex; align-items: center; gap: 2px; color: #fff; }

/* Main */
.main {
  padding-bottom: calc(var(--tab-h) + 16px);
  min-height: calc(100vh - var(--status-h) - var(--nav-h));
}
.main.no-tab { padding-bottom: 28px; }
.main.green-head {
  /* content starts with cream overlapping green */
}

/* Tab bar */
.tabbar {
  position: sticky;
  bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  background: #FBF9F0;
  border-top: 1px solid rgba(21,75,51,.12);
  box-shadow: 0 -4px 16px rgba(21, 75, 51, 0.06);
  display: flex;
  z-index: 48;
  padding-bottom: calc(6px + var(--safe-bottom));
}

@media (max-width: 767px) {
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
  }
  body:not(.gallery) .main:not(.no-tab) {
    padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  }
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #8E968A;
  font-size: 11px;
  font-weight: 500;
}
.tabbar a.active { color: var(--green); font-weight: 650; }
.tabbar a svg { width: 22px; height: 22px; }

/* Cards & typography */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.section { padding: 0 16px; margin-top: 16px; }
.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-hd h2 { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.section-hd .more { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 2px; }

.serif { font-family: "Noto Serif CJK SC", "ZXY Serif", "Songti SC", serif; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 22px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .4px;
}
.btn.block { display: flex; width: 100%; }
.btn.lg { height: 48px; border-radius: 24px; font-size: 16px; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 15px; }
.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.75);
}
.btn.outline {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
}
.btn.gold { background: var(--gold); color: var(--green-deep); }
.btn.disabled, .btn[disabled] { opacity: .45; pointer-events: none; }

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--green-mist);
  color: var(--green);
}
.tag.gold { background: #F4EBC8; color: #8A6A1E; }
.tag.outline { background: transparent; border: 1px solid var(--green-soft); }
.tag.used { background: #EEECE3; color: #8A9388; }
.tag.warn { background: #FCEDE6; color: var(--danger); }

/* Lists */
.cell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
}
.cell + .cell { border-top: 1px solid var(--line); }
.cell .arrow { margin-left: auto; color: var(--text-3); }
.cell-title { font-size: 15px; font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.menu-group { overflow: hidden; border-radius: var(--radius); }

/* Stats */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.stat-row .num { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.stat-row .lab { font-size: 11px; color: var(--text-2); margin-top: 4px; }

/* Inputs */
.field {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
}
.field input, .field textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
}
.field input::placeholder, .field textarea::placeholder { color: #B0B6AE; }

/* Chips / filters */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 14px;
  border-radius: 15px;
  background: #fff;
  color: var(--text-2);
  font-size: 13px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
}
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(14, 40, 28, .92);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 99;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Amount */
.yen { font-family: "ZXY Sans", "Noto Sans CJK SC", sans-serif; font-weight: 700; }
.price { color: var(--gold-text); font-weight: 700; }
.price .yen-mark { font-size: .7em; margin-right: 1px; }

/* Hero */
.hero {
  margin: 0 16px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  background: linear-gradient(165deg, #FFFDF8 0%, #F7F2E6 52%, #F0EBDD 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 4px;
  min-height: 196px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--card-line);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 18px 8px 18px 16px;
  max-width: none;
}
.hero-copy h1 {
  font-family: "Noto Serif CJK SC", "ZXY Serif", "Noto Serif CJK SC", serif;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--green-deep);
  letter-spacing: 0.3px;
}
.hero-copy p {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
}
.hero-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hero-actions .btn.sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
}
.hero-ghost {
  color: var(--green) !important;
  border-color: var(--green) !important;
  background: #fff !important;
}
.hero-art {
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  max-height: 176px;
  height: auto;
  margin: 8px 4px 0 0;
  object-fit: contain;
  object-position: center bottom;
  z-index: 1;
  pointer-events: none;
}
.dots {
  display: flex; justify-content: center; gap: 5px; margin-top: 12px;
}
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #B8B0A0; display: block; }
.dots i.on { background: var(--green); width: 14px; border-radius: 3px; }

/* Selling points */
.points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 16px 0;
  padding: 14px 4px;
  text-align: center;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--card-line);
}
.points .pt {
  padding: 0 8px;
  position: relative;
}
.points .pt:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}
.points .pt svg { margin: 0 auto 6px; display: block; }
.points .pt strong { display: block; font-size: 13px; color: var(--green); font-weight: 700; line-height: 1.3; }
.points .pt span { display: block; font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 1.45; }

/* Icon grid */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 16px 12px 8px;
  text-align: center;
}
.icon-grid a { padding: 6px 0 10px; border-radius: 12px; transition: background 0.15s ease; }
.icon-grid a:active { background: rgba(21, 75, 51, 0.04); }
.icon-grid .ico {
  width: 46px; height: 46px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--card-line);
  box-shadow: 0 2px 6px rgba(21, 75, 51, 0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.icon-grid .lab { font-size: 12px; color: var(--text); line-height: 1.35; }

/* 首页排版 */
.device:has(.home-main) {
  background: var(--home-floor);
}
.home-main {
  padding-top: 0;
  background: var(--home-floor);
}
.home-top-deck {
  padding: 0 0 10px;
  background: var(--home-floor);
}
.home-block { margin-top: 20px; }
.home-block-last { margin-bottom: 8px; }
.home-main .section-hd h2 {
  position: relative;
  padding-left: 10px;
}
.home-main .section-hd h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--green);
}
.section-sub {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
  margin: -4px 16px 12px;
}
.home-main .icon-grid {
  margin: 14px 16px 0;
  padding: 12px 6px 10px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-line);
  box-shadow: var(--shadow-card);
  gap: 2px;
}
.home-main .pkg-scroll {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}
.home-main .pkg-card {
  scroll-snap-align: start;
  flex: 0 0 min(212px, 78vw);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--card-line);
}
.home-main .pkg-card.featured {
  border-color: rgba(232, 212, 138, 0.35);
  box-shadow: 0 10px 28px rgba(14, 40, 28, 0.28);
}
.home-main .prod-card {
  box-shadow: var(--shadow-card);
  border: 1px solid var(--card-line);
}
.home-main .prod-card .row .btn.sm {
  font-size: 11px;
  padding: 0 10px;
  min-height: 32px;
}
.home-main .scene-tabs a {
  border: 1px solid var(--card-line);
  box-shadow: 0 2px 8px rgba(21, 75, 51, 0.06);
  background: #fff;
}
.home-main .scene-tabs a.on {
  border-color: var(--green-soft);
  box-shadow: var(--shadow-card);
  background: #fff;
}

/* Product cards */
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prod-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
.prod-card .thumb {
  height: 110px;
  border-radius: 12px;
  background: var(--green-pale);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.prod-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-card h3 { font-size: 13px; font-weight: 700; line-height: 1.35; }
.prod-card .desc { font-size: 11px; color: var(--text-3); margin: 4px 0 8px; }
.prod-card .row { display: flex; align-items: center; justify-content: space-between; }

/* Scene tabs */
.scene-tabs { display: flex; gap: 8px; }
.scene-tabs a, .scene-tabs span {
  flex: 1;
  text-align: center;
  background: #fff;
  border-radius: 12px;
  padding: 11px 6px;
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid transparent;
  line-height: 1.35;
}
.scene-tabs a.on, .scene-tabs span.on {
  background: #fff;
  color: var(--green);
  font-weight: 700;
  border-color: var(--green-mist);
  box-shadow: var(--shadow-sm);
}

/* Package cards */
.pkg-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scrollbar-width: none;
}
.pkg-scroll::-webkit-scrollbar { display: none; }
.pkg-card {
  flex: 0 0 200px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.pkg-card.featured {
  background: linear-gradient(180deg, #1A553C 0%, #123E2A 100%);
  color: #fff;
}
.pkg-card .badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--gold);
  color: var(--green-deep);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 0 16px 0 10px;
}
.pkg-card .lvl { font-size: 12px; opacity: .8; }
.pkg-card h3 { font-size: 16px; font-weight: 700; margin: 2px 0 8px; }
.pkg-card .pkg-price { font-size: 22px; font-weight: 700; color: var(--gold-text); }
.pkg-card.featured .pkg-price { color: var(--gold); }
.pkg-card .pkg-price small { font-size: 12px; font-weight: 500; }
.pkg-card ul { margin: 8px 0 12px; }
.pkg-card li {
  font-size: 11px;
  color: var(--text-2);
  padding-left: 10px;
  position: relative;
  margin: 4px 0;
  line-height: 1.4;
}
.pkg-card.featured li { color: rgba(255,255,255,.82); }
.pkg-card li::before {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--green);
  position: absolute; left: 0; top: 6px;
}
.pkg-card.featured li::before { background: var(--gold); }

.pkg-list .pkg-row {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.pkg-row .mark {
  width: 64px; height: 64px; border-radius: 14px;
  background: var(--green);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 64px;
  font-size: 11px; font-weight: 700; text-align: center; line-height: 1.3;
  overflow: hidden;
}
.pkg-row .mark img { width: 100%; height: 100%; object-fit: cover; }
.pkg-row h3 { font-size: 16px; font-weight: 700; }
.pkg-row .meta { font-size: 12px; color: var(--text-2); margin: 3px 0 6px; }
.pkg-row .pkg-price { font-size: 18px; }

/* Profile header */
.mine-head {
  background: linear-gradient(180deg, var(--green) 0%, #1A553C 70%, var(--page) 100%);
  padding: calc(8px + var(--top-inset)) 16px 20px;
  color: #fff;
}
.user-row { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(232,212,138,.7);
  background: var(--green-mid);
}
.avatar.sm { width: 42px; height: 42px; border: 0; }
.user-row h3 { font-size: 18px; font-weight: 700; }
.user-row .invite { font-size: 12px; opacity: .85; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.copy-link {
  display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 10px; padding: 0 6px; height: 18px; font-size: 10px;
}

.white-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px 8px;
  margin-top: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* Wallet */
.wallet-hero {
  margin: 0 16px;
  background: linear-gradient(135deg, #123E2A 0%, #1D5C3E 55%, #2A6B4A 100%);
  border-radius: 20px;
  color: #fff;
  padding: 20px 18px 16px;
  position: relative;
  overflow: hidden;
}
.wallet-hero::after {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(232,212,138,.12);
}
.wallet-hero .lab { font-size: 12px; opacity: .8; }
.wallet-hero .big { font-size: 36px; font-weight: 700; letter-spacing: .5px; margin: 4px 0 12px; }
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 16px 0; }
.mini-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.mini-card .lab { font-size: 12px; color: var(--text-2); }
.mini-card .num { font-size: 20px; font-weight: 700; margin-top: 6px; }

/* Transaction list */
.tx { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx-ico {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--green-pale);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 38px;
}
.tx-body { flex: 1; min-width: 0; }
.tx-body .t { font-size: 14px; font-weight: 600; }
.tx-body .s { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.tx-amt { text-align: right; font-weight: 700; font-size: 15px; white-space: nowrap; }
.tx-amt.plus { color: var(--plus); }
.tx-amt.minus { color: var(--minus); }

/* Verify scanner */
.scanner {
  margin: 16px;
  background: #0A2418;
  border-radius: 20px;
  height: 280px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.scan-frame {
  width: 200px; height: 200px;
  border: 2px solid rgba(232,212,138,.85);
  border-radius: 16px;
  position: relative;
}
.scan-frame::before, .scan-frame::after {
  content: "";
  position: absolute; left: 16px; right: 16px; height: 2px;
  background: rgba(232,212,138,.9);
  animation: scan 2.2s ease-in-out infinite;
}
@keyframes scan {
  0% { top: 12px; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 184px; opacity: 0; }
}
.scan-tip {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.85); font-size: 12px;
}

/* Empty / notes */
.note {
  font-size: 12px;
  color: var(--text-2);
  background: var(--green-pale);
  border-radius: 12px;
  padding: 10px 12px;
  line-height: 1.6;
}
.note.warn { background: #F8F1E0; color: #7A5A20; }

/* Sticky bottom action */
.footer-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 10px 16px 16px;
  box-shadow: 0 -4px 16px rgba(21,75,51,.06);
  z-index: 40;
}

/* Misc */
.hr { height: 8px; background: transparent; }
.muted { color: var(--text-2); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.px16 { padding-left: 16px; padding-right: 16px; }
.py12 { padding-top: 12px; padding-bottom: 12px; }
.flex { display: flex; } .flex-1 { flex: 1; }
.between { display: flex; justify-content: space-between; align-items: center; }
.gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.hidden { display: none !important; }

.tabs-line {
  display: flex;
  background: var(--page);
  position: sticky;
  top: calc(var(--status-h) + var(--nav-h));
  z-index: 30;
  border-bottom: 1px solid var(--line);
}
.tabs-line a, .tabs-line button {
  flex: 1;
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-2);
  position: relative;
  background: transparent;
}
.tabs-line .on { color: var(--green); font-weight: 700; }
.tabs-line .on::after {
  content: "";
  position: absolute;
  left: 28%; right: 28%; bottom: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--green);
}

/* Code list */
.code-item {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin: 0 16px 10px;
  box-shadow: var(--shadow-sm);
}
.code-item .code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: .4px;
  font-weight: 700;
  word-break: break-all;
}

/* Date range */
.range-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  flex-wrap: wrap;
}

/* Activate */
.activate-box {
  margin: 16px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}
.activate-box input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  letter-spacing: 1px;
  background: var(--cream-2);
}

/* Package detail */
.pkg-hero {
  margin: 16px;
  background: linear-gradient(160deg, #123E2A, #1D5C3E);
  border-radius: 20px;
  color: #fff;
  padding: 22px 18px 18px;
  position: relative;
  overflow: hidden;
}
.pkg-hero .gate { font-size: 12px; opacity: .8; }
.pkg-hero h1 { font-size: 24px; margin: 4px 0 8px; }
.pkg-hero .sum { font-size: 28px; font-weight: 700; color: var(--gold); }
.benefit { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.benefit:last-child { border-bottom: 0; }
.benefit .n { width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; flex: 0 0 22px; margin-top: 1px; }
.benefit p { font-size: 13px; line-height: 1.55; }

/* Team user */
.user-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; }
.user-item + .user-item { border-top: 1px solid var(--line); }
.user-item .meta { flex: 1; min-width: 0; }
.user-item .name { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.user-item .sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* Safe helpers for SVG icons */
.ico-24 { width: 24px; height: 24px; }
.ico-18 { width: 18px; height: 18px; }

/* Index gallery (desktop) */
body.gallery {
  background: #0E2A1D;
  min-height: 100vh;
  color: #EFEAD6;
  font-family: "ZXY Sans", "Noto Sans CJK SC", sans-serif;
}
