:root {
  --navy: #1b2655;
  --navy-deep: #0e1632;
  --navy-mid: #243070;
  --red: #b8292d;
  --red-glow: rgba(184, 41, 45, 0.12);
  --cream: #f8f5f0;
  --cream-dark: #ede8df;
  --white: #ffffff;
  --stone: #8a8475;
  --charcoal: #2d2d2d;
  --green: #25a45f;
  --r-md: 8px;
  --r-xl: 20px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-body: "DM Sans", Arial, sans-serif;
  --f-mono: "DM Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--navy-deep);
  color: var(--charcoal);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-fx::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(184, 41, 45, 0.08), transparent 45%),
    radial-gradient(ellipse at 85% 15%, rgba(46, 61, 128, 0.12), transparent 45%);
}

.bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(255, 255, 255, 1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 1) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
  to { transform: translate(40px, 40px); }
}

.bg-accent {
  position: absolute;
  left: 0;
  top: 30%;
  width: 3px;
  height: 160px;
  background: var(--red);
  border-radius: 0 2px 2px 0;
  opacity: 0.5;
  animation: accentG 1s ease 0.3s both;
}

@keyframes accentG {
  from { height: 0; opacity: 0; }
  to { height: 160px; opacity: 0.5; }
}

.bg-rings {
  position: absolute;
  right: -40px;
  top: 50%;
  width: 360px;
  height: 360px;
  transform: translateY(-50%);
}

.bg-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.035);
}

.r1 { width: 360px; height: 360px; animation: ringR 40s linear infinite; }
.r2 { width: 260px; height: 260px; top: 50px; left: 50px; animation: ringR 30s linear infinite reverse; }
.r3 { width: 160px; height: 160px; top: 100px; left: 100px; animation: ringR 20s linear infinite; }

@keyframes ringR {
  to { transform: rotate(360deg); }
}

.star {
  position: absolute;
  border-radius: 50%;
}

.star.wh { background: rgba(255, 255, 255, 0.5); }
.star.rd { background: rgba(184, 41, 45, 0.4); }
.star.bl { background: rgba(130, 170, 255, 0.4); }
.star.gl { box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.12); }

@keyframes stw {
  0%, 100% { opacity: 0.08; transform: scale(0.5); }
  50% { opacity: 0.5; transform: scale(1); }
}

@keyframes stw2 {
  0%, 100% { opacity: 0.06; }
  50% { opacity: 0.35; }
}

.star.t1 { animation: stw ease-in-out infinite alternate; }
.star.t2 { animation: stw2 ease-in-out infinite alternate; }

.cursor-glow {
  position: fixed;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 41, 45, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
}

body:hover .cursor-glow {
  opacity: 1;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-120%); }
  40%, 60% { transform: translateX(120%); }
}

.header {
  text-align: center;
  margin-bottom: 20px;
  animation: fadeUp 0.6s var(--ease) both;
}

.logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.logo-row img {
  width: 230px;
  height: auto;
  display: block;
}

.header-sub {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--f-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.25);
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: fadeUp 0.5s var(--ease) 0.1s both;
}

.progress {
  height: 4px;
  background: var(--cream-dark);
}

.progress-fill {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--red), var(--navy-mid));
  border-radius: 0 2px 2px 0;
  transition: width 0.5s var(--ease-spring);
}

.step {
  display: none;
  padding: 28px 32px 32px;
}

.step.active {
  display: block;
  animation: stepIn 0.35s var(--ease) both;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

.step-label {
  margin-bottom: 4px;
  color: var(--red);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.step-title {
  margin: 0 0 3px;
  color: var(--navy);
  font-family: var(--f-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0;
}

.step-desc {
  margin-bottom: 20px;
  color: var(--stone);
  font-size: 13px;
}

.f {
  margin-bottom: 14px;
}

.f label {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 11.5px;
  font-weight: 600;
}

.req {
  color: var(--red);
}

.f input,
.f select,
.f textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(27, 38, 85, 0.08);
  background: var(--cream);
  color: var(--charcoal);
  font-size: 14.5px;
  outline: none;
  transition: all 0.3s;
  -webkit-appearance: none;
}

.f input:focus,
.f select:focus,
.f textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 38, 85, 0.06);
  background: var(--white);
}

.f input::placeholder,
.f textarea::placeholder {
  color: rgba(138, 132, 117, 0.48);
}

.f select {
  padding-right: 32px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a8475' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.f textarea {
  height: 70px;
  resize: none;
}

.phone-split {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
}

.phone-split.f-err {
  border-radius: var(--r-md);
  box-shadow: 0 0 0 3px var(--red-glow);
}

.phone-split.f-err input {
  border-color: var(--red);
}

.dial-code {
  text-align: center;
  font-weight: 600;
}

.phone-number {
  min-width: 0;
}

.f-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.f-err {
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-glow) !important;
}

.err {
  display: none;
  margin-top: 2px;
  color: var(--red);
  font-size: 10.5px;
}

.combo {
  position: relative;
}

.country-combo .combo-input {
  padding-right: 46px;
}

.combo-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.combo-toggle::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 11px;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--stone);
  border-bottom: 1.5px solid var(--stone);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.country-combo.open .combo-toggle::before {
  transform: translateY(3px) rotate(225deg);
}

.combo-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid rgba(27, 38, 85, 0.08);
  border-radius: var(--r-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.combo-list.open {
  display: block;
}

.combo-opt {
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: var(--white);
  color: var(--charcoal);
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: background 0.15s;
}

.combo-opt:hover,
.combo-opt.active {
  background: var(--cream);
}

.combo-opt.hidden {
  display: none;
}

.combo-flag {
  flex: 0 0 22px;
  text-align: center;
  font-size: 16px;
}

.combo-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(27, 38, 85, 0.07);
  background: var(--cream);
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
  font-size: 12.5px;
  font-weight: 500;
  user-select: none;
  -webkit-user-select: none;
}

.pill:hover {
  border-color: var(--navy);
  transform: translateY(-1px);
}

.pill.sel {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: translateY(-1px);
}

.conditional {
  display: none;
}

.conditional.show {
  display: block;
}

.nav-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  flex: 1;
  min-height: 48px;
  padding: 14px 20px;
  border-radius: var(--r-md);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 41, 45, 0.25);
}

.btn-back {
  flex: 0 0 auto;
  background: var(--cream);
  color: var(--stone);
}

.btn-back:hover {
  background: var(--cream-dark);
  color: var(--navy);
}

.btn-submit {
  background: var(--red);
  color: #fff;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 41, 45, 0.3);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.sub-loader {
  display: none;
}

.dots {
  display: inline-flex;
  gap: 3px;
}

.dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: db 0.6s ease infinite;
}

.dots span:nth-child(2) { animation-delay: 0.1s; }
.dots span:nth-child(3) { animation-delay: 0.2s; }

@keyframes db {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.ok {
  display: none;
  text-align: center;
  padding: 40px 32px;
}

.ok.show {
  display: block;
}

@keyframes pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.ok-chk {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--green);
  font-size: 28px;
  animation: pop 0.4s var(--ease-spring) 0.15s both;
}

.ok h2 {
  margin-bottom: 6px;
  color: var(--navy);
  font-family: var(--f-serif);
  font-size: 24px;
}

.ok p {
  margin-bottom: 20px;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.6;
}

.rst {
  padding: 10px 24px;
  border-radius: var(--r-md);
  border: none;
  background: var(--cream);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.rst:hover {
  background: var(--navy);
  color: #fff;
}

.info-box {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid rgba(27, 38, 85, 0.06);
  background: rgba(27, 38, 85, 0.03);
}

.info-box h4 {
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 600;
}

.info-box p {
  color: var(--stone);
  font-size: 12.5px;
  line-height: 1.6;
}

.consent-box {
  border-radius: var(--r-md);
  padding: 14px 16px;
  border: 1px solid rgba(27, 38, 85, 0.06);
  background: var(--cream);
}

.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.consent-label input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--navy);
  cursor: pointer;
}

.consent-text {
  color: var(--stone);
  font-size: 11px;
  line-height: 1.6;
}

.consent-text a,
.link-btn {
  color: var(--navy);
  text-decoration: underline;
  font-weight: 600;
}

.link-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.consent-bm {
  margin-top: 8px;
  color: var(--stone);
  opacity: 0.72;
  font-size: 10px;
  line-height: 1.5;
}

.submit-error {
  display: none;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  background: #fff3f2;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
}

.submit-error.show {
  display: block;
}

.foot {
  margin-top: 14px;
  text-align: center;
  animation: fadeUp 0.5s var(--ease) 0.2s both;
}

.foot p {
  color: rgba(255, 255, 255, 0.16);
  font-size: 10px;
}

/* 隐私弹窗外壳采用共享 cb-modal 组件；此处仅保留页面级显隐与正文排版 */
.wir-privacy-mask {
  display: none;
  z-index: 9999;
}

.wir-privacy-mask.show {
  display: flex;
}

.wir-privacy-body {
  font-size: 12px;
  line-height: 1.8;
}

.wir-privacy-body p + p {
  margin-top: 10px;
}

.wir-privacy-body strong {
  color: var(--navy);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 768px) {
  .card {
    max-width: 100%;
  }

  .step {
    padding: 22px 22px 26px;
  }
}

@media (max-width: 480px) {
  .app {
    justify-content: flex-start;
    padding: 16px 10px 12px;
  }

  .header {
    margin-bottom: 14px;
  }

  .logo-row img {
    width: 165px;
  }

  .header-sub {
    margin-top: 6px;
    font-size: 17px;
  }

  .step {
    padding: 18px 18px 22px;
  }

  .step-title {
    font-size: 20px;
  }

  .f {
    margin-bottom: 11px;
  }

  .f input,
  .f select {
    padding: 11px 12px;
    font-size: 13.5px;
  }

  .phone-split {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 6px;
  }

  .country-combo .combo-input {
    padding-right: 42px;
  }

  .f-row {
    grid-template-columns: 1fr;
  }

  .pill {
    padding: 7px 11px;
    font-size: 11px;
  }

  .btn {
    padding: 13px;
    font-size: 13px;
  }

  .combo-list {
    max-height: 160px;
  }

  .bg-rings,
  .bg-accent {
    display: none;
  }
}

@media (max-width: 360px) {
  .step {
    padding: 14px 14px 18px;
  }

  .pill {
    padding: 6px 9px;
    font-size: 10.5px;
  }
}

@media (max-height: 500px) {
  .app {
    justify-content: flex-start;
    padding: 8px 16px;
  }

  .header {
    margin-bottom: 8px;
  }

  .step {
    padding: 12px 18px 16px;
  }

  .f {
    margin-bottom: 8px;
  }

  .bg-rings,
  .bg-accent {
    display: none;
  }
}
