:root {
  --navy: #10233f;
  --navy-soft: #1b3558;
  --brass: #b08a3c;
  --brass-deep: #8d6c2b;
  --paper: #f7f4ee;
  --card: rgba(255, 252, 246, 0.94);
  --ink: #162033;
  --muted: #5d6b80;
  --line: rgba(16, 35, 63, 0.12);
  --danger: #a12b22;
  --ok: #1e6b4a;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}

.lang-switcher {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.45rem 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 28px rgba(10, 22, 40, 0.18);
  backdrop-filter: blur(10px);
}

.lang-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.lang-switcher select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 1.7rem 0.4rem 0.7rem;
  background-color: #10233f;
  background-image:
    linear-gradient(180deg, #1b3558, #10233f),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23f4efe4' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-size: 100% 100%, 0.55rem 0.35rem;
  background-position: center, right 0.55rem center;
  background-repeat: no-repeat;
  color: #f4efe4;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  max-width: 11rem;
}

.lang-switcher select:focus-visible {
  box-shadow: 0 0 0 2px rgba(176, 138, 60, 0.7);
}

.stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(16, 35, 63, 0.92), rgba(27, 53, 88, 0.88)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, var(--paper), transparent);
}

.frame {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.8rem 0 3.5rem;
  animation: enter 0.65s ease both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero {
  text-align: center;
  color: #f4efe4;
  margin-bottom: 1.6rem;
}

.kicker {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, 0.72);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.company {
  margin: 1.25rem auto 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  animation: enter 0.65s ease 0.12s both;
}

.badge {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #f0d48a, var(--brass) 55%, var(--brass-deep));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.company strong {
  display: block;
  font-size: 1rem;
  color: #fff;
}

.company em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: rgba(244, 239, 228, 0.7);
  letter-spacing: 0.04em;
}

.form,
.security {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(10, 22, 40, 0.16);
}

.form {
  padding: 1.4rem 1.35rem 1.5rem;
  animation: enter 0.65s ease 0.18s both;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  padding: 1rem 0;
}

.step + .step {
  border-top: 1px solid var(--line);
}

.step-index {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.step-body h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.option {
  cursor: pointer;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option > span {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.coin-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: block;
  box-shadow: 0 3px 10px rgba(16, 35, 63, 0.12);
}

.coin-icon svg,
.coin-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.option-text {
  min-width: 0;
}

.option:hover > span {
  border-color: rgba(176, 138, 60, 0.55);
}

.option input:checked + span {
  border-color: var(--brass);
  background: linear-gradient(180deg, #fffaf0, #fff);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(176, 138, 60, 0.12);
}

.option input:focus-visible + span {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.option b {
  display: block;
  font-size: 0.92rem;
}

.option small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

input[type="text"] {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]::placeholder {
  color: #93a0b4;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 4px rgba(176, 138, 60, 0.15);
}

input[type="text"].invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(161, 43, 34, 0.1);
}

.form-error {
  margin: 0.2rem 0 0;
  color: var(--danger);
  font-size: 0.88rem;
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: min(100%, 280px);
  min-height: 3.25rem;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #1b3558, #10233f);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(16, 35, 63, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.cta:active {
  transform: none;
}

.cta-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(176, 138, 60, 0.95);
  color: #10233f;
  font-size: 0.78rem;
  font-weight: 700;
}

.cta.secondary {
  background: #e8edf4;
  color: var(--navy);
  box-shadow: none;
  width: 100%;
  margin-top: 0.25rem;
}

.security {
  margin-top: 1rem;
  padding: 1.15rem 1.25rem;
  animation: enter 0.65s ease 0.28s both;
}

.security h3 {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: var(--navy);
}

.security ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 18, 32, 0.5);
  backdrop-filter: blur(5px);
  padding: 1rem;
  z-index: 40;
}

.overlay[hidden] {
  display: none;
}

.dialog {
  width: min(400px, 100%);
  background: #fffdf8;
  border-radius: 20px;
  padding: 1.6rem 1.4rem 1.3rem;
  text-align: center;
  border: 1px solid rgba(176, 138, 60, 0.25);
  animation: enter 0.35s ease both;
}

.dialog-icon {
  width: 3.1rem;
  height: 3.1rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(30, 107, 74, 0.12);
  color: var(--ok);
  font-weight: 700;
  font-size: 1.3rem;
}

.dialog h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.dialog p {
  margin: 0.55rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-all;
  white-space: pre-line;
}

@media (max-width: 640px) {
  .frame {
    width: min(100% - 1.2rem, 760px);
    padding-top: 2.8rem;
  }

  .lang-label {
    display: none;
  }

  .options {
    grid-template-columns: 1fr;
  }

  .step {
    gap: 0.7rem;
  }

  .form {
    padding: 1.1rem 1rem 1.25rem;
  }
}
