:root {
  --bg: #faf9ff;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #24222c;
  --muted: #716e7e;
  --primary: #8d71ff;
  --primary-deep: #7656f7;
  --primary-light: #c9bdff;
  --line: rgba(139, 112, 246, 0.16);
  --shadow: 0 18px 50px rgba(115, 87, 190, 0.12);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 86% 4%, rgba(162, 194, 255, 0.16), transparent 26%),
    radial-gradient(circle at 8% 22%, rgba(177, 150, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #fff 0%, #f8f6ff 55%, #fbfaff 100%);
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

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

button {
  border: 0;
}

.page-shell {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 20px 18px calc(36px + var(--safe-bottom));
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 2px 4px 16px;
}

.brand {
  display: block;
  width: 82px;
  height: 41px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flow-page {
  animation: pageEnter 360ms ease both;
}

.page-kicker {
  margin: 0 0 12px;
  color: #9179e8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.intro-card {
  position: relative;
  min-height: 420px;
  padding: 30px 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 26%, rgba(164, 133, 255, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,0.96), rgba(244,240,255,0.8));
  box-shadow: 0 24px 72px rgba(103, 75, 180, 0.11);
}

.intro-card h1,
.page-heading h1 {
  position: relative;
  z-index: 4;
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(32px, 9vw, 46px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.intro-card h1 span {
  color: var(--primary);
}

.intro-lead {
  position: relative;
  z-index: 4;
  margin: 18px 0 0;
  color: #514c5c;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

.intro-copy {
  position: relative;
  z-index: 4;
  width: 72%;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.intro-visual {
  position: absolute;
  z-index: 2;
  right: -15px;
  bottom: -2px;
  width: 260px;
  height: 232px;
  pointer-events: none;
}

.intro-mascot {
  position: absolute;
  z-index: 3;
  right: -4px;
  bottom: 0;
  width: 236px;
  filter: drop-shadow(0 18px 20px rgba(93, 68, 155, 0.16));
}

.intro-vine {
  position: absolute;
  z-index: 2;
  top: 17px;
  left: 31px;
  width: 163px;
  opacity: 0.74;
  transform: rotate(10deg);
  transform-origin: 3% 73%;
}

.intro-small-gourd {
  position: absolute;
  z-index: 4;
  top: 83px;
  left: 3px;
  width: 40px;
  opacity: 0.9;
  filter: drop-shadow(0 7px 12px rgba(109, 74, 211, 0.16));
}

.intro-details {
  margin-top: 14px;
  padding: 22px 20px 19px;
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 26px;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section-label {
  margin: 0 0 13px;
  color: #7b61db;
  font-size: 13px;
  font-weight: 700;
}

.journey-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-points li {
  position: relative;
  padding-left: 25px;
  color: #4f4a58;
  font-size: 14px;
  line-height: 1.65;
}

.journey-points li::before {
  content: "✦";
  position: absolute;
  top: 0;
  left: 1px;
  color: #9a7cf7;
}

.reassurance {
  margin: 17px 0 0;
  padding-top: 15px;
  border-top: 1px solid rgba(139,112,246,0.12);
  color: #827d8d;
  font-size: 12px;
  line-height: 1.7;
}

.time-estimate {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  color: #817b8d;
  font-size: 13px;
}

.time-estimate strong {
  margin-left: auto;
  color: #7459dc;
  font-size: 15px;
}

.time-icon {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ad92ff, #8060ee);
  place-items: center;
}

.intro-declaration {
  display: grid;
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(139,112,246,0.14);
  border-radius: 22px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 14px 38px rgba(103,75,180,0.08);
}

.declaration-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 15px 16px;
}

.declaration-item + .declaration-item {
  border-top: 1px solid rgba(139,112,246,0.11);
}

.declaration-icon {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  place-items: center;
}

.declaration-icon.privacy {
  color: #795edb;
  background: rgba(139,112,246,0.11);
}

.declaration-icon.reward {
  background: rgba(255,220,139,0.28);
  font-size: 18px;
}

.declaration-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.declaration-item strong {
  display: block;
  margin: 1px 0 4px;
  color: #514961;
  font-size: 13px;
}

.declaration-item p {
  margin: 0;
  color: #7b7587;
  font-size: 11px;
  line-height: 1.7;
}

.intro-action {
  padding-top: 16px;
}

.page-heading {
  padding: 18px 5px 22px;
}

.page-heading h1 {
  font-size: clamp(30px, 8vw, 40px);
}

.page-heading > p:last-child {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.basic-info-form {
  display: grid;
  gap: 14px;
}

.info-card {
  position: relative;
  padding: 20px 17px 18px;
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(247,245,255,0.8));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.info-card-head {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 17px;
}

.info-card-head h2 {
  margin: 2px 0 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
}

.info-card-head p {
  margin: 3px 0 0;
  color: #918b9d;
  font-size: 11px;
}

.field-label,
.birth-date-fields label > span,
.place-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: #625d6c;
  font-size: 12px;
}

.birth-date-fields {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 10px;
}

.field-control {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid rgba(138, 111, 238, 0.17);
  border-radius: 15px;
  outline: 0;
  color: var(--text);
  background: rgba(255,255,255,0.82);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field-control:focus {
  border-color: rgba(126, 91, 239, 0.5);
  box-shadow: 0 0 0 4px rgba(126, 91, 239, 0.09);
}

.gender-options {
  display: grid;
  gap: 9px;
}

.gender-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-chip {
  position: relative;
  cursor: pointer;
}

.choice-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-chip span {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid rgba(138, 111, 238, 0.14);
  border-radius: 15px;
  color: #575260;
  background: rgba(255,255,255,0.75);
  transition: 180ms ease;
}

.choice-chip span::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-right: 9px;
  border: 1.5px solid #c6b8fb;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 5px #fff;
}

.choice-chip input:checked + span {
  color: #684dd0;
  border-color: rgba(130, 92, 244, 0.4);
  background: linear-gradient(135deg, rgba(244,239,255,0.98), #fff);
}

.choice-chip input:checked + span::before {
  border-color: #8e6cf5;
  background: #8e6cf5;
}

.choice-chip input:focus-visible + span {
  outline: 3px solid rgba(123, 91, 236, 0.18);
  outline-offset: 2px;
}

.place-fields {
  display: grid;
  gap: 11px;
}

.field-hint {
  margin: 11px 0 0;
  color: #8c8798;
  font-size: 11px;
  line-height: 1.65;
}

.field-error {
  display: none;
  margin: 10px 0 0;
  color: #bd5570;
  font-size: 12px;
}

.info-card.invalid {
  border-color: rgba(210, 85, 117, 0.3);
  animation: shake 320ms ease;
}

.info-card.invalid .field-error {
  display: block;
}

.hero {
  position: relative;
  min-height: 322px;
  padding: 24px 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 34px;
  background:
    radial-gradient(circle at 77% 26%, rgba(162, 131, 255, 0.20), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,0.93), rgba(246,243,255,0.72));
  box-shadow: 0 24px 72px rgba(103, 75, 180, 0.11);
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 26px -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(132, 105, 235, 0.26), transparent);
}

.hero-copy {
  position: relative;
  z-index: 4;
  width: 63%;
}

.eyebrow {
  margin: 0 0 8px;
  color: #9a8ae5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.hero h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(42px, 11vw, 60px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero h1 span {
  color: var(--primary);
}

.subtitle {
  margin: 14px 0 0;
  color: #5e5a68;
  font-size: 15px;
  line-height: 1.7;
  white-space: nowrap;
}

.progress-box {
  display: flex;
  align-items: center;
  gap: 15px;
  width: min(100%, 270px);
  margin-top: 22px;
  padding: 11px 16px;
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 999px;
  background: rgba(255,255,255,0.54);
  box-shadow: inset 0 0 0 1px rgba(139, 112, 246, 0.06);
  backdrop-filter: blur(12px);
}

.progress-box strong {
  min-width: 42px;
  color: #7e63e8;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece8fb;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9b78ff, #bdadff);
  box-shadow: 0 0 18px rgba(135, 96, 255, 0.38);
  transition: width 280ms ease;
}

.mascot-stage {
  position: absolute;
  z-index: auto;
  top: 20px;
  right: -14px;
  width: 230px;
  height: 286px;
  pointer-events: none;
}

.mascot-vine {
  position: absolute;
  z-index: 2;
  top: 51px;
  left: 25px;
  width: 150px;
  height: auto;
  opacity: 0.76;
  transform: rotate(10deg);
  transform-origin: 3% 73%;
  filter: drop-shadow(0 0 9px rgba(147, 115, 255, 0.14));
}

.small-gourd {
  position: absolute;
  z-index: 5;
  top: 111px;
  left: 0;
  width: 36px;
  height: auto;
  opacity: 0.88;
  filter: drop-shadow(0 7px 12px rgba(109, 74, 211, 0.16));
}

.mascot {
  position: absolute;
  z-index: 3;
  right: -2px;
  bottom: 3px;
  width: 218px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(93, 68, 155, 0.16));
}

.floating-dot {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(145, 110, 250, 0.52);
  box-shadow: 0 0 20px rgba(119, 84, 244, 0.32);
}

.dot-one {
  top: 32px;
  left: 114px;
  width: 8px;
  height: 8px;
}

.dot-two {
  top: 170px;
  right: 10px;
  width: 12px;
  height: 12px;
}

.dot-three {
  bottom: 28px;
  left: 18px;
  width: 6px;
  height: 6px;
  background: rgba(116, 195, 255, 0.55);
}

.survey-form {
  position: relative;
  z-index: 3;
  margin-top: 13px;
}

.event-guide {
  margin-bottom: 13px;
  padding: 18px 17px;
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 24px;
  color: #817b8d;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 12px 32px rgba(95, 72, 158, 0.07);
  font-size: 12px;
  line-height: 1.6;
}

.event-guide-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
}

.guide-icon {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ad92ff, #8060ee);
  place-items: center;
}

.event-guide h2 {
  margin: 0;
  color: #4e475b;
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
}

.event-guide-head p {
  margin: 3px 0 0;
}

.guide-steps {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  padding-left: 24px;
  color: #625d6c;
}

.event-example {
  position: relative;
  padding: 13px 14px 12px 62px;
  border: 1px solid rgba(139,112,246,0.12);
  border-radius: 16px;
  background: rgba(244,241,255,0.72);
}

.event-example > span {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: #9476ef;
  font-size: 10px;
}

.event-example p {
  margin: 0;
  color: #625b72;
}

.event-example .example-feeling {
  margin-top: 4px;
  color: #8a8396;
}

.life-events {
  display: grid;
  gap: 13px;
}

.submitted-events-fold {
  margin: 0;
}

.submitted-events-fold > summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border: 1px solid rgba(126, 91, 235, 0.16);
  border-radius: 18px;
  color: #5f5275;
  background: linear-gradient(135deg, #f7f3ff, #fff);
  box-shadow: 0 10px 28px rgba(82, 59, 143, 0.09);
  cursor: pointer;
  list-style: none;
}

.submitted-events-fold > summary::-webkit-details-marker {
  display: none;
}

.submitted-fold-icon {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #a88dff, #7c5ceb);
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

.submitted-fold-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-align: left;
}

.submitted-fold-copy strong {
  color: #504363;
  font-size: 14px;
}

.submitted-fold-copy small {
  color: #958ba2;
  font-size: 11px;
}

.submitted-fold-action {
  color: #795ed3;
  font-size: 11px;
  white-space: nowrap;
}

.submitted-fold-action::before {
  content: "展开查看";
}

.submitted-events-fold[open] .submitted-fold-action::before {
  content: "收起";
}

.submitted-events-fold:not(.is-editing) > .life-events {
  margin-top: 13px;
}

.submitted-events-fold.is-editing > summary {
  display: none;
}

.event-card {
  position: relative;
  z-index: 1;
  padding: 20px 17px 18px;
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(247,245,255,0.8));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.event-card.is-submitted-empty {
  display: none;
}

.event-card.is-submitted-readonly .field-control:disabled {
  border-color: rgba(128, 119, 145, 0.16);
  color: #777080;
  background: rgba(244, 242, 247, 0.92);
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: #777080;
}

.event-card.is-submitted-readonly .event-choice-picker.is-readonly {
  pointer-events: none;
}

.event-card.is-submitted-readonly .event-choice-picker.is-readonly
  .event-choice-summary {
  color: #777080;
  background: rgba(244, 242, 247, 0.92);
  cursor: not-allowed;
}

.event-card.is-submitted-readonly .add-event-subcard:disabled,
.event-card.is-submitted-readonly .remove-event-subcard:disabled {
  color: #aaa4b1;
  border-color: rgba(128, 119, 145, 0.16);
  background: rgba(244, 242, 247, 0.8);
  cursor: not-allowed;
}

.event-card:has(.event-choice-picker[open]) {
  z-index: 50;
}

.event-card.picker-open {
  z-index: 50;
}

.event-card-head {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: start;
  gap: 10px;
  margin-bottom: 16px;
}

.event-card-head h2 {
  margin: 2px 0 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
}

.event-card-head p {
  margin: 3px 0 0;
  color: #918b9d;
  font-size: 11px;
}

.event-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.event-fields label > span,
.event-type-field > span,
.event-field-label {
  display: block;
  margin-bottom: 7px;
  color: #625d6c;
  font-size: 12px;
}

.event-type-field {
  min-width: 0;
}

.event-type-picker {
  position: relative;
}

.event-type-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-type-summary::-webkit-details-marker {
  display: none;
}

.event-type-summary::after {
  content: "⌄";
  flex: 0 0 auto;
  margin-left: 8px;
  color: #7f66dd;
}

.event-type-picker[open] .event-type-summary {
  border-color: rgba(126,91,239,0.5);
  box-shadow: 0 0 0 4px rgba(126,91,239,0.09);
}

.event-type-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(138,111,238,0.18);
  border-radius: 15px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 16px 32px rgba(71,48,138,0.18);
}

.event-type-option {
  position: relative;
  cursor: pointer;
}

.event-type-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.event-type-option span {
  display: block;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid rgba(138,111,238,0.15);
  border-radius: 11px;
  color: #625d6c;
  background: #fff;
  text-align: center;
  font-size: 12px;
}

.event-type-option input:checked + span {
  color: #fff;
  border-color: #8f70ef;
  background: linear-gradient(135deg, #a487fa, #8262e9);
}

.event-type-done {
  grid-column: 1 / -1;
  min-height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(100deg, #a486f8, #8162e8);
  cursor: pointer;
  font-size: 12px;
}

.event-type-details {
  display: grid;
  grid-column: 1 / -1;
  gap: 11px;
}

.event-details-placeholder {
  margin: 0;
  padding: 15px;
  border: 1px dashed rgba(138,111,238,0.2);
  border-radius: 15px;
  color: #9c96a8;
  background: rgba(255,255,255,0.48);
  font-size: 12px;
  text-align: center;
}

.event-type-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(139,112,246,0.12);
}

.event-choice-panel,
.event-feeling-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.event-options {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-content: flex-start;
  min-height: 112px;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(138, 111, 238, 0.14);
  border-radius: 15px;
  background: rgba(255,255,255,0.75);
}

.event-check {
  position: relative;
  cursor: pointer;
}

.event-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.event-check > span {
  display: block;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(138,111,238,0.17);
  border-radius: 999px;
  color: #625d6c;
  background: #fff;
  font-size: 12px;
  transition: 160ms ease;
}

.event-check input:checked + span {
  color: #fff;
  border-color: #8f70ef;
  background: linear-gradient(135deg, #a487fa, #8262e9);
  box-shadow: 0 5px 12px rgba(115,82,210,0.16);
}

.event-check input:focus-visible + span {
  outline: 3px solid rgba(123,91,236,0.18);
  outline-offset: 2px;
}

.event-choice-panel > .event-custom,
.event-feeling {
  flex: 1;
  min-height: 112px;
}

.event-feeling {
  height: auto;
  resize: vertical;
  line-height: 1.6;
}

.event-year-field,
.event-subcards,
.add-event-subcard {
  grid-column: 1 / -1;
}

.event-subcards {
  display: grid;
  gap: 11px;
}

.event-subcard {
  position: relative;
  padding: 15px;
  border: 1px solid rgba(138,111,238,0.14);
  border-radius: 18px;
  background: rgba(247,244,255,0.72);
}

.event-subcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.event-subcard-head strong {
  color: #735bd0;
  font-size: 13px;
}

.fixed-subcard-tip {
  color: #9a94a6;
  font-size: 10px;
}

.remove-event-subcard {
  display: grid;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #9a7bdd;
  background: rgba(255,255,255,0.86);
  cursor: pointer;
  place-items: center;
  font-size: 18px;
}

.event-subcard-type-field {
  display: block;
}

.event-subcard-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 11px;
}

.event-choice-picker {
  position: relative;
}

.event-choice-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-choice-summary::-webkit-details-marker {
  display: none;
}

.event-choice-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: -4px 3px 0 10px;
  border-right: 1.5px solid #6f687b;
  border-bottom: 1.5px solid #6f687b;
  transform: rotate(45deg);
  transition: transform 160ms ease, margin 160ms ease;
}

.event-choice-picker.is-disabled .event-choice-summary {
  color: #aaa4b3;
  cursor: default;
}

.event-choice-picker[open] .event-choice-summary {
  border-color: rgba(126,91,239,0.5);
  box-shadow: 0 0 0 4px rgba(126,91,239,0.09);
}

.event-choice-picker[open] .event-choice-summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

.event-choice-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 260px;
  gap: 2px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(138,111,238,0.18);
  border-radius: 15px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 16px 32px rgba(71,48,138,0.18);
}

.event-choice-options .event-check {
  display: block;
  width: 100%;
}

.event-choice-options .event-check > span {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.event-choice-options .event-check:hover > span {
  background: rgba(139,112,246,0.07);
}

.event-choice-options .event-check input:checked + span {
  color: #7053d1;
  border: 0;
  background: rgba(139,112,246,0.11);
  box-shadow: none;
}

.event-choice-checkmark {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-left: 10px;
  border: 1px solid rgba(138,111,238,0.24);
  border-radius: 6px;
  color: transparent;
  background: #fff;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.event-choice-options .event-check input:checked + span .event-choice-checkmark {
  border-color: #8a6be9;
  color: #fff;
  background: linear-gradient(135deg, #a487fa, #8262e9);
}

.event-options-placeholder {
  padding: 4px;
  color: #aaa4b3;
  font-size: 12px;
}

.event-choice-done {
  position: sticky;
  bottom: 0;
  width: calc(100% - 8px);
  min-height: 34px;
  margin: 5px 4px 3px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(100deg, #a486f8, #8162e8);
  cursor: pointer;
  font-size: 12px;
}

.event-custom-field {
  display: block;
}

.event-subcard .event-choice-panel > .event-custom,
.event-subcard .event-feeling {
  flex: 0 0 auto;
  width: 100%;
  height: 48px;
  min-height: 48px;
  resize: none;
}

.add-event-subcard {
  min-height: 44px;
  border: 1px dashed rgba(126,91,239,0.34);
  border-radius: 15px;
  color: #765bd3;
  background: rgba(248,245,255,0.72);
  cursor: pointer;
  font-size: 13px;
}

.add-event-subcard span {
  margin-right: 5px;
  font-size: 18px;
}

.event-validation,
.event-minimum-error {
  display: none;
  margin: 11px 0 0;
  color: #bd5570;
  font-size: 12px;
}

.event-reward-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 0;
  padding: 11px 13px;
  border: 1px solid rgba(230, 172, 71, 0.22);
  border-radius: 14px;
  color: #735b2d;
  background: linear-gradient(135deg, rgba(255,250,226,0.88), rgba(255,244,217,0.72));
  font-size: 12px;
  line-height: 1.65;
}

.event-reward-tip p {
  margin: 0;
}

.event-card.invalid {
  border-color: rgba(210, 85, 117, 0.3);
  animation: shake 320ms ease;
}

.event-card.invalid .event-validation,
.event-minimum-error.show {
  display: block;
}

.event-minimum-error {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 239, 244, 0.86);
  text-align: center;
}

.questions {
  display: grid;
  gap: 13px;
}

.question-card {
  position: relative;
  padding: 20px 17px 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.91), rgba(247,245,255,0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.question-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -36px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174,153,255,0.11), transparent 68%);
}

.question-head {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 30px;
  align-items: start;
  gap: 10px;
}

.question-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #a78cff, #7c5cf3);
  box-shadow: 0 8px 18px rgba(119, 83, 230, 0.22);
  font-family: Georgia, serif;
  font-size: 19px;
}

.question-title-wrap {
  padding-top: 4px;
}

.question-title {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
}

.question-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.question-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #8f72f8;
}

.question-icon svg,
.option-icon svg,
.privacy-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 17px;
}

.option {
  position: relative;
  min-width: 0;
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.option-label {
  display: flex;
  align-items: center;
  min-height: 54px;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(138, 111, 238, 0.13);
  border-radius: 18px;
  color: #4f4a58;
  background: rgba(255,255,255,0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.6),
    0 8px 24px rgba(93, 73, 150, 0.05);
  cursor: pointer;
  transition: 180ms ease;
}

.option-label:hover {
  border-color: rgba(135, 103, 239, 0.32);
  transform: translateY(-1px);
}

.radio-mark {
  flex: 0 0 auto;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1.5px solid #c6b8fb;
  border-radius: 50%;
  background: #fff;
  transition: 180ms ease;
}

.radio-mark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: inherit;
  background: linear-gradient(145deg, #a886ff, #7f5ff4);
  transform: scale(0);
  transition: transform 160ms ease;
}

.option input:checked + .option-label {
  color: #684dd0;
  border-color: rgba(130, 92, 244, 0.38);
  background: linear-gradient(135deg, rgba(244,239,255,0.96), rgba(255,255,255,0.96));
  box-shadow: 0 12px 28px rgba(115, 82, 210, 0.12);
}

.option input:checked + .option-label .radio-mark {
  border-color: #8e6cf5;
}

.option input:checked + .option-label .radio-mark::after {
  transform: scale(1);
}

.option input:focus-visible + .option-label {
  outline: 3px solid rgba(123, 91, 236, 0.18);
  outline-offset: 2px;
}

.option-icon {
  flex: 0 0 auto;
  display: grid;
  color: #9479f7;
  place-items: center;
}

.option-text {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-answer {
  width: 100%;
  min-height: 112px;
  margin-top: 16px;
  padding: 14px 15px;
  resize: vertical;
  border: 1px solid rgba(138, 111, 238, 0.16);
  border-radius: 18px;
  outline: 0;
  color: var(--text);
  background: rgba(255,255,255,0.78);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.text-answer:focus {
  border-color: rgba(126, 91, 239, 0.5);
  box-shadow: 0 0 0 4px rgba(126, 91, 239, 0.09);
}

.scale-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.scale-options .option-label {
  justify-content: center;
  min-height: 48px;
  padding: 8px 4px;
}

.scale-options .radio-mark,
.scale-options .option-icon {
  display: none;
}

.validation-message {
  display: none;
  margin: 12px 0 0 48px;
  color: #bd5570;
  font-size: 12px;
}

.question-card.invalid {
  border-color: rgba(210, 85, 117, 0.28);
  animation: shake 320ms ease;
}

.question-card.invalid .validation-message {
  display: block;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 18px;
  color: #8c8798;
  background: rgba(255,255,255,0.58);
  box-shadow: 0 12px 36px rgba(95, 72, 158, 0.06);
  font-size: 12px;
  line-height: 1.6;
}

.privacy-icon {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: #9275f7;
  place-items: center;
}

.action-area {
  padding: 18px 4px 0;
  text-align: center;
}

.primary-button {
  position: relative;
  width: 100%;
  min-height: 58px;
  overflow: hidden;
  border-radius: 999px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 0%, rgba(255,255,255,0.35), transparent 24%),
    linear-gradient(100deg, #aa8bff, #8b65f4 62%, #9f82ff);
  box-shadow:
    0 18px 36px rgba(115, 77, 222, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.44);
  cursor: pointer;
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
  letter-spacing: 0.08em;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-button::before {
  content: "";
  position: absolute;
  top: -90%;
  left: -30%;
  width: 28%;
  height: 280%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.36), transparent);
  transform: rotate(23deg);
  animation: buttonShine 3.4s ease-in-out infinite;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(115, 77, 222, 0.28);
}

.primary-button:active {
  transform: translateY(1px) scale(0.995);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.primary-button.submitted:disabled {
  color: #f8f7fa;
  background: #b8b5bf;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.primary-button.submitted::before {
  display: none;
}

.primary-button.submitted .button-sparkle {
  display: none;
}

.button-sparkle {
  margin-left: 10px;
  font-size: 15px;
}

.skip-button {
  margin-top: 13px;
  padding: 7px 10px;
  color: #8c78dc;
  background: transparent;
  border-bottom: 1px dashed rgba(124, 95, 225, 0.45);
  cursor: pointer;
  font-size: 13px;
}

.skip-button.view-lottery-code {
  padding: 9px 16px;
  border: 1px solid rgba(124,95,225,0.2);
  border-radius: 999px;
  color: #7357d2;
  background: rgba(244,240,255,0.82);
  font-weight: 600;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  max-width: calc(100vw - 36px);
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(39, 34, 55, 0.88);
  box-shadow: 0 12px 28px rgba(24, 19, 42, 0.2);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: 200ms ease;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.dialog-toast {
  z-index: 10000;
  bottom: max(28px, calc(18px + var(--safe-bottom)));
}

.result-dialog {
  width: min(calc(100% - 36px), 420px);
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  text-align: center;
  perspective: 1400px;
}

.result-dialog::backdrop {
  background: rgba(39, 28, 67, 0.26);
  backdrop-filter: blur(5px);
}

.result-dialog h2 {
  margin: 10px 0 7px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 27px;
}

.result-dialog .result-intro {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.result-card-flipper {
  position: relative;
  display: block;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 720ms cubic-bezier(0.2, 0.72, 0.24, 1);
}

.result-card-flipper.is-flipped {
  transform: rotateY(180deg);
}

.result-card-face {
  min-width: 0;
  max-height: calc(100dvh - 32px);
  padding: 24px 20px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 28px;
  background: rgba(252,250,255,0.98);
  box-shadow: 0 34px 100px rgba(66, 46, 122, 0.28);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  backdrop-filter: blur(20px);
}

.result-card-front {
  pointer-events: auto;
}

.result-card-back {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 25%, rgba(201, 188, 247, 0.2), transparent 34%),
    linear-gradient(180deg, #fcfbff 0%, #f7f4ff 100%);
  pointer-events: none;
  transform: rotateY(180deg);
}

.result-card-flipper.is-flipped .result-card-front {
  pointer-events: none;
}

.result-card-flipper.is-flipped .result-card-back {
  pointer-events: auto;
}

.result-orb {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #b39bff, #815ff1);
  box-shadow: 0 14px 30px rgba(113, 77, 221, 0.24);
  place-items: center;
  font-size: 25px;
}

.lottery-ticket {
  position: relative;
  margin: 18px 0 14px;
  overflow: hidden;
  border: 1px solid rgba(132, 94, 231, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,0.35), transparent 22%),
    linear-gradient(145deg, #9978f5, #7553dc);
  box-shadow: 0 18px 38px rgba(90, 61, 178, 0.22);
  color: #fff;
  text-align: left;
}

.ticket-top {
  position: relative;
  padding: 18px 18px 15px;
}

.ticket-kicker {
  color: rgba(255,255,255,0.72);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.ticket-status {
  position: absolute;
  top: 15px;
  right: 16px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 999px;
  background: rgba(255,255,255,0.13);
  font-size: 10px;
}

.ticket-top h3 {
  margin: 9px 0 12px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 23px;
  font-weight: 600;
}

.ticket-top ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket-top li {
  flex: 1;
  padding: 8px 9px;
  border-radius: 11px;
  background: rgba(255,255,255,0.13);
  font-size: 11px;
}

.ticket-divider {
  position: relative;
  height: 1px;
  margin: 0 13px;
  border-top: 1px dashed rgba(255,255,255,0.38);
}

.ticket-divider::before,
.ticket-divider::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(252,250,255,0.96);
}

.ticket-divider::before {
  left: -23px;
}

.ticket-divider::after {
  right: -23px;
}

.ticket-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 18px;
}

.lottery-code-wrap {
  min-width: 0;
}

.lottery-code-wrap > span,
.lottery-code-wrap small {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 10px;
}

.lottery-code-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin: 5px 0 6px;
}

.lottery-code-line strong {
  display: block;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.copy-lottery-code {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 9px;
  color: #fff;
  background: rgba(255,255,255,0.14);
  cursor: pointer;
  place-items: center;
  transition: background 160ms ease, transform 160ms ease;
}

.copy-lottery-code:hover {
  background: rgba(255,255,255,0.22);
}

.copy-lottery-code:active {
  transform: scale(0.94);
}

.copy-lottery-code:focus-visible {
  outline: 2px solid rgba(255,255,255,0.82);
  outline-offset: 2px;
}

.copy-lottery-code svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-qr {
  width: 104px;
  height: 104px;
  padding: 4px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(49,31,105,0.18);
}

.service-qr img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.gift-claim-tip {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 14px;
  color: #625677;
  background: #f3efff;
  text-align: left;
}

.gift-claim-tip strong {
  color: #7255cf;
  font-size: 13px;
}

.gift-claim-tip span {
  font-size: 11px;
  line-height: 1.55;
}

.beta-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 2px 14px;
  padding: 12px 13px;
  border: 1px solid rgba(126, 91, 235, 0.15);
  border-radius: 14px;
  color: #665a79;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.beta-invite-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.beta-invite-copy strong {
  color: #59496f;
  font-size: 13px;
  line-height: 1.55;
}

.beta-invite-copy strong span {
  display: block;
}

.beta-invite-copy small {
  color: #92889f;
  font-size: 10px;
  line-height: 1.55;
}

.beta-download-button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(126, 91, 235, 0.2);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(100deg, #9f81ff, #7c5beb);
  box-shadow: 0 8px 18px rgba(108, 76, 204, 0.18);
  cursor: pointer;
  place-items: center;
}

.beta-download-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.beta-download-button:active {
  transform: scale(0.96);
}

.close-result-dialog {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(100deg, #9f81ff, #7c5beb);
  cursor: pointer;
}

.download-hero-baize-replacement {
  position: absolute;
  z-index: 1;
  top: 7.6%;
  left: 0;
  display: block;
  width: 100%;
  height: 41.8%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.result-card-back::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 53.3%;
  right: 2.5%;
  bottom: 2.8%;
  left: 2.5%;
  border-radius: 0 0 20px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 249, 255, 0.99));
  pointer-events: none;
}

.download-back-hotspot,
.platform-download-card {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.download-back-hotspot {
  top: 2.6%;
  left: 4.8%;
  display: inline-flex;
  width: auto;
  min-width: 104px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 13px;
  border: 1px solid rgba(126, 91, 235, 0.16);
  border-radius: 999px;
  color: #7161ad;
  background: rgba(244, 240, 255, 0.94);
  box-shadow: 0 5px 14px rgba(83, 59, 143, 0.07);
  font-size: 11px;
}

.download-back-hotspot img {
  width: 14px;
  height: 14px;
  opacity: 0.78;
}

.download-invite-copy {
  position: absolute;
  z-index: 2;
  top: 10.2%;
  right: 3.8%;
  display: grid;
  width: 47%;
  justify-items: center;
  row-gap: clamp(8px, 1.25dvh, 13px);
  color: #554f5d;
  text-align: center;
}

.result-dialog .download-invite-copy h2 {
  margin: 0;
  color: #745cc2;
  font-family: "STSong", "Songti SC", serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.download-title-divider {
  position: relative;
  width: 72%;
  margin-bottom: 2px;
  border-top: 1px solid rgba(204, 166, 91, 0.62);
}

.download-title-divider::after {
  content: "◇";
  position: absolute;
  top: -10px;
  left: 50%;
  padding: 0 6px;
  color: #cfaa64;
  background: #fbfaff;
  font-size: 14px;
  transform: translateX(-50%);
}

.download-invite-copy p {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 11px;
  line-height: 1.75;
}

.download-invite-copy strong {
  margin-top: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  color: #7459cf;
  background: rgba(237, 231, 255, 0.9);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.download-device-title {
  position: absolute;
  z-index: 2;
  top: 49.4%;
  left: 50%;
  width: 82%;
  margin: 0;
  color: #715bb8;
  font-family: "STSong", "Songti SC", serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-align: center;
  transform: translateX(-50%);
}

.download-device-title::before,
.download-device-title::after {
  content: "";
  display: inline-block;
  width: 20%;
  margin: 0 10px 4px;
  border-top: 1px solid rgba(155, 132, 219, 0.28);
}

.platform-download-card {
  top: 56%;
  display: grid;
  width: 27.8%;
  height: 30.8%;
  padding: 12px 7px;
  border: 1px solid rgba(126, 91, 235, 0.15);
  border-radius: 12px;
  color: #5d526c;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 14px rgba(83, 59, 143, 0.08);
  text-decoration: none;
  grid-template-rows: 30px 14px auto 27px;
  align-content: space-between;
  justify-items: center;
}

.platform-download-card.apple {
  left: 5.15%;
}

.platform-download-card.android {
  left: 36.15%;
}

.platform-download-card.harmonyos {
  left: 67.15%;
}

.platform-download-card:hover {
  box-shadow:
    0 8px 18px rgba(83, 59, 143, 0.12),
    0 0 0 2px rgba(126, 91, 235, 0.16);
}

.platform-download-card:active {
  transform: scale(0.985);
}

.download-back-hotspot:focus-visible,
.platform-download-card:focus-visible {
  outline: 3px solid rgba(104, 76, 204, 0.5);
  outline-offset: 2px;
}

.platform-qr-image {
  display: block;
  width: 78%;
  height: auto;
  margin: 0;
  padding: 1.2%;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(47, 38, 70, 0.08);
  object-fit: contain;
}

.platform-plain-icon {
  display: block;
  width: 28%;
  height: 30px;
  min-height: 0;
  margin: 0;
  object-fit: contain;
}

.platform-download-card.apple .platform-plain-icon {
  filter: none;
}

.platform-download-card.android .platform-plain-icon {
  filter: none;
}

.platform-download-card.harmonyos .platform-plain-icon {
  filter: none;
}

.platform-download-card > strong {
  align-self: center;
  color: #211f25;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.1;
}

.platform-download-card.apple > strong,
.platform-download-card.android > strong,
.platform-download-card.harmonyos > strong {
  color: #211f25;
}

.platform-download-action {
  display: flex;
  width: 100%;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
}

.platform-download-card .platform-download-action {
  background: linear-gradient(100deg, #a084ff, #7554df);
}

.platform-download-action img {
  width: 10px;
  height: 10px;
  filter: invert(1);
}

.close-download-dialog {
  position: absolute;
  z-index: 3;
  bottom: 4.2%;
  left: 50%;
  min-width: 104px;
  min-height: 34px;
  padding: 7px 20px;
  border: 1px solid rgba(126, 91, 235, 0.2);
  border-radius: 999px;
  color: #7358d2;
  background: rgba(245, 241, 255, 0.95);
  box-shadow: 0 5px 14px rgba(83, 59, 143, 0.09);
  cursor: pointer;
  font-size: 11px;
  transform: translateX(-50%);
}

.close-download-dialog:hover {
  background: #eee8ff;
}

.close-download-dialog:active {
  transform: translateX(-50%) scale(0.97);
}

.close-download-dialog:focus-visible {
  outline: 3px solid rgba(126, 91, 239, 0.2);
  outline-offset: 2px;
}

.error-state {
  padding: 40px 20px;
  border-radius: 24px;
  color: #6e647d;
  background: rgba(255,255,255,0.7);
  text-align: center;
  line-height: 1.8;
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonShine {
  0%, 62% { left: -38%; opacity: 0; }
  72% { opacity: 1; }
  92%, 100% { left: 118%; opacity: 0; }
}

@media (min-width: 480px) {
  .page-shell {
    padding-top: 28px;
  }

  .hero {
    min-height: 335px;
  }

  .options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .option-label {
    justify-content: center;
    padding-inline: 8px;
  }

  .option-text {
    font-size: 13px;
  }
}

@media (max-width: 370px) {
  .birth-date-fields,
  .event-type-detail,
  .event-subcard-detail {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 306px;
    padding-inline: 16px;
  }

  .hero-copy {
    width: 68%;
  }

  .hero h1 {
    font-size: 39px;
  }

  .subtitle {
    font-size: 13px;
  }

  .mascot-stage {
    right: -24px;
    transform: scale(0.88);
  }

  .question-card {
    padding-inline: 14px;
  }

  .options {
    gap: 8px;
  }

  .option-label {
    padding-inline: 10px;
  }

}

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