/* 手机表单页 */
.form-body {
  background: #070b14;
}

.page {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  margin: 0 auto;
  padding:
    calc(26px + env(safe-area-inset-top, 0px))
    22px
    calc(44px + var(--safe-bottom));
}

.hero {
  padding-top: clamp(8px, 3vh, 34px);
  animation: rise 0.8s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.hero-kicker {
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(38px, 10.4vw, 66px);
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero-title .gold-text {
  display: inline-block;
  padding-bottom: 0.08em;
  filter: drop-shadow(0 4px 26px rgba(207, 156, 84, 0.18));
}

.hero-lede {
  max-width: 30em;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(229, 192, 136, 0.2);
  border-radius: 999px;
  background: rgba(229, 192, 136, 0.06);
  color: var(--gold);
  font-size: 11.5px;
  letter-spacing: 0.05em;
}

.hero-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(147, 201, 170, 0.8);
}

.hero-chip--ghost {
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 34px;
}

.step {
  padding: 22px 20px 24px;
  animation: rise 0.75s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.step:nth-of-type(2) { animation-delay: 0.06s; }
.step:nth-of-type(3) { animation-delay: 0.12s; }
.step:nth-of-type(4) { animation-delay: 0.18s; }

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.step-no {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-top: 1px;
  border: 1px solid rgba(229, 192, 136, 0.32);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.step-head h2 {
  font-size: 21px;
  color: var(--cream);
}

.step-sub {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.record-limit {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.record-limit b {
  color: var(--gold);
  font-weight: 600;
}

.field-optional {
  color: var(--muted-2);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

/* 分段选择 */
.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 58px;
  margin-top: 20px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: rgba(4, 8, 16, 0.55);
}

.seg-pill {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  border: 1px solid rgba(229, 192, 136, 0.32);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(229, 192, 136, 0.2), rgba(229, 192, 136, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 245, 225, 0.1), 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.segmented[data-target="other"] .seg-pill {
  transform: translateX(100%);
}

.seg {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  user-select: none;
  transition: color 0.24s ease;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg-icon {
  color: var(--muted-2);
  font-size: 14px;
  transition: color 0.24s ease;
}

.segmented[data-target="self"] .seg:first-of-type,
.segmented[data-target="other"] .seg:last-of-type {
  color: var(--gold-bright);
}

.segmented[data-target="self"] .seg:first-of-type .seg-icon,
.segmented[data-target="other"] .seg:last-of-type .seg-icon {
  color: var(--gold);
}

.recipient-field {
  animation: reveal 0.32s ease both;
}

.record-tip {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.record-notice {
  margin-top: 14px;
}

.recorder {
  position: relative;
  margin-top: 18px;
  padding: 24px 16px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(229, 192, 136, 0.09), transparent 62%),
    rgba(4, 8, 15, 0.42);
  transition: border-color 0.2s ease;
}

.recorder.has-issue {
  border-color: rgba(232, 154, 134, 0.42);
}

.rec-stage {
  min-height: 152px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rec-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.record-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid rgba(255, 242, 216, 0.35);
  background: radial-gradient(circle at 34% 27%, #f9e4bd 0%, #e4bd82 48%, #c08f4d 100%);
  color: #2a1b08;
  box-shadow:
    0 14px 36px rgba(178, 128, 58, 0.3),
    0 0 0 9px rgba(229, 192, 136, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.record-btn:active {
  transform: scale(0.965);
}

.record-btn:hover {
  box-shadow:
    0 18px 44px rgba(178, 128, 58, 0.38),
    0 0 0 11px rgba(229, 192, 136, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.record-btn svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.record-btn .icon-stop {
  width: 30px;
  height: 30px;
  fill: currentColor;
  stroke: none;
}

.record-pulse {
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(229, 192, 136, 0.55);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.record-btn.is-recording {
  background: radial-gradient(circle at 34% 27%, #f3d4a5 0%, #d9ac6c 50%, #b07f3e 100%);
}

.record-btn.is-recording .record-pulse {
  animation: pulseRing 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.record-btn.is-recording .record-pulse--2 {
  animation-delay: 1.1s;
}

.record-hint {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.rec-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  color: var(--text-soft);
  font-size: 13px;
}

.rec-processing .spinner {
  width: 26px;
  height: 26px;
}

.timer-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.timer {
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 27px;
  letter-spacing: 0.06em;
}

.timer-max {
  color: var(--muted-2);
  font-size: 11.5px;
}

.wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: min(100%, 410px);
  height: 46px;
  margin: 9px auto 0;
}

.wave i {
  display: block;
  flex: 1 1 2px;
  max-width: 5px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to top, rgba(229, 192, 136, 0.22), rgba(244, 216, 171, 0.9));
  transform: scaleY(0.08);
  transform-origin: 50% 50%;
  opacity: 0.7;
  transition: transform 0.09s linear, opacity 0.3s ease;
}

.wave.is-recording i {
  opacity: 1;
}

.wave.is-playing i {
  opacity: 0.95;
}

.rec-ready {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  animation: reveal 0.35s ease both;
}

.play-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(229, 192, 136, 0.32);
  border-radius: 50%;
  background: rgba(229, 192, 136, 0.09);
  color: var(--gold-bright);
  transition: background 0.18s ease, transform 0.18s ease;
}

.play-btn:active {
  transform: scale(0.95);
}

.play-btn:hover {
  background: rgba(229, 192, 136, 0.16);
}

.play-btn svg {
  width: 24px;
  height: 24px;
}

.ready-body {
  flex: 1 1 auto;
  min-width: 0;
}

.ready-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ready-title {
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.ready-time {
  color: var(--gold);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.seek {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 22px;
  margin: 6px 0 2px;
  padding: 0;
  border: 0;
  background: transparent;
  --progress: 0%;
}

.seek:focus {
  outline: none;
}

.seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) 0 var(--progress), rgba(255, 255, 255, 0.13) var(--progress) 100%);
}

.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px rgba(229, 192, 136, 0.55);
}

.seek::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.seek::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

.seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--gold-bright);
}

.ready-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.ready-size {
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.upload-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 11.5px;
  text-align: center;
}

.upload-link {
  color: var(--gold-dim);
  border-bottom: 1px dotted rgba(229, 192, 136, 0.35);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.upload-link:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

.upload-row.is-primary {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px dashed rgba(229, 192, 136, 0.35);
  border-radius: 14px;
  background: rgba(229, 192, 136, 0.05);
  color: var(--text-soft);
  font-size: 12.5px;
}

.upload-row.is-primary .upload-link {
  color: var(--gold-bright);
  font-weight: 600;
  border-bottom: 0;
}

.record-error {
  margin-top: 10px;
}

/* 提交 */
.submit-wrap {
  margin-top: 12px;
  text-align: center;
}

.submit-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  overflow: hidden;
  border: 1px solid rgba(255, 244, 222, 0.35);
  border-radius: 18px;
  background: linear-gradient(120deg, #f7e2b9 0%, #e7c389 44%, #cfa260 100%);
  color: #261908;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  box-shadow:
    0 18px 44px rgba(178, 128, 58, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.submit-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.42) 48%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.submit-btn:hover::after {
  transform: translateX(130%);
}

.submit-btn:hover {
  filter: brightness(1.03);
  box-shadow:
    0 22px 50px rgba(178, 128, 58, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.submit-btn:active {
  transform: scale(0.992);
}

.submit-btn:disabled {
  cursor: wait;
  opacity: 0.76;
}

.submit-btn.is-submitting::after {
  display: none;
}

.submit-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 68%);
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.7;
}

.submit-spinner {
  border-color: rgba(38, 25, 8, 0.2);
  border-top-color: #3a270f;
}

.upload-progress {
  height: 3px;
  margin: 9px 2px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 0.2s ease;
}

.privacy {
  max-width: 34em;
  margin: 13px auto 0;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.page-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
  color: var(--muted-2);
  font-family: var(--font-serif);
  font-size: 11.5px;
  letter-spacing: 0.12em;
}

.foot-dot {
  opacity: 0.45;
}

/* 微信引导弹层 */
.gate {
  z-index: 110;
}

.gate-card {
  position: relative;
  width: min(100%, 410px);
  padding: 34px 24px 24px;
  border: 1px solid rgba(229, 192, 136, 0.3);
  border-radius: 26px;
  background:
    radial-gradient(90% 70% at 80% 0%, rgba(229, 192, 136, 0.12), transparent 60%),
    linear-gradient(160deg, rgba(25, 36, 56, 0.98), rgba(11, 18, 31, 0.99));
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.6);
  text-align: center;
  animation: modalIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.gate-close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.gate-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.gate-arrow {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 15px;
  border: 1px solid rgba(229, 192, 136, 0.3);
  border-radius: 50%;
  background: rgba(229, 192, 136, 0.08);
  color: var(--gold);
  font-size: 27px;
  font-weight: 300;
  box-shadow: 0 0 0 8px rgba(229, 192, 136, 0.035);
}

.gate-kicker {
  color: var(--gold-dim);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.gate-card h2 {
  margin-top: 8px;
  color: var(--cream);
  font-size: 26px;
}

.gate-text {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.8;
}

.gate-text strong {
  color: var(--gold-bright);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.gate-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 18px 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: rgba(3, 7, 14, 0.34);
  text-align: left;
  list-style: none;
}

.gate-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.gate-steps li span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 10.5px;
}

.gate-steps b {
  color: var(--gold-bright);
  font-weight: 600;
}

.gate-actions {
  display: flex;
  gap: 10px;
}

.gate-actions .btn-gold {
  flex: 1.15;
}

.gate-actions .btn-ghost {
  flex: 1;
}

.gate-tip {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

/* 成功层 */
.success {
  z-index: 115;
  background:
    radial-gradient(70% 60% at 50% 18%, rgba(205, 151, 79, 0.16), transparent 62%),
    rgba(3, 6, 12, 0.9);
}

.success-card {
  position: relative;
  width: min(100%, 400px);
  padding: 38px 26px 28px;
  border: 1px solid rgba(229, 192, 136, 0.28);
  border-radius: 28px;
  background: linear-gradient(165deg, rgba(25, 36, 56, 0.98), rgba(10, 16, 28, 0.99));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.66);
  text-align: center;
  animation: modalIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.success-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(229, 192, 136, 0.09);
  border-radius: 20px;
  pointer-events: none;
}

.seal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 94px;
  height: 94px;
  margin: 0 auto 22px;
  border: 1.5px solid rgba(229, 192, 136, 0.62);
  border-radius: 50%;
  color: var(--gold);
  transform: rotate(-7deg);
  box-shadow: 0 0 0 5px rgba(229, 192, 136, 0.055), inset 0 0 24px rgba(229, 192, 136, 0.07);
  animation: stampIn 0.6s cubic-bezier(0.18, 0.9, 0.3, 1.2) 0.12s both;
}

.seal-ring {
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(229, 192, 136, 0.42);
  border-radius: 50%;
}

.seal svg {
  width: 26px;
  height: 26px;
  margin-bottom: 3px;
}

.seal span:last-child {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.success-year {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
}

.success-card h2 {
  margin-top: 10px;
  color: var(--cream);
  font-size: 26px;
  line-height: 1.35;
}

.success-summary {
  margin-top: 13px;
  color: var(--text-soft);
  font-size: 13.5px;
}

.success-id {
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.success-id b {
  color: var(--gold-dim);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.success-again {
  width: 100%;
  margin-top: 25px;
}

.success-note {
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.noscript {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 200;
  width: min(90vw, 500px);
  padding: 14px 18px;
  border: 1px solid var(--danger);
  border-radius: 14px;
  background: #1a1114;
  color: #f0c3b7;
  font-size: 13px;
  text-align: center;
  transform: translateX(-50%);
}

.stars-extra {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 241, 214, 0.65);
  animation: twinkle 4s ease-in-out infinite;
}

/* 动画 */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes stampIn {
  from { opacity: 0; transform: rotate(-18deg) scale(1.35); }
  to { opacity: 1; transform: rotate(-7deg) scale(1); }
}

@keyframes pulseRing {
  0% { transform: scale(0.92); opacity: 0.55; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.18; transform: scale(0.7); }
  50% { opacity: 0.85; transform: scale(1.1); }
}

body.locked {
  overflow: hidden;
}

/* 平板 / 桌面 */
@media (min-width: 720px) {
  .page {
    padding-top: calc(44px + env(safe-area-inset-top, 0px));
    padding-left: 34px;
    padding-right: 34px;
    padding-bottom: 56px;
  }

  .hero-title {
    font-size: clamp(54px, 5.6vw, 76px);
  }

  .hero-lede {
    font-size: 16px;
  }

  .form {
    margin-top: 40px;
    gap: 18px;
  }

  .step {
    padding: 28px 30px 30px;
  }

  .step-head h2 {
    font-size: 23px;
  }

  .record-tip {
    font-size: 13.5px;
  }

  .recorder {
    padding: 30px 28px 22px;
  }

  .submit-btn {
    min-height: 64px;
  }
}

@media (max-width: 374px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .step {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 34px;
  }

  .seg {
    font-size: 12px;
  }

  .seg-icon {
    display: none;
  }

  .record-btn {
    width: 80px;
    height: 80px;
  }

  .gate-actions {
    flex-direction: column;
  }
}
