:root {
  color-scheme: light;
  --red: #e54b4b;
  --red-strong: #d6333d;
  --teal: #0e4d58;
  --ink: #17343c;
  --muted: #64777a;
  --beige: #f9f7f2;
  --line: #e5e2da;
  --soft-red: #fff1ef;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--beige);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.camera-open { overflow: hidden; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid #f2a0a0; outline-offset: 2px; }
.shell { width: min(100%, 560px); min-height: 100dvh; margin: 0 auto; padding: 0 18px max(30px, env(safe-area-inset-bottom)); }
.site-header {
  min-height: 78px;
  margin: 0 -18px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: 5px; min-width: 0; }
.brand-symbol { width: 46px; height: 46px; flex: none; object-fit: contain; }
.brand-wordmark { display: block; width: clamp(126px, 41vw, 180px); height: auto; flex: none; object-fit: contain; }
.flow-navigation { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: none; }
.nav-action {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid #d6e0de;
  border-radius: 8px;
  background: #fff;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-action:hover { border-color: var(--teal); background: #f3f8f8; }
.intro { position: relative; overflow: hidden; padding: 28px 4px 22px; }
.intro:after {
  content: "";
  position: absolute;
  width: 174px;
  height: 174px;
  right: -85px;
  top: -77px;
  border: 18px solid #e54b4b0b;
  border-radius: 50%;
  pointer-events: none;
}
.intro-label { display: flex; align-items: center; gap: 9px; color: var(--red-strong); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.intro-rule { width: 18px; height: 3px; border-radius: 4px; background: var(--red); }
.intro h1 { position: relative; z-index: 1; margin: 12px 0 8px; color: var(--teal); font-size: clamp(30px, 8vw, 38px); line-height: 1.18; letter-spacing: -.035em; font-weight: 850; }
.intro p { position: relative; z-index: 1; margin: 0; max-width: 430px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.journey {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.journey li { min-width: 0; display: flex; justify-content: center; align-items: center; gap: 5px; padding: 9px 3px; border-radius: 9px; color: #839092; font-size: 12px; font-weight: 650; white-space: nowrap; }
.journey li.is-current { background: var(--soft-red); color: var(--red-strong); }
.journey li.is-complete { color: var(--teal); }
.journey-number { font-size: 11px; font-weight: 900; letter-spacing: .02em; }
.card { margin: 0 0 16px; padding: 23px 22px 24px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 26px #183b4208; }
.card h2 { margin: 0 0 8px; color: var(--teal); font-size: 22px; line-height: 1.3; letter-spacing: -.02em; }
.section-lead { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.step { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--red-strong); font-size: 12px; font-weight: 800; letter-spacing: .07em; }
.step:before { content: ""; display: inline-block; width: 17px; height: 3px; background: var(--red); border-radius: 2px; }
label:not(.consent):not(.name-choice-option) { display: block; margin: 0 0 17px; color: var(--ink); font-size: 14px; font-weight: 750; }
input:not([type=checkbox]):not([type=radio]) {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid #ccd7d5;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:not([type=checkbox]):not([type=radio]):focus { border-color: var(--teal); box-shadow: 0 0 0 3px #0e4d581e; }
input:not([type=checkbox]):not([type=radio])::placeholder { color: #a1abad; }
input[readonly] { background: #f4f6f4; color: #617477; }
button:not(.shutter):not(.camera-close):not(.nav-action) {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
button:not(.shutter):not(.camera-close):not(.nav-action):hover { background: var(--red-strong); }
button:not(.shutter):not(.camera-close):not(.nav-action):active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: wait !important; }
button[type=submit], .full-width, #confirmPhoneButton, #redeemButton { width: 100%; }
button[type=submit] { margin-top: 8px; }
button.secondary:not(.nav-action) { background: #eff5f4; color: var(--teal); }
button.secondary:not(.nav-action):hover { background: #e3eeee; }
#editPhoneButton { margin-top: 10px; }
.confirm-phone { margin: 14px 0; padding: 16px 12px; border-radius: 10px; background: #f4f7f7; color: var(--teal); font-size: clamp(25px, 8vw, 34px); font-weight: 850; letter-spacing: .065em; text-align: center; font-variant-numeric: tabular-nums; }
.confirmed-phone { margin: 0 0 20px; padding: 10px 12px; border-radius: 8px; background: #f4f7f7; color: var(--muted); font-size: 13px; }
.confirmed-phone strong, .card .hint strong { color: var(--teal); font-weight: 800; }
.hint { margin: 10px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.name-choice-fieldset { margin: 16px 0; padding: 0; border: 0; }
.name-choice-fieldset legend { margin-bottom: 10px; color: var(--ink); font-size: 14px; font-weight: 750; }
.name-choice-list { display: grid; gap: 10px; }
.name-choice-option { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--teal); font-size: 17px; font-weight: 750; overflow-wrap: anywhere; }
.name-choice-option:has(input:checked) { border-color: var(--red); background: var(--soft-red); box-shadow: 0 0 0 1px var(--red); }
.name-choice-option input { flex: none; width: 19px; height: 19px; margin: 0; accent-color: var(--red); }
.photo-label { display: flex; justify-content: space-between; gap: 8px; margin: 5px 0 8px; font-size: 14px; font-weight: 750; }
.photo-label span { color: var(--muted); font-size: 12px; font-weight: 500; }
.preview-frame { height: min(96vw, 410px); min-height: 290px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px dashed #9eafb0; border-radius: 12px; background: #f4f8f7; }
.preview-frame img { width: 100%; height: 100%; object-fit: contain; }
#cameraPlaceholder { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 24px; color: var(--muted); font-size: 12px; text-align: center; }
#cameraPlaceholder strong { color: var(--teal); font-size: 14px; }
.placeholder-person { position: relative; display: block; width: 98px; height: 112px; margin-bottom: 12px; border: 2px dashed #a2b7b5; border-radius: 48px 48px 20px 20px; }
.placeholder-person:before { content: ""; position: absolute; left: 30px; top: 19px; width: 35px; height: 38px; border-radius: 50%; background: #dce9e7; }
.placeholder-person:after { content: ""; position: absolute; left: 15px; top: 62px; width: 64px; height: 37px; border-radius: 35px 35px 12px 12px; background: #dce9e7; }
.camera-entry { width: 100%; margin-top: 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 13px; color: #596d70; font-size: 12px; line-height: 1.65; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--red); }
.message { min-height: 1.3em; margin: 10px 0 0; color: #aa3740; font-size: 13px; line-height: 1.6; }
.message:empty { display: none; }
.qualification-ok { display: inline-block; margin: 3px 0 16px; padding: 7px 10px; border-radius: 100px; background: #eaf4ef; color: var(--teal); font-size: 12px; font-weight: 750; }
#redemptionCode { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.redemption-success { padding-top: 30px; border-color: #cfe4da; background: linear-gradient(155deg, #fff 55%, #f1f8f3); }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 24px; border-radius: 50%; background: #e7f5ed; color: #228057; font-size: 32px; font-weight: 850; line-height: 1; }
.redemption-success h2 { margin-bottom: 18px; font-size: clamp(28px, 8vw, 36px); }
.success-lead { margin: 0; color: var(--teal); font-size: clamp(18px, 5vw, 21px); font-weight: 750; line-height: 1.75; }
.pt-coupon { margin-top: 24px; padding-top: 22px; border-top: 1px solid #d5e6e1; }
.pt-coupon-kicker { margin: 0 0 6px; color: var(--red-strong); font-size: 12px; font-weight: 850; letter-spacing: .08em; }
.pt-coupon h3 { margin: 0; color: var(--teal); font-size: clamp(20px, 5.6vw, 25px); line-height: 1.45; }
.pt-coupon-description { margin: 7px 0 16px; color: var(--ink); font-size: 16px; font-weight: 750; }
.pt-coupon-image { display: block; width: 100%; height: auto; margin: 15px 0 17px; border: 1px solid #d7dfda; border-radius: 10px; background: #fff; box-shadow: 0 8px 20px #0e4d5812; }
.pt-coupon-actions { display: grid; gap: 10px; }
.pt-coupon-actions button { width: 100%; }
.pt-coupon-result > p:not(.pt-coupon-kicker) { margin: 8px 0 0; color: var(--ink); font-size: 15px; }
.success-support { margin: 24px 0 0; padding: 16px; border: 1px solid #d5e6e1; border-radius: 12px; background: #f2f8f6; color: var(--ink); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.success-support strong { color: var(--teal); font-size: 17px; user-select: all; -webkit-user-select: all; }
.success-close { margin: 22px 0 0; color: var(--muted); font-size: 12px; }
.result { border-left: 4px solid var(--red); }
.result.failed h2 { color: var(--red-strong); }
.result.passed h2 { color: var(--teal); }
.result-reasons { margin: 10px 0 0; padding-left: 1.2em; color: var(--ink); font-size: 14px; line-height: 1.6; }
.result-reasons:empty { display: none; }
.result-reasons li + li { margin-top: 7px; }
.support-help { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; margin: 16px 0 0; padding: 13px 14px; border: 1px solid #dce8e5; border-radius: 14px; background: #f0f6f5; }
.support-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #b7cfcb; border-radius: 50%; color: var(--teal); font-size: 19px; font-weight: 800; }
.support-help p { margin: 0; color: var(--teal); font-size: 12px; line-height: 1.55; }
.support-help strong, .dialog-support strong, .camera-support strong { font-weight: 850; user-select: all; -webkit-user-select: all; }
button#copySupportWechat { min-height: 36px; padding: 6px 10px; border: 1px solid #c6dbd7; border-radius: 8px; background: #fff; color: var(--teal); font-size: 12px; white-space: nowrap; }
button#copySupportWechat:hover { background: #e5f0ee; }
.support-help .support-copy-message { grid-column: 2 / -1; color: var(--teal); }
.support-copy-message:empty { display: none; }
.brand-footer { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 22px 0 6px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .03em; text-align: center; }
.brand-footer:before, .brand-footer:after { content: ""; width: 24px; height: 2px; background: var(--red); }
.footer-divider { width: 1px; height: 13px; background: var(--teal); opacity: .6; }
.exit-dialog { width: min(430px, calc(100% - 30px)); padding: 23px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); box-shadow: 0 20px 70px #12343c3d; }
.exit-dialog::backdrop { background: #0c292d9c; }
.exit-dialog h2 { margin: 0 0 8px; color: var(--teal); font-size: 21px; }
.exit-dialog p { color: var(--muted); font-size: 14px; }
.exit-actions { display: flex; gap: 10px; margin-top: 18px; }
.exit-actions button { flex: 1; }
.exit-dialog .dialog-support { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--teal); font-size: 12px; }
.hidden { display: none !important; }
.camera-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; background: #081c20; color: #fff; }
.camera-top { height: 78px; padding: max(12px, env(safe-area-inset-top)) 18px 10px; display: flex; align-items: center; gap: 14px; flex: none; }
.camera-top strong, .camera-top span { display: block; }
.camera-top strong { font-size: 17px; }
.camera-top span { color: #d2dfdc; font-size: 12px; }
.camera-close { width: 42px; height: 42px; padding: 0; flex: none; border: 1px solid #ffffff44; border-radius: 50%; background: #ffffff19; color: #fff; font-size: 30px; line-height: 1; }
.camera-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; overflow: hidden; background: #152a2f; }
.camera-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-stage:after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 95px #0009; }
.person-guide { position: relative; z-index: 1; width: min(88vw, 380px); height: min(82%, 530px); overflow: visible; fill: none; stroke: #fff; stroke-width: 3.5; stroke-dasharray: 9 9; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 5px #101c1b); pointer-events: none; }
.camera-guide-text { position: absolute; z-index: 2; right: 10px; bottom: 12px; left: 10px; margin: 0; color: #fff; font-size: 13px; text-align: center; text-shadow: 0 1px 5px #000; }
.camera-bottom { height: 158px; padding: 12px 10px max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; flex: none; }
.camera-bottom > span { color: #cedcda; font-size: 12px; }
.camera-support { margin: 3px 0 0; color: #cedcda; font-size: 11px; line-height: 1.35; text-align: center; }
.shutter { display: grid; place-items: center; width: 76px; height: 76px; padding: 6px; border: 4px solid #fff; border-radius: 50%; background: transparent; touch-action: manipulation; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--red); }
.shutter:active span { transform: scale(.88); transition: transform .12s; }
@media (max-width: 420px) {
  .site-header { min-height: 72px; }
  .brand-symbol { width: 42px; height: 42px; }
  .brand-wordmark { width: clamp(122px, 39vw, 163px); }
  .card { padding: 21px 18px 22px; }
}
@media (max-width: 355px) {
  .shell { padding-right: 12px; padding-left: 12px; }
  .site-header { margin-right: -12px; margin-left: -12px; padding-right: 12px; padding-left: 12px; }
  .brand-symbol { width: 37px; height: 37px; }
  .brand-wordmark { width: 116px; }
  .nav-action { padding: 6px 7px; }
  .journey li { font-size: 11px; }
  .support-help { grid-template-columns: 36px minmax(0, 1fr); }
  button#copySupportWechat { grid-column: 2; justify-self: start; }
  .camera-top { height: 68px; }
  .camera-bottom { height: 150px; }
  .shutter { width: 68px; height: 68px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, input { transition: none !important; }
}
