:root {
  color-scheme: light;
  --bg-main: #fffdf8;
  --bg-accent: #f5f8ff;
  --text-primary: #221713;
  --text-secondary: #685d55;
  --line-soft: rgba(127, 29, 29, 0.1);
  --line-strong: rgba(127, 29, 29, 0.18);
  --surface: rgba(255, 255, 255, 0.9);
  --red: #b91c1c;
  --red-deep: #861414;
  --red-soft: #fff1f1;
  --gold: #f8cf4d;
  --gold-deep: #b7791f;
  --blue: #2563eb;
  --blue-soft: #edf5ff;
  --shadow-soft: 0 18px 48px rgba(63, 26, 18, 0.09);
  --shadow-strong: 0 26px 58px rgba(127, 29, 29, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(248, 207, 77, 0.22), transparent 16%),
    radial-gradient(circle at 86% 8%, rgba(37, 99, 235, 0.12), transparent 18%),
    linear-gradient(135deg, rgba(185, 28, 28, 0.08), transparent 30%),
    linear-gradient(180deg, var(--bg-main), var(--bg-accent));
  color: var(--text-primary);
}

body {
  position: relative;
  overflow-x: hidden;
}

body.has-modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(248, 207, 77, 0.52) 0 3px, transparent 4px),
    linear-gradient(rgba(185, 28, 28, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px);
  background-size: 128px 128px, 24px 24px, 24px 24px;
  background-position: 24px 58px, 0 0, 0 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 78%);
  pointer-events: none;
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 56px;
}

.app-shell {
  display: grid;
  gap: 28px;
}

.page-copy {
  display: grid;
  gap: 14px;
}

.eyebrow {
  margin: 0;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(185, 28, 28, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  color: var(--red-deep);
  text-wrap: balance;
}

.subtitle {
  margin: 0;
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-row span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(185, 28, 28, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.experience-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.wheel-panel,
.prize-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 244, 0.92));
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.wheel-panel {
  position: relative;
  padding: 28px;
  overflow: hidden;
}

.wheel-panel::before {
  content: "";
  position: absolute;
  inset: 14px 14px auto;
  height: 38%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(248, 207, 77, 0.2), transparent 70%);
  pointer-events: none;
}

.wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  width: min(100%, 640px);
  margin: 0 auto;
}

.wheel-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow:
    var(--shadow-strong),
    0 0 0 10px rgba(255, 255, 255, 0.7);
  will-change: transform;
}

.pointer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 82px));
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 0;
  border-bottom: 24px solid #ffffff;
  z-index: 5;
  pointer-events: none;
  filter:
    drop-shadow(0 7px 12px rgba(91, 28, 28, 0.2))
    drop-shadow(0 0 0 3px rgba(248, 207, 77, 0.42));
}

.spin-button {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(108px, 18vw, 132px);
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.36), transparent 30%),
    linear-gradient(180deg, var(--red), var(--red-deep));
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow:
    0 18px 40px rgba(185, 28, 28, 0.28),
    0 0 0 7px rgba(248, 207, 77, 0.18);
  z-index: 3;
}

.spin-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.spin-button:disabled {
  cursor: not-allowed;
  opacity: 1;
  filter: saturate(0.92) brightness(0.96);
}

.result-panel {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid rgba(185, 28, 28, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 237, 0.98));
  box-shadow: 0 14px 30px rgba(127, 29, 29, 0.06);
}

.draw-access {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
  background: rgba(237, 245, 255, 0.9);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.draw-access.is-error {
  border-color: rgba(185, 28, 28, 0.16);
  background: rgba(255, 241, 241, 0.92);
  color: var(--red-deep);
}

.result-label {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-image-wrap {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(185, 28, 28, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.result-image-wrap.is-hidden {
  display: none;
}

.result-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  display: block;
}

.result-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.result-panel p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.prize-panel {
  padding: 24px;
}

.panel-copy {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.panel-copy h2 {
  margin: 0;
  width: fit-content;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  color: #ffffff;
  font-size: 18px;
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.18);
}

.panel-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

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

.prize-item {
  display: grid;
  grid-template-columns: 14px 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--prize-card-border, var(--line-soft));
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.92)),
    var(--prize-card-bg, rgba(255, 255, 255, 0.86));
  box-shadow: 0 8px 20px rgba(91, 28, 28, 0.04);
}

.prize-item.is-display-only {
  border-color: var(--prize-card-border, rgba(248, 207, 77, 0.4));
  background:
    linear-gradient(180deg, rgba(255, 253, 242, 0.68), rgba(255, 255, 255, 0.9)),
    var(--prize-card-bg, rgba(255, 253, 242, 0.92));
}

.prize-mark {
  width: 14px;
  height: 52px;
  border-radius: 999px;
  background: var(--prize-color);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.prize-thumb-wrap {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.prize-thumb-wrap.is-empty {
  background:
    linear-gradient(135deg, rgba(148, 163, 184, 0.08), rgba(226, 232, 240, 0.48));
}

.prize-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  display: block;
}

.prize-copy {
  min-width: 0;
}

.prize-copy p {
  margin: 0;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.36;
}

.prize-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.prize-meta strong {
  min-width: 54px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--prize-pill-bg, var(--blue-soft));
  color: var(--prize-pill-text, var(--blue));
  font-size: 15px;
  font-weight: 900;
}

.prize-meta span {
  color: var(--text-secondary);
  font-size: 13px;
}

.prize-reveal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}

.prize-reveal.is-hidden {
  display: none;
}

.prize-reveal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(248, 207, 77, 0.26), transparent 34%),
    rgba(34, 23, 19, 0.58);
  backdrop-filter: blur(6px);
  animation: fadeIn 260ms ease-out;
}

.prize-reveal-card {
  position: relative;
  width: min(100%, 500px);
  padding: 30px 28px 26px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 244, 0.98) 48%, rgba(255, 246, 246, 0.98));
  border: 1px solid rgba(248, 207, 77, 0.46);
  box-shadow:
    0 30px 70px rgba(91, 28, 28, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  animation: revealCardIn 380ms cubic-bezier(0.12, 0.86, 0.18, 1);
}

.prize-reveal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--red-deep);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.prize-reveal-label {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prize-reveal-image-wrap {
  width: min(260px, 74vw);
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(248, 207, 77, 0.36);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.92));
  box-shadow:
    0 22px 44px rgba(249, 115, 22, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  animation: revealPrizeImage 560ms cubic-bezier(0.12, 0.86, 0.18, 1);
}

.prize-reveal-image-wrap.is-hidden {
  display: none;
}

.prize-reveal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  display: block;
}

.prize-reveal-card h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.06;
}

.prize-reveal-card p:last-of-type {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  max-width: 34ch;
}

.prize-reveal-button {
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(185, 28, 28, 0.24);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes revealCardIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes revealPrizeImage {
  0% {
    opacity: 0;
    transform: scale(0.68) translateY(18px) rotate(-8deg);
  }
  58% {
    opacity: 1;
    transform: scale(1.06) translateY(-4px) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100%, calc(100% - 24px));
    padding: 24px 0 40px;
  }

  .experience-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .wheel-panel {
    padding: 18px;
  }

  .wheel-stage {
    width: min(100%, 560px);
  }
}

@media (max-width: 640px) {
  body::before {
    background-size: 96px 96px, 22px 22px, 22px 22px;
    opacity: 0.7;
  }

  .page-shell {
    width: min(100%, calc(100% - 16px));
    padding: 14px 0 28px;
  }

  .app-shell {
    gap: 16px;
  }

  .page-copy {
    gap: 10px;
    text-align: center;
    justify-items: center;
  }

  .eyebrow {
    max-width: 100%;
    padding: 7px 12px;
    font-size: 12px;
  }

  .page-copy h1 {
    font-size: 30px;
  }

  .subtitle {
    max-width: 31ch;
    font-size: 14px;
    line-height: 1.5;
  }

  .status-row {
    justify-content: center;
    gap: 6px;
  }

  .status-row span {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  .wheel-panel,
  .prize-panel {
    border-radius: 16px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .wheel-panel {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .wheel-stage {
    width: min(100%, calc(100vw - 40px));
    max-width: 380px;
  }

  .wheel-canvas {
    box-shadow:
      0 18px 38px rgba(127, 29, 29, 0.14),
      0 0 0 5px rgba(255, 255, 255, 0.72);
  }

  .pointer {
    transform: translate(-50%, calc(-50% - 52px));
    border-left-width: 12px;
    border-right-width: 12px;
    border-bottom-width: 18px;
  }

  .spin-button {
    width: 82px;
    border-width: 4px;
    font-size: 14px;
    box-shadow:
      0 14px 28px rgba(185, 28, 28, 0.22),
      0 0 0 5px rgba(248, 207, 77, 0.16);
  }

  .result-panel {
    margin-top: 14px;
    padding: 14px;
  }

  .result-label {
    font-size: 12px;
  }

  .result-image-wrap {
    max-width: 96px;
    margin-bottom: 10px;
  }

  .result-panel h2 {
    font-size: 21px;
  }

  .result-panel p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
  }

  .prize-panel {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .panel-copy {
    margin-bottom: 12px;
  }

  .panel-copy h2 {
    font-size: 16px;
  }

  .panel-copy p {
    font-size: 13px;
    line-height: 1.5;
  }

  .prize-list {
    gap: 8px;
  }

  .prize-item {
    grid-template-columns: 8px 46px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px;
    border-radius: 12px;
  }

  .prize-mark {
    width: 8px;
    height: 42px;
  }

  .prize-thumb-wrap {
    width: 46px;
    height: 46px;
    border-radius: 10px;
  }

  .prize-copy p {
    font-size: 14px;
    line-height: 1.32;
  }

  .prize-meta {
    grid-column: auto;
    justify-items: end;
    text-align: right;
  }

  .prize-meta strong {
    min-width: 42px;
    min-height: 26px;
    font-size: 12px;
  }

  .prize-reveal {
    padding: 14px;
  }

  .prize-reveal-card {
    padding: 24px 18px 20px;
    border-radius: 20px;
    gap: 12px;
  }

  .prize-reveal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
  }

  .prize-reveal-image-wrap {
    width: min(230px, 72vw);
    border-radius: 18px;
  }

  .prize-reveal-card h2 {
    font-size: 28px;
  }

  .prize-reveal-card p:last-of-type {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .page-shell {
    width: min(100%, calc(100% - 12px));
  }

  .wheel-stage {
    width: min(100%, calc(100vw - 30px));
  }

  .spin-button {
    width: 74px;
    font-size: 13px;
  }

  .pointer {
    transform: translate(-50%, calc(-50% - 47px));
  }

  .prize-item {
    grid-template-columns: 7px 42px minmax(0, 1fr);
  }

  .prize-meta {
    grid-column: 3;
    justify-items: start;
    text-align: left;
  }
}
