:root {
  --gold: #168163;
  --gold-deep: #075c48;
  --gold-soft: #5ad5b1;
  --brown: #2f6b5b;
  --brown-deep: #123d34;
  --cream: #eefbf6;
  --paper: #fbfffd;
  --line: #bfe8da;
  --shadow: 0 24px 70px rgba(27, 141, 105, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #e5f6f0;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--brown-deep);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 16% 18%, rgba(120, 249, 208, 0.32), transparent 26%),
    radial-gradient(circle at 82% 74%, rgba(66, 236, 182, 0.22), transparent 32%),
    #f3fefb;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.page-shell::before,
.page-shell::after {
  position: absolute;
  z-index: -1;
  width: 440px;
  height: 440px;
  content: "";
  border: 1px solid rgba(46, 214, 161, 0.12);
  border-radius: 50%;
}

.page-shell::before {
  top: 70px;
  left: -210px;
  box-shadow: 0 0 0 54px rgba(46, 214, 161, 0.04), 0 0 0 108px rgba(46, 214, 161, 0.025);
}

.page-shell::after {
  right: -230px;
  bottom: -130px;
  box-shadow: 0 0 0 54px rgba(46, 214, 161, 0.04), 0 0 0 108px rgba(46, 214, 161, 0.025);
}

.site-header {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 88px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(39, 173, 130, 0.16);
}

.brand-logo {
  width: 158px;
  height: auto;
  display: block;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--brown);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border: 1px solid rgba(43, 199, 150, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(30, 127, 96, 0.07);
}

.event-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(63, 240, 184, 0.18);
}

.experience {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100svh - 142px);
  margin: 0 auto;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 50px;
  align-items: center;
  padding: 36px 0 42px;
}

.intro {
  position: relative;
  z-index: 3;
  max-width: 430px;
  padding: 10px 0 20px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1 {
  margin: 0;
  color: var(--brown-deep);
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(4.3rem, 7.8vw, 7.6rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.08em;
  text-shadow: 0 5px 0 rgba(255, 255, 255, 0.9);
}

h1 span {
  display: block;
  color: var(--gold-deep);
  font-size: 0.52em;
  line-height: 1.2;
  letter-spacing: 0.12em;
}

.intro-copy {
  margin: 24px 0 28px;
  color: #578b7a;
  font-size: 1.08rem;
  line-height: 1.75;
}

.intro-copy b {
  color: var(--gold-deep);
  font-weight: 900;
}

.reward-note {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(78, 217, 173, 0.26);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 40px rgba(20, 107, 79, 0.08);
  backdrop-filter: blur(14px);
}

.reward-icon,
.result-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 900;
  border-radius: 50%;
  background: linear-gradient(145deg, #81fad4, #24daa0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 20px rgba(30, 204, 149, 0.24);
}

.reward-note strong,
.reward-note span {
  display: block;
}

.reward-note strong {
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.reward-note span {
  color: #5f9886;
  font-size: 0.82rem;
}

.latest-result {
  display: flex;
  margin-top: 16px;
  padding: 0 4px;
  align-items: center;
  justify-content: space-between;
  color: #689b8b;
  font-size: 0.84rem;
}

.latest-result strong {
  color: var(--gold-deep);
  font-size: 0.94rem;
}

.wheel-stage {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  padding-top: 30px;
}

.stage-glow {
  position: absolute;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(128, 250, 211, 0.64), rgba(199, 253, 236, 0.22) 52%, transparent 70%);
  filter: blur(18px);
}

.wheel-frame {
  position: relative;
  width: min(650px, 50vw);
  aspect-ratio: 1;
  padding: 28px;
  border: 8px solid #59f5c4;
  border-radius: 50%;
  background: linear-gradient(145deg, #dbfef3 0%, #3de5b0 44%, #b7fce6 70%, #26b98a 100%);
  box-shadow:
    0 0 0 9px rgba(255, 255, 255, 0.9),
    0 0 0 13px #52e1b4,
    0 28px 70px rgba(23, 123, 91, 0.28),
    inset 0 0 0 7px rgba(255, 255, 255, 0.64);
}

.wheel-frame::before {
  position: absolute;
  inset: 8px;
  z-index: 3;
  content: "";
  pointer-events: none;
  border: 3px dotted rgba(255, 255, 255, 0.84);
  border-radius: 50%;
}

.wheel {
  --settled-rotation: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 7px solid white;
  border-radius: 50%;
  background: conic-gradient(
    from -22.5deg,
    #2cd59f 0deg 43.5deg, #fff 43.5deg 45deg,
    #eafef8 45deg 88.5deg, #fff 88.5deg 90deg,
    #3be1ac 90deg 133.5deg, #fff 133.5deg 135deg,
    #eafef8 135deg 178.5deg, #fff 178.5deg 180deg,
    #2cd59f 180deg 223.5deg, #fff 223.5deg 225deg,
    #eafef8 225deg 268.5deg, #fff 268.5deg 270deg,
    #3be1ac 270deg 313.5deg, #fff 313.5deg 315deg,
    #eafef8 315deg 358.5deg, #fff 358.5deg 360deg
  );
  box-shadow: inset 0 0 34px rgba(19, 99, 74, 0.16);
  transition: transform 6s cubic-bezier(0.12, 0.78, 0.08, 1);
  will-change: transform;
}

.wheel::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 26%, rgba(255, 255, 255, 0.1) 27% 66%, rgba(255, 255, 255, 0.3) 100%);
}

.prize-label {
  --angle: calc(var(--i) * 45deg);
  --label-radius: min(15.4vw, 200px);
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  width: 112px;
  height: 72px;
  margin-left: -56px;
  margin-top: -36px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transform: rotate(var(--angle)) translateY(calc(-1 * var(--label-radius))) rotate(calc(-1 * var(--angle) - var(--settled-rotation)));
  transform-origin: center;
  text-align: center;
  backface-visibility: hidden;
}

.prize-label b {
  font-size: clamp(1.55rem, 3.1vw, 2.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.prize-label small {
  margin-top: 5px;
  font-size: clamp(0.62rem, 1.2vw, 0.8rem);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.prize-label.gold {
  color: white;
  text-shadow: 0 2px 8px rgba(14, 116, 84, 0.28);
}

.prize-label.pale {
  color: var(--brown);
}

.spin-button {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: 25%;
  aspect-ratio: 1;
  place-content: center;
  border: 8px solid white;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #81fad4 0%, #37efb5 48%, #22d49c 100%);
  box-shadow: 0 12px 30px rgba(14, 97, 71, 0.36), inset 0 2px 2px rgba(255, 255, 255, 0.72);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.spin-button:hover {
  transform: translate(-50%, -50%) scale(1.045);
  box-shadow: 0 15px 36px rgba(14, 97, 71, 0.42), inset 0 2px 2px rgba(255, 255, 255, 0.78);
}

.spin-button:active {
  transform: translate(-50%, -50%) scale(0.98);
}

.spin-button:focus-visible,
.submit-claim:focus-visible,
.done-button:focus-visible,
.close-dialog:focus-visible {
  outline: 3px solid #196d52;
  outline-offset: 4px;
}

.spin-button:disabled {
  filter: saturate(0.7);
  cursor: wait;
}

.spin-button span,
.spin-button small {
  display: block;
}

.spin-button span {
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  font-weight: 900;
  line-height: 0.88;
}

.spin-button.has-result {
  background: linear-gradient(145deg, #196d52 0%, #28a47d 48%, #31d8a3 100%);
  box-shadow: 0 13px 32px rgba(25, 81, 63, 0.42), inset 0 2px 2px rgba(255, 255, 255, 0.58);
}

.spin-button.has-result span {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.spin-button.is-loading span {
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.08em;
}

.spin-button small {
  margin-top: 7px;
  font-size: clamp(0.52rem, 0.8vw, 0.7rem);
  font-weight: 900;
  letter-spacing: 0.22em;
}

.pointer {
  position: absolute;
  z-index: 7;
  top: 1px;
  left: 50%;
  width: 74px;
  height: 82px;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 8px rgba(15, 109, 79, 0.28));
}

.pointer::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 46px;
  height: 46px;
  content: "";
  border: 6px solid white;
  border-radius: 50%;
  background: linear-gradient(145deg, #81fad4, #2ae4a9);
  transform: translateX(-50%);
}

.pointer span {
  position: absolute;
  top: 33px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 48px solid #2fe9ae;
  border-right: 27px solid transparent;
  border-left: 27px solid transparent;
  transform: translateX(-50%);
}

.wheel-stage.is-spinning .pointer {
  animation: pointer-tick 150ms ease-in-out infinite alternate;
}

.spin-hint {
  margin: 27px 0 0;
  color: #55917e;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.site-footer {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  margin: -28px auto 0;
  padding: 18px 0 24px;
  justify-content: space-between;
  color: #7aa99a;
  font-size: 0.75rem;
  border-top: 1px solid rgba(39, 173, 130, 0.12);
}

.result-dialog {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 66, 50, 0.44);
  backdrop-filter: blur(8px);
}

.result-dialog[hidden] {
  display: none;
}

.result-card {
  position: relative;
  width: min(390px, 100%);
  padding: 42px 30px 30px;
  text-align: center;
  border: 1px solid rgba(122, 249, 209, 0.7);
  border-radius: 26px;
  background: linear-gradient(155deg, #fafffd, #ddfef3);
  box-shadow: 0 28px 80px rgba(11, 60, 44, 0.36), inset 0 0 0 6px white;
  animation: result-in 360ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.result-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  font-size: 1.7rem;
}

.result-kicker,
.success-step > p {
  margin: 0 0 8px;
  color: #5a9884;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
}

.result-card h2 {
  margin: 0 0 24px;
  color: var(--brown-deep);
  font-size: 2.3rem;
}

#result-title {
  display: flex;
  width: min(286px, 100%);
  min-height: 86px;
  margin: 0 auto 24px;
  padding: 13px 18px;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(59, 225, 172, 0.34);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 4px rgba(222, 254, 244, 0.84), 0 12px 30px rgba(28, 147, 109, 0.1);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.result-card h2 span {
  color: var(--gold-deep);
  font-size: 1.35em;
}

body.dialog-open {
  overflow: hidden;
}

.close-dialog {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #5f9987;
  font-size: 1.5rem;
  line-height: 1;
  background: transparent;
  cursor: pointer;
}

.claim-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  text-align: left;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  color: #2c6754;
  font-size: 0.84rem;
  font-weight: 800;
}

.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #bde9db;
  border-radius: 12px;
  color: var(--brown-deep);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-field input::placeholder {
  color: #90b7ab;
}

.form-field input:focus {
  border-color: var(--gold);
  background: white;
  box-shadow: 0 0 0 4px rgba(63, 240, 184, 0.14);
}

.form-field input[aria-invalid="true"] {
  border-color: #c95646;
  box-shadow: 0 0 0 3px rgba(201, 86, 70, 0.1);
}

.field-error {
  min-height: 17px;
  color: #b54539;
  font-size: 0.73rem;
  line-height: 1.35;
}

.privacy-note {
  margin: -2px 0 0;
  color: #74a193;
  font-size: 0.73rem;
  line-height: 1.55;
  text-align: center;
}

.submit-claim,
.done-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, #29dfa5, #4df3be);
  box-shadow: 0 10px 22px rgba(30, 206, 150, 0.24);
  cursor: pointer;
}

.submit-claim:disabled {
  cursor: wait;
  filter: saturate(0.55);
}

.success-step {
  padding: 20px 0 2px;
  text-align: center;
  animation: result-in 360ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.success-step[hidden] {
  display: none;
}

.success-check {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  color: white;
  font-size: 2.25rem;
  font-weight: 900;
  background: linear-gradient(145deg, #81fad4, #24daa0);
  box-shadow: 0 12px 28px rgba(30, 204, 149, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.success-step h2 {
  margin: 0;
  color: var(--gold-deep);
  font-size: 2rem;
}

.success-step > span {
  display: block;
  margin: 8px 0 28px;
  color: #538c7a;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

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

.confetti i {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 16px;
  border-radius: 2px;
  animation: confetti-fall var(--fall-time) linear var(--delay) forwards;
}

@keyframes pointer-tick {
  from { transform: translateX(-50%) rotate(-7deg); }
  to { transform: translateX(-50%) rotate(7deg); }
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(18px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confetti-fall {
  0% { transform: translate3d(0, -20px, 0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--drift), 105vh, 0) rotate(660deg); opacity: 0.85; }
}

@media (max-width: 900px) {
  .experience {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 28px;
  }

  .intro {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
  }

  h1 {
    font-size: clamp(3.5rem, 13vw, 6rem);
  }

  h1 span {
    display: inline;
    margin-right: 0.16em;
    font-size: 0.48em;
    letter-spacing: 0.06em;
  }

  .intro-copy {
    margin: 16px 0 20px;
  }

  .reward-note {
    display: inline-flex;
    text-align: left;
  }

  .latest-result {
    max-width: 360px;
    margin: 14px auto 0;
  }

  .wheel-stage {
    padding-top: 34px;
  }

  .wheel-frame {
    width: min(650px, 84vw);
  }

  .prize-label {
    --label-radius: min(25.7vw, 200px);
  }

  .site-footer {
    margin-top: 10px;
  }
}

@media (max-width: 540px) {
  .site-header {
    width: calc(100% - 28px);
    min-height: 58px;
  }

  .brand-logo {
    width: 112px;
  }

  .event-badge {
    padding: 7px 10px;
    font-size: 0.66rem;
  }

  .experience {
    width: calc(100% - 24px);
    min-height: auto;
    gap: 0;
    padding: 12px 0 4px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 0.67rem;
  }

  h1 {
    font-size: clamp(3.1rem, 12vw, 4.4rem);
  }

  .intro-copy {
    margin: 6px 0 8px;
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .reward-note {
    gap: 10px;
    padding: 8px 11px;
    border-radius: 15px;
  }

  .reward-icon {
    width: 40px;
    height: 40px;
    font-size: 1.16rem;
  }

  .reward-note span {
    font-size: 0.7rem;
  }

  .latest-result {
    margin-top: 6px;
  }

  .wheel-stage {
    padding-top: 10px;
  }

  .wheel-frame {
    --mobile-wheel-size: min(82vw, 320px);
    width: var(--mobile-wheel-size);
    min-width: var(--mobile-wheel-size);
    max-width: var(--mobile-wheel-size);
    height: var(--mobile-wheel-size);
    min-height: var(--mobile-wheel-size);
    max-height: var(--mobile-wheel-size);
    aspect-ratio: auto;
    flex: 0 0 var(--mobile-wheel-size);
    padding: 17px;
    border-width: 6px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .9), 0 0 0 9px #52e1b4, 0 22px 52px rgba(23, 123, 91, .24), inset 0 0 0 4px rgba(255, 255, 255, .64);
  }

  .wheel {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    aspect-ratio: auto;
    border-width: 4px;
  }

  .wheel-frame::before {
    inset: 4px;
    border-width: 2px;
  }

  .pointer {
    top: 6px;
    transform: translateX(-50%) scale(0.76);
    transform-origin: top center;
  }

  .wheel-stage.is-spinning .pointer {
    animation: none;
  }

  .prize-label {
    --label-radius: min(22vw, 86px);
    width: 78px;
    height: 54px;
    margin-left: -39px;
    margin-top: -27px;
  }

  .prize-label b {
    font-size: clamp(1.15rem, 5.4vw, 1.55rem);
  }

  .prize-label small {
    margin-top: 3px;
    font-size: 0.64rem;
    line-height: 1;
  }

  .spin-hint {
    margin-top: 10px;
    font-size: 0.76rem;
  }

  .site-footer {
    width: calc(100% - 28px);
    margin-top: 0;
    padding: 9px 0 calc(10px + env(safe-area-inset-bottom));
    align-items: center;
    flex-direction: column;
    gap: 3px;
    font-size: 0.68rem;
  }

  .result-card {
    padding: 36px 22px 24px;
    border-radius: 22px;
  }

  .result-card h2 {
    margin-bottom: 20px;
    font-size: 2rem;
  }

  #result-title {
    min-height: 76px;
    margin-bottom: 20px;
  }

  .spin-button.has-result span {
    font-size: clamp(1.28rem, 6.2vw, 1.65rem);
  }

  .claim-form {
    margin-top: 20px;
  }
}

@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;
  }
}
