:root {
  --rose: #78184a;
  --rose-deep: #5c1238;
  --gold: #c4a056;
  --gold-bright: #e8d5a3;
  --cream: #fff6f0;
  --pink: #f4c6d6;
  --purple: #8a3a7a;
  --font-ui: "Noto Serif SC", "STKaiti", "KaiTi", "STSong", "Songti SC", "SimSun", Georgia, serif;
  --font-count: Georgia, "Palatino Linotype", "Noto Serif SC", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--rose);
  background: #2a1020;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 182, 193, 0.45), transparent 36%),
    radial-gradient(circle at 82% 16%, rgba(186, 85, 160, 0.38), transparent 32%),
    radial-gradient(circle at 70% 80%, rgba(90, 40, 140, 0.45), transparent 40%),
    linear-gradient(160deg, #4a1838 0%, #8a3058 42%, #3a1848 100%);
  z-index: -2;
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/vip.png") center / cover no-repeat;
  opacity: 0.18;
  filter: blur(18px);
}

.wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.form-card,
.invite-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 248, 244, 0.96), rgba(255, 236, 228, 0.94));
  border: 1px solid rgba(196, 160, 86, 0.55);
  border-radius: 28px;
  box-shadow:
    0 24px 60px rgba(72, 16, 48, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.form-card::before,
.invite-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(196, 160, 86, 0.28);
  border-radius: 20px;
  pointer-events: none;
}

.form-inner {
  position: relative;
  padding: 36px 32px 32px;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gold);
  letter-spacing: 0.22em;
  font-size: 13px;
}

.kicker span {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

h1 {
  margin-top: 10px;
  text-align: center;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, #9b2d6a, #c45b8a 45%, #8a3a9a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 8px 0 28px;
  text-align: center;
  color: #9a4a72;
  font-size: 15px;
}

.field {
  margin-bottom: 18px;
}

.field > label,
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--rose);
}

.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(196, 160, 86, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--rose-deep);
  font: 600 16px/1.4 var(--font-ui);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(196, 160, 86, 0.18);
}

.date-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.date-part {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  flex: 1;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.date-part:first-child {
  flex: 1;
}

.date-part-year {
  flex: 1.45;
}

.date-part select {
  width: 100%;
  height: 52px;
  padding: 0 8px 0 12px;
  border: 1px solid rgba(196, 160, 86, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--rose-deep);
  font: 600 16px/1.4 var(--font-ui);
  outline: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--rose) 50%),
    linear-gradient(135deg, var(--rose) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.date-part span {
  flex-shrink: 0;
  color: var(--rose);
}

.times-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.times-row input {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.08em;
}

.stepper {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(196, 160, 86, 0.55);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8f2, #f7e1d4);
  color: var(--rose);
  font-size: 24px;
  cursor: pointer;
}

.stepper:active {
  transform: translateY(1px);
}

.hint {
  margin-top: 4px;
  color: #b36a8a;
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.btn {
  min-width: 160px;
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: 700 16px/1 var(--font-ui);
  letter-spacing: 0.12em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  color: #fff8f0;
  background: linear-gradient(135deg, #c45b8a, #8a2a68 55%, #6b2478);
  box-shadow: 0 10px 24px rgba(138, 42, 104, 0.35);
}

.btn-gold {
  color: #5c1238;
  background: linear-gradient(135deg, #f3e2b8, #c4a056 60%, #a8883e);
  box-shadow: 0 10px 24px rgba(168, 120, 48, 0.28);
}

.btn-ghost {
  color: var(--rose);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(196, 160, 86, 0.45);
}

.btn:active {
  transform: translateY(1px);
}

.invite-page .wrap {
  width: min(1100px, calc(100% - 20px));
}

.invite-panel {
  padding: 18px 18px 22px;
}

.card-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1586 / 992;
  border-radius: 18px;
  overflow: hidden;
  background: #f8e8de;
  box-shadow: 0 12px 36px rgba(80, 20, 50, 0.22);
  container-type: size;
}

.card-stage img.base {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.overlay {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--rose);
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
}

.overlay-name,
.overlay-code,
.overlay-date {
  justify-content: flex-start;
  text-align: left;
  font-size: clamp(14px, 2.4vw, 40px);
}

.overlay-date {
  letter-spacing: 0.01em;
}

.overlay-count {
  font-family: var(--font-count);
  font-style: italic;
  font-weight: 800;
  line-height: 0.78;
  overflow: visible;
  color: #f0d78a;
  letter-spacing: 0;
  text-shadow:
    0 0 22px rgba(255, 228, 160, 0.95),
    0 2px 0 #7a2048,
    2px 2px 0 #7a2048,
    -2px 0 0 #7a2048,
    0 -1px 0 #7a2048;
  font-size: 32cqh;
}

.invite-actions {
  margin-top: 18px;
}

.tip {
  margin-top: 12px;
  text-align: center;
  color: #9a4a72;
  font-size: 13px;
}

.save-sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(32, 10, 24, 0.62);
}

.save-sheet-card {
  width: min(720px, 100%);
  padding: 16px;
  border-radius: 20px;
  background: #fff7f2;
  text-align: center;
}

.save-sheet-card img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.save-sheet-card p {
  margin: 12px 0;
  color: var(--rose);
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .form-inner {
    padding: 28px 18px 22px;
  }

  .invite-panel {
    padding: 10px 10px 16px;
  }

  .date-part select {
    padding-right: 22px;
    font-size: 15px;
  }

  .btn {
    min-width: 0;
    flex: 1 1 140px;
  }

  .overlay-name,
  .overlay-code,
  .overlay-date {
    font-size: clamp(13px, 3.8vw, 24px);
  }

  .overlay-count {
    font-size: 32cqh;
  }
}
