:root {
  --red: #c62828;
  --red-press: #b71c1c;
  --bg: #f2f2f2;
  --card: #fff;
  --text: #222;
  --muted: #888;
  --line: #e5e5e5;
  --nav-h: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
}

/* 顶栏 */
.top-bar {
  background: var(--red);
  color: #fff;
  padding: 12px 16px 14px;
}
.top-bar-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.top-bar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.balance-line {
  margin: 0;
  font-size: 14px;
  opacity: .95;
}
.balance-line strong {
  font-size: 18px;
  font-weight: 700;
  margin-left: 4px;
}

.dual-store-bar {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.dual-store-bar.hidden { display: none !important; }
.dual-store-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.dual-store-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.dual-store-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.95;
}
.dual-store-desc strong { font-weight: 700; }
.dual-store-stations {
  margin: 6px 0 0;
  font-size: 11px;
  opacity: 0.88;
  line-height: 1.45;
}

.dual-store-card .dual-store-card-lead { margin: 0 0 10px; font-size: 14px; line-height: 1.55; }
.dual-store-list {
  margin: 0 0 10px;
  padding-left: 1.15rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.dual-store-list li + li { margin-top: 6px; }

.main { padding: 12px 12px 8px; }

.panel { display: none; }
.panel.active { display: block; }

/* 说明 */
.notice {
  background: var(--card);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  border: 1px solid var(--line);
}
.notice p { margin: 0; }
.notice .games-hint { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.play-catalog-bar {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.45;
  opacity: .92;
}
.play-item { white-space: nowrap; }
.play-item-on { font-weight: 600; color: #fff; }
.play-item-off { opacity: .55; color: rgba(255,255,255,.85); }
.play-lock-tag {
  display: inline-block;
  margin-left: 2px;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  vertical-align: middle;
  background: rgba(255,255,255,.25);
  color: #fff;
}
.play-sep { opacity: .55; user-select: none; }
.notice .play-item-on { color: var(--text); }
.notice .play-item-off { color: var(--muted); }
.notice .play-lock-tag { background: #fee2e2; color: #b91c1c; }

.scan-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
.scan-mode {
  flex: 1;
  margin: 0;
  padding: 10px 6px;
  border: 0;
  border-radius: 0;
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.scan-mode + .scan-mode { border-left: 1px solid var(--line); }
.scan-mode.active {
  background: #fff5f5;
  color: var(--red);
  font-weight: 600;
}
.book-step-hint {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.scanner-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.scanner-modal.hidden { display: none !important; }
.scanner-panel {
  width: 100%;
  max-width: 360px;
  background: #111;
  border-radius: 12px;
  padding: 12px;
  color: #fff;
}
.scanner-hint {
  margin: 0 0 10px;
  text-align: center;
  font-size: 14px;
}
.scanner-view {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}
#scannerViewport {
  width: 100%;
  height: 100%;
  min-height: 260px;
}
#scannerViewport video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}
#scannerViewport #qr-shaded-region {
  border: none !important;
}
#scannerViewport img[alt="Info icon"] {
  display: none !important;
}
.scanner-frame {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 32%;
  height: 36%;
  border: 2px solid rgba(96, 165, 250, .92);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .38);
  pointer-events: none;
  overflow: hidden;
}
.scanner-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8 20%, #7dd3fc 50%, #38bdf8 80%, transparent);
  box-shadow: 0 0 10px rgba(56, 189, 248, .95), 0 0 20px rgba(56, 189, 248, .45);
  animation: scanner-sweep 2.4s ease-in-out infinite;
  will-change: top;
}
.scanner-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #bae6fd;
  letter-spacing: .12em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
  animation: scanner-pulse 1.6s ease-in-out infinite;
}
@keyframes scanner-sweep {
  0%, 100% { top: 6%; }
  50% { top: 90%; }
}
@keyframes scanner-pulse {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}
.scanner-subhint {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}
.scanner-torch {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8 !important;
}
.scanner-torch.is-on {
  color: #fbbf24 !important;
}
.scanner-album {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #60a5fa !important;
}
.scanner-close {
  width: 100%;
  margin-top: 10px;
  color: #ccc !important;
}

/* 按钮（扁平、无渐变） */
button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.btn-main {
  display: block;
  width: 100%;
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  padding: 11px 16px;
  min-height: 44px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-main:active { background: var(--red-press); border-color: var(--red-press); }
.btn-main:disabled {
  background: #e0e0e0;
  border-color: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}
.btn-main.inline { width: auto; flex: 1; }

.btn-text {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: none;
  color: #666;
  font-size: 14px;
  padding: 10px 8px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-text:active { color: #333; }
.scan-checkin-link-wrap {
  margin: 4px 0 0;
  text-align: center;
}
.scan-checkin-link { font-size: 14px; font-weight: 500; color: var(--red); }

.btn-wechat {
  width: 100%;
  border: 1px solid #06ae56;
  background: #07c160;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  padding: 11px 16px;
  min-height: 44px;
  border-radius: 3px;
  margin-bottom: 12px;
  cursor: pointer;
}
.btn-wechat:active { background: #06ae56; }

.btn-ghost {
  border: 1px solid #ccc;
  background: #fff;
  color: #555;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  padding: 10px 14px;
  min-height: 40px;
  border-radius: 3px;
  cursor: pointer;
}
.btn-ghost:active { background: #f5f5f5; }

.scan-result {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px 14px;
  min-height: 72px;
  font-size: 14px;
  white-space: pre-wrap;
  color: #444;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
  padding: 6px 8px calc(6px + var(--safe-bottom));
  z-index: 40;
}
.nav-item {
  flex: 1;
  border: 0;
  border-radius: 10px;
  background: #f3f3f3;
  padding: 10px 4px 9px;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.2;
  transition: background .15s, color .15s;
}
.nav-item:active {
  transform: scale(.98);
}
.nav-item.active {
  color: #fff;
  font-weight: 700;
  background: var(--red);
  box-shadow: 0 2px 8px rgba(198, 40, 40, .35);
}

/* 礼品列表 */
.gift-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
}
.gift-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.gift-list li:last-child { border-bottom: 0; }
.gift-list li:active { background: #fafafa; }
.gift-cover {
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: #f0f0f0;
  flex-shrink: 0;
}
.gift-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #aaa;
}
.gift-info { flex: 1; min-width: 0; }
.gift-info strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}
.gift-info small { color: var(--red); font-size: 13px; }
.gift-info .need-points { color: #999; }
.gift-arrow { color: #ccc; font-size: 18px; }

/* 礼品详情 */
.gift-detail {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 60;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}
.gift-detail.hidden { display: none !important; }
.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 15px;
}
.detail-back {
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
}
.detail-back:active { background: #f5f5f5; }
.detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.detail-img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.gift-detail h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}
.detail-price {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--red);
}
.detail-price strong { font-size: 20px; }
.detail-block {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 14px;
}
.detail-block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.detail-block ul { margin: 0; padding-left: 18px; }
.detail-footer {
  padding: 12px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
}

/* 登录 / 我的 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 14px;
}
.section-card { margin-top: 10px; padding: 0; }
.section-title {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.input {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 15px;
  background: #fff;
}
.input:focus {
  outline: none;
  border-color: #ccc;
}
.form-split {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  margin: 0 0 10px;
}
.legal-tip {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: #aaa;
}
.legal-tip a { color: var(--red); text-decoration: none; }

.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 14px;
  margin-bottom: 10px;
}
.user-name { font-size: 16px; font-weight: 500; }

/* 我的 — 页面布局 */
.me-page { padding-bottom: 8px; }
.me-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 14px;
  margin-bottom: 10px;
}
.me-hero-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.me-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 22px;
}
.me-hero-text { min-width: 0; }
.me-name {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: #222;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-balance {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.me-balance strong { color: var(--red); font-size: 15px; font-weight: 600; }
.me-logout {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: #666;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}

.me-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.me-block.hidden { display: none !important; }
.me-block-accent { border-color: #ffe082; background: #fffef5; }
.me-block-label {
  margin: 0;
  padding: 10px 14px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.me-block-inner { padding: 8px 14px 12px; }
.me-block-inner .account-block { padding: 4px 0 0; }
.me-block-inner .account-block .input:last-of-type { margin-bottom: 0; }

.me-fold { padding: 0; }
.me-fold-head {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  list-style: none;
}
.me-fold-head::-webkit-details-marker { display: none; }
.me-fold-head::after {
  content: '›';
  float: right;
  color: #bbb;
  font-size: 18px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform .15s;
}
.me-fold[open] .me-fold-head::after { transform: rotate(-90deg); }
.me-fold-body {
  padding: 0 14px 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
}
.me-fold-body .dual-store-card-lead { margin: 0 0 8px; font-size: 13px; }
.me-fold-body .dual-store-list { margin: 0; padding-left: 18px; font-size: 13px; }

.me-menu-list { display: flex; flex-direction: column; }
.me-menu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 0;
  border: none;
  border-top: 1px solid #f0f0f0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.me-menu-list .me-menu-row:first-child { border-top: 0; padding-top: 4px; }
.me-menu-icon { font-size: 18px; flex-shrink: 0; }
.me-menu-text { flex: 1; min-width: 0; }
.me-menu-text strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: #222;
}
.me-menu-text small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-menu-arrow { color: #ccc; font-size: 20px; flex-shrink: 0; }
.me-menu-points {
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
}
.me-shop-intro {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.me-referral { padding-top: 4px; }
.me-referral + .me-referral,
#shopContactCard + .me-referral { border-top: 1px solid #f0f0f0; margin-top: 4px; padding-top: 12px; }
.me-referral-hint { margin: 0 0 8px; font-size: 13px; color: #555; }
.me-referral-link-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
.me-referral-input {
  flex: 1;
  margin: 0 !important;
  font-size: 13px !important;
  padding: 9px 10px !important;
}
.me-referral-stats { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.me-service-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
}
#checkinPreviewCard.pro-preview-locked,
#referralCard.pro-preview-locked {
  padding: 4px 0 0;
}

.me-records { padding: 0; }
.me-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.me-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  position: relative;
}
.me-tab.active { color: var(--red); font-weight: 600; }
.me-tab.active::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px 2px 0 0;
}
.me-records .record-list { border: none; }
.me-records .record-list li:first-child { border-top: none; }

.record-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.record-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.record-list li:last-child { border-bottom: 0; }
.record-summary { flex: 1; min-width: 0; }
.record-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.delta-plus { color: #2e7d32; font-weight: 500; }
.delta-minus { color: var(--red); font-weight: 500; }
.empty-record {
  justify-content: center !important;
  color: #aaa;
  font-size: 13px;
  padding: 24px 14px !important;
}
.redeem-record-main strong {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
}
.redeem-record-main small { color: var(--muted); font-size: 12px; }
.status-badge {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: #666;
}
.status-badge.pending { border-color: #f0ad4e; color: #b8860b; }
.status-badge.fulfilled { border-color: #81c784; color: #2e7d32; }

.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px + var(--safe-bottom));
  transform: translateX(-50%);
  background: rgba(0,0,0,.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 1000;
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; }
.toast.ok { background: rgba(46,125,50,.9); }

/* 弹层（须高于 .login-gate 200，否则登录页点规则/声明看不见） */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal.hidden { display: none !important; }
.modal.modal-top {
  z-index: 550;
  align-items: center;
  padding: 16px;
}
.wechat-open-guide .btn-main {
  margin: 0 0 10px;
}
.wechat-open-guide .wechat-open-sub {
  margin-bottom: 12px;
}
.modal-sheet {
  background: var(--card);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 16px 14px calc(16px + var(--safe-bottom));
}
.modal-sheet h3 { margin: 0 0 8px; font-size: 17px; }
.modal-sub { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.label .input { margin-top: 4px; margin-bottom: 0; }
.delivery-pick {
  margin-bottom: 12px;
  font-size: 14px;
}
.delivery-pick label { margin-right: 16px; }
.modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.modal-btns .btn-ghost { flex: 1; }
.modal-btns .btn-main { margin: 0; }
.subhint { font-size: 12px; color: #aaa; margin: 4px 0 0; }
.rules-body { font-size: 14px; color: #555; line-height: 1.6; }
.rules-body p { margin: 0 0 10px; }
.rules-body a { color: var(--red); text-decoration: none; }
.rules-crosslink { margin-top: 4px; font-size: 13px; color: #888; }
.disclaimer-body p { margin-bottom: 12px; }
.modal-scroll { max-height: 80vh; }
.me-legal-footer {
  margin: 16px 0 4px;
  padding: 0 4px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
}
.me-legal-sep { margin: 0 6px; }
.link-text {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--red);
  cursor: pointer;
}
.checkin-legal { margin-top: 14px; }

.ticket-ocr-progress {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(4px);
}
.ticket-ocr-progress.hidden { display: none; }
.ticket-ocr-progress-box {
  width: 100%;
  max-width: 300px;
  padding: 1.15rem 1.2rem 1rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .22);
}
.ticket-ocr-progress-label {
  margin: 0 0 .75rem;
  font-size: .95rem;
  font-weight: 600;
  color: #222;
  text-align: center;
}
.ticket-ocr-progress-track {
  height: 9px;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}
.ticket-ocr-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e53935, var(--red));
  transition: width .35s ease;
}
.ticket-ocr-progress-track.is-waiting .ticket-ocr-progress-fill {
  background: linear-gradient(90deg, #e53935, #ef5350, var(--red), #ef5350, #e53935);
  background-size: 220% 100%;
  animation: ticket-ocr-shimmer 1.6s linear infinite;
}
@keyframes ticket-ocr-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
.ticket-ocr-progress-pct {
  margin: .5rem 0 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--red);
  text-align: center;
}
.ticket-ocr-progress-hint {
  margin: .4rem 0 0;
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.btn-main.is-busy,
.btn-text.is-busy {
  opacity: .55;
  pointer-events: none;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px calc(16px + var(--safe-bottom));
  background: var(--bg);
  overflow-y: auto;
}
.login-gate.hidden {
  display: none;
}
.login-gate-card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.login-gate-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}
.login-gate-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #fff8e1;
  border-radius: 10px;
  font-size: 13px;
  color: #8d6e00;
  line-height: 1.5;
}
.wechat-open-steps {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}
.wechat-open-steps li + li {
  margin-top: 6px;
}
.login-gate-msg {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #ffebee;
  border-radius: 10px;
  font-size: 13px;
  color: #c62828;
  line-height: 1.5;
}
.login-gate-msg.ok {
  background: #e8f5e9;
  color: #2e7d32;
}
body.gate-open .bottom-nav {
  display: none;
}

.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  max-width: 340px;
  margin: 0 auto;
}
.modal-actions {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}
.modal-actions .secondary { flex: 1; }

.account-card .account-block + .account-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}
.account-card.hidden { display: none; }
#accountSetupLinkRow.hidden { display: none; }
#accountSetupPhoneRow.hidden { display: none; }
.link-row-hint { margin-top: 4px; }
#redeemPhoneRow.redeem-phone-bound .input {
  background: #f5f5f5;
  color: #555;
}

.account-card .subhint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.account-card .input {
  margin-bottom: 8px;
}
.account-sms-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.account-sms-inline .input {
  flex: 1;
  margin-bottom: 0;
}
.btn-main.compact,
.btn-wechat.compact {
  width: auto;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  margin-top: 4px;
}
.btn-ghost.inline {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
}

.boot-error-banner {
  position: sticky;
  top: 0;
  z-index: 900;
  padding: 10px 14px;
  background: #fef2f2;
  color: #b91c1c;
  border-bottom: 1px solid #fecaca;
  font-size: 14px;
  text-align: center;
}

.account-setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff8e1;
  border-radius: 10px;
  border: 1px solid #ffe082;
}
.account-conflict-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #fff3e0;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #e65100;
}
.account-conflict-hint.hidden { display: none; }
.account-subtitle {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.account-setup-text {
  margin: 0;
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
  color: #8d6e00;
}
.account-setup-go {
  flex-shrink: 0;
  border: none;
  background: #fff;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.nav-item { position: relative; }
.nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 22px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffeb3b;
  box-shadow: 0 0 0 2px var(--red);
}
.nav-badge.hidden { display: none; }

.shop-contact-list { display: flex; flex-direction: column; gap: 16px; }
.shop-contact-item {
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
}
.shop-contact-item:first-child { border-top: 0; padding-top: 0; }
.shop-contact-name { margin: 0 0 6px; font-size: 15px; color: #222; }

.shop-wechat-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 8px;
}
.shop-contact-qr,
.shop-wechat-qr {
  width: min(72vw, 220px);
  height: auto;
  border-radius: 12px;
  border: 1px solid #eee;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  background: #fff;
}
.shop-wechat-sheet { text-align: center; max-width: 360px; }
.shop-wechat-sheet h3 { margin-bottom: 6px; }
.shop-wechat-scan-tip,
.shop-contact-tip {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.shop-wechat-qr { width: min(70vw, 240px); }

.pro-preview-locked {
  opacity: .92;
  border: 1px dashed #c7d2fe;
  background: linear-gradient(180deg, #fafafa 0%, #f5f3ff 100%);
}
.pro-preview-badge {
  display: inline-block;
  margin-bottom: .35rem;
  padding: .12rem .45rem;
  font-size: .6875rem;
  font-weight: 700;
  color: #4338ca;
  background: #eef2ff;
  border-radius: 999px;
}
.pro-preview-hook { margin: 0 0 .5rem; color: #475569; line-height: 1.5; font-size: .875rem; }
.pro-preview-stat {
  margin: 0 0 .65rem;
  padding: .4rem .5rem;
  background: #fef3c7;
  border-radius: 8px;
  font-size: .8125rem;
  color: #92400e;
  line-height: 1.45;
}
.pro-preview-stat-inline { color: #92400e; font-style: normal; font-weight: 600; }
.pro-preview-bullets {
  margin: 0 0 .65rem;
  padding-left: 1.1rem;
  color: #64748b;
  font-size: .8125rem;
  line-height: 1.45;
}
.pro-preview-member-hint { margin: 0; font-size: .8125rem; color: #94a3b8; }
.pro-preview-scan-notice { background: #f5f3ff; border-color: #c7d2fe; color: #4338ca; }
.scan-mode.pro-locked { opacity: .55; position: relative; }
.scan-mode.pro-locked::after {
  content: 'Pro';
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: #6366f1;
  border-radius: 999px;
  padding: 1px 4px;
  line-height: 1.2;
}
