* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

body.claim-page,
body.voucher-page {
  background:
    radial-gradient(ellipse at top, rgba(212, 160, 23, 0.14), transparent 55%),
    radial-gradient(ellipse at bottom, rgba(212, 160, 23, 0.08), transparent 55%),
    #070707;
  color: #f5e6b8;
}

.claim-wrap,
.voucher-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.claim-step[hidden] {
  display: none !important;
}

.pick-header {
  margin-bottom: 20px;
  text-align: center;
}

.pick-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffe08a;
}

.pick-desc {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 236, 190, 0.62);
}

.merchant-meta {
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 236, 190, 0.55);
  text-align: center;
}

.merchant-meta[hidden] {
  display: none !important;
}

.pick-phone {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 236, 190, 0.55);
}

.service-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.service-pick[hidden] {
  display: none !important;
}

.service-pick--count-1 {
  grid-template-columns: 1fr;
}

.service-pick--count-2 {
  grid-template-columns: 1fr 1fr;
}

.service-pick--count-3 {
  grid-template-columns: 1fr 1fr;
}

.service-pick--count-3 .service-pick-card:last-child {
  grid-column: 1 / -1;
}

.service-pick--count-4 {
  grid-template-columns: 1fr 1fr;
}

.service-pick-card[hidden] {
  display: none !important;
}

.service-pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 2px solid rgba(255, 215, 100, 0.18);
  border-radius: 18px;
  background: rgba(255, 215, 100, 0.05);
  color: rgba(255, 236, 190, 0.82);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.service-pick-card strong {
  font-size: 1rem;
  color: #ffe08a;
}

.service-pick-card span:last-child {
  font-size: 0.78rem;
  color: rgba(255, 236, 190, 0.52);
  text-align: center;
  line-height: 1.4;
}

.service-pick-icon {
  font-size: 1.6rem;
}

.service-pick-card.is-active {
  border-color: rgba(255, 215, 100, 0.65);
  background: rgba(255, 215, 100, 0.12);
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.15);
}

.coupon-pick-list {
  display: grid;
  gap: 14px;
}

.coupon-pick-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 20px 18px 16px;
  background:
    linear-gradient(180deg, #121212, #0a0a0a 55%, #151515) padding-box,
    linear-gradient(180deg, #fff4c2, #ffd76a 35%, #b8860b 100%) border-box;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  color: inherit;
  font: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.coupon-pick-card:active {
  transform: scale(0.985);
}

.coupon-pick-discount {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(180deg, #fff4c2, #ffd76a 35%, #d4a017 70%, #9a6b0a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.coupon-pick-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 236, 190, 0.88);
}

.coupon-pick-meta {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.coupon-pick-meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}

.coupon-pick-meta span {
  color: rgba(255, 236, 190, 0.5);
}

.coupon-pick-meta strong {
  color: rgba(255, 248, 220, 0.92);
  font-weight: 600;
}

.coupon-pick-action {
  display: block;
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 215, 100, 0.18);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffd76a;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: rgba(255, 236, 190, 0.72);
  font-size: 0.92rem;
  cursor: pointer;
}

.back-btn:active {
  color: #ffd76a;
}

.coupon-showcase {
  margin-bottom: 20px;
}

.coupon-card {
  position: relative;
  border: 3px solid transparent;
  border-radius: 24px;
  padding: 28px 22px 24px;
  background:
    linear-gradient(180deg, #121212, #0a0a0a 55%, #151515) padding-box,
    linear-gradient(180deg, #fff4c2, #ffd76a 35%, #b8860b 100%) border-box;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(212, 160, 23, 0.12);
  overflow: hidden;
}

.coupon-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 215, 100, 0.12), transparent 45%);
  pointer-events: none;
}

.coupon-card--compact {
  padding: 18px 16px;
  border-width: 2px;
}

.coupon-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 72px;
  height: 14px;
  transform: translateX(-50%);
  background: #070707;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 10px) 100%, 10px 100%);
}

.coupon-issuer {
  margin-top: 18px;
  padding: 16px 14px;
  border-radius: 14px;
  background: rgba(255, 215, 100, 0.08);
  border: 1px solid rgba(255, 215, 100, 0.28);
}

.coupon-issuer__label {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: rgba(255, 236, 190, 0.58);
}

.coupon-issuer__name {
  margin: 0 0 12px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 248, 220, 0.96);
  line-height: 1.5;
}

.coupon-issuer__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.coupon-issuer__meta li {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 8px;
  align-items: start;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(255, 236, 190, 0.72);
}

.coupon-issuer__meta span {
  color: rgba(255, 236, 190, 0.55);
}

.coupon-issuer__meta strong {
  font-weight: 600;
  color: rgba(255, 248, 220, 0.92);
  word-break: break-all;
}

.coupon-badge {
  margin: 0 0 12px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  background: linear-gradient(180deg, #fff4c2, #ffd76a 45%, #b8860b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.coupon-discount {
  margin: 0;
  text-align: center;
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff4c2, #ffd76a 35%, #d4a017 70%, #9a6b0a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.coupon-discount--sm {
  font-size: 1.55rem;
  margin-bottom: 8px;
}

.coupon-divider {
  position: relative;
  height: 2px;
  margin: 18px auto 16px;
  max-width: 78%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 100, 0.55) 20%, rgba(255, 236, 170, 0.95) 50%, rgba(255, 215, 100, 0.55) 80%, transparent);
}

.coupon-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 200, 0.95), rgba(255, 215, 100, 0.15) 70%, transparent);
}

.coupon-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 236, 190, 0.88);
}

.coupon-title--sm {
  margin: 0 0 10px;
  font-size: 1rem;
}

.coupon-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.coupon-meta li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 215, 100, 0.06);
  border: 1px solid rgba(255, 215, 100, 0.12);
}

.coupon-meta-label {
  flex: 0 0 auto;
  font-size: 0.88rem;
  color: rgba(255, 236, 190, 0.55);
}

.coupon-meta-value,
.coupon-meta strong {
  flex: 1 1 auto;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 248, 220, 0.94);
}

.coupon-meta--compact li {
  padding: 8px 10px;
}

.coupon-more {
  margin-top: 16px;
}

.coupon-more-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: rgba(255, 236, 190, 0.55);
  letter-spacing: 0.08em;
}

.coupon-more-list {
  display: grid;
  gap: 12px;
}

.claim-panel {
  border: 2px solid rgba(255, 215, 100, 0.28);
  border-radius: 18px;
  padding: 20px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 215, 100, 0.08), rgba(7, 7, 7, 0.35));
}

.claim-panel-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #ffe08a;
}

.claim-panel-desc {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 236, 190, 0.72);
}

.claim-panel-desc strong {
  color: #ffd76a;
}

.claim-panel label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: rgba(255, 236, 190, 0.72);
}

.claim-panel input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 215, 100, 0.22);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.35);
  color: #fff8dc;
}

.claim-panel input::placeholder {
  color: rgba(255, 236, 190, 0.35);
}

.claim-panel input:focus {
  outline: none;
  border-color: rgba(255, 215, 100, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 215, 100, 0.12);
}

.claim-panel button {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffd76a, #b8860b);
  color: #1a1200;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.25);
}

.claim-panel button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.claim-panel button:active:not(:disabled) {
  transform: translateY(1px);
}

.claim-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 236, 190, 0.42);
}

.error {
  color: #fca5a5;
  margin-top: 12px;
  font-size: 0.92rem;
}

body.voucher-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body.voucher-page .voucher-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

body.voucher-page .voucher-canvas-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
}

body.voucher-page canvas {
  display: block;
  flex-shrink: 0;
  border-radius: 0;
  box-shadow: none;
  background: #070707;
}

body.voucher-page .voucher-foot {
  flex-shrink: 0;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(7, 7, 7, 0.95), #070707);
  border-top: 1px solid rgba(255, 215, 100, 0.15);
}

body.voucher-page .voucher-shot-tip {
  flex-shrink: 0;
  margin: calc(6px + env(safe-area-inset-top, 0px)) 10px 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 100, 0.75);
  background: rgba(255, 215, 100, 0.16);
  text-align: left;
  color: #ffe9a8;
}

body.voucher-page .voucher-shot-tip strong {
  display: block;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: #ffd76a;
  word-break: break-word;
}

body.voucher-page .voucher-shot-tip span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 236, 190, 0.88);
}

body.voucher-page .save-tip-foot {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(255, 236, 190, 0.62);
}

body.voucher-page .voucher-back-btn {
  display: block;
  width: 100%;
  margin-bottom: 0;
  padding: 11px 10px;
  border: 2px solid rgba(255, 215, 100, 0.55);
  border-radius: 12px;
  background: rgba(255, 215, 100, 0.12);
  color: #ffd76a;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

body.voucher-page .voucher-back-btn:active {
  background: rgba(255, 215, 100, 0.2);
}

body.voucher-page .voucher-foot button {
  display: none;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.actions button {
  flex: 1;
}

body.voucher-page .actions button {
  background: linear-gradient(180deg, #ffd76a, #b8860b);
  color: #1a1200;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.25);
}

body.voucher-page .actions button:active {
  transform: translateY(1px);
}

/* ===== VIP 名片（OCR 优化：Live Text / Lens / 智慧视觉） ===== */
/* OCR-1: 无衬线黑体；OCR-5: 纯白底黑字，去掉渐变/磨砂/文字特效 */
body.vip-mode.claim-page {
  background: #ffffff !important;
  color: #111111;
}

body.vip-mode .claim-wrap {
  max-width: 480px;
  /* OCR-4: 四周安全边距 */
  padding:
    calc(24px + env(safe-area-inset-top, 0px))
    calc(20px + env(safe-area-inset-right, 0px))
    calc(24px + env(safe-area-inset-bottom, 0px))
    calc(20px + env(safe-area-inset-left, 0px));
}

body.vip-mode,
body.vip-mode .vip-card,
body.vip-mode .vip-card * {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif !important;
  font-style: normal !important;
  text-shadow: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  writing-mode: horizontal-tb !important;
}

.vip-card[hidden] {
  display: none !important;
}

.vip-card {
  position: relative;
  overflow: visible;
  margin: 0;
  padding: 0;
  border-radius: 0;
  border: 1px solid #dddddd;
  background: #ffffff;
  color: #111111;
}

.vip-card::before {
  display: none !important;
}

/* OCR-2: 纯色橙头部，无渐变；域名/地址/电话高对比加粗 */
.vip-card__head {
  padding: 18px 16px;
  background: #ea580c;
  color: #ffffff;
  text-align: left;
}

.vip-card__name {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.35;
  color: #ffffff;
  text-align: center;
  word-break: break-word;
}

/* OCR：中文标签 + 全角冒号「：」+ 内容，单行独立；加大行距便于分行识别 */
.vip-card__ocr-line {
  display: block;
  margin: 0 0 14px;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.75;
  text-align: left;
  color: #ffffff;
  word-break: break-word;
}

.vip-card__ocr-line:last-child {
  margin-bottom: 0;
}

.vip-card__ocr-line[hidden] {
  display: none !important;
}

/* 名片：邮箱/地址比域名行小 */
#vip-email-row,
#vip-address-row {
  font-size: 0.85rem !important;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.06em;
  word-break: break-all;
}

/* 名片：punycode URL 强制单行；字号由 JS 按可用宽度缩放（覆盖 .ocr-num 默认字距） */
#vip-domain-punycode-row {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.08em !important;
  white-space: nowrap;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: normal;
}

#vip-domain-punycode-row .vip-card__link--puny {
  display: inline;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  letter-spacing: inherit;
}

.vip-card__link {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: inherit;
  word-break: break-all;
}

.vip-card__link:active {
  opacity: 0.85;
}

.merchant-tel {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.coupon-issuer__meta .merchant-tel {
  color: #111827;
}

body.voucher-page .voucher-service-phone {
  margin: 0 0 10px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8e7b0;
}

body.voucher-page .voucher-service-phone .merchant-tel {
  color: #ffe9a8;
}

/* OCR-1: 数字/电话/域名加宽字距 */
.ocr-num {
  letter-spacing: 0.12em !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.vip-card__body {
  padding: 18px 16px;
  background: #ffffff;
  text-align: left;
}

.vip-domain-list {
  display: grid;
  gap: 16px;
}

.vip-domain-empty {
  margin: 0;
  padding: 12px 0;
  background: none;
  color: #333333;
  text-align: left;
  font-size: 0.95rem;
}

.vip-domain-item {
  display: flex;
  justify-content: center;
  padding: 16px 0;
  border-radius: 0;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eeeeee;
}

.vip-domain-item:last-child {
  border-bottom: 0;
}

.vip-domain-item.is-inactive {
  opacity: 0.7;
}

.vip-domain-item__qr {
  text-align: center;
}

.vip-domain-item__qr canvas {
  display: block;
  width: 148px;
  height: 148px;
  margin: 0 auto 8px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #dddddd;
  box-shadow: none;
}

.vip-domain-item__qr span {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111111;
  letter-spacing: 0.04em;
  text-align: center;
}

.vip-card__shot-tip {
  margin: 18px 0 0;
  padding: 12px 0 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid #eeeeee;
  background: none;
  color: #333333;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: left;
}

/* 滑块人机验证（防机器人） */
.slider-captcha {
  margin: 0 0 14px;
  touch-action: pan-x;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.slider-captcha-label { margin: 0 0 6px; font-size: 13px; color: #666; }
.slider-captcha-tip {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #b45309;
}
.slider-track {
  position: relative;
  height: 42px;
  border-radius: 21px;
  background: #e8e8e8;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  /* pan-x：告知浏览器此区域只处理横向拖动（华为扫码 WebView 关键） */
  touch-action: pan-x;
  -webkit-touch-callout: none;
}
.slider-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #888;
  pointer-events: none;
}
.slider-track.slider-ok .slider-text { color: #fff; }
.slider-block {
  position: absolute;
  top: 2px;
  left: 0;
  width: 52px;
  height: 38px;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #409eff;
  cursor: grab;
  touch-action: pan-x;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.slider-track.slider-ok .slider-block { color: #2f9e44; cursor: default; }

/* 拖滑块时锁页（含华为扫码内置 WebView） */
html.slider-dragging,
html.slider-dragging body,
.claim-wrap.slider-dragging {
  overscroll-behavior: none;
  touch-action: none;
  overflow: hidden !important;
}
body.slider-dragging {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden !important;
}
