*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: #0f1419;
  color: #fff8ea;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.4;
}

body.lock {
  overflow: hidden;
}

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 2px solid #fff6d4;
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.phone {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  padding: calc(10px + env(safe-area-inset-top)) 8px calc(16px + env(safe-area-inset-bottom));
  background:
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.5px) 0 0 / 18px 18px,
    radial-gradient(120% 68% at 50% -8%, rgba(255, 153, 0, 0.28), transparent 52%),
    linear-gradient(180deg, #37475a 0%, #232f3e 42%, #131921 100%);
}

.top {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: start;
}

.title-wrap {
  text-align: center;
}

.eyebrow {
  color: #ffe1a8;
  font-size: 12px;
  letter-spacing: 4px;
}

.top h1 {
  margin-top: 2px;
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.15;
  letter-spacing: 1px;
  color: #ff9900;
  text-shadow: 0 2px 0 #131921, 0 5px 0 rgba(0, 0, 0, 0.28);
}

.subtitle {
  margin-top: 4px;
  color: #ffe1a8;
  font-size: 13px;
}

.icon-btn,
.top-spacer {
  width: 36px;
  height: 36px;
}

.icon-btn {
  border: 1px solid rgba(255, 236, 190, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.14);
  color: #fff;
}

.marquee {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  margin: 12px 0 0;
  padding-right: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.marquee-label {
  flex: none;
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ff9900;
  color: #232f3e;
  font-size: 12px;
  font-weight: 700;
}

.marquee-window {
  overflow: hidden;
  flex: 1;
}

.marquee-track {
  display: flex;
  gap: 28px;
  width: max-content;
  color: #ffe7b0;
  font-size: 12px;
  white-space: nowrap;
  animation: ticker 18s linear infinite;
}

.stage {
  margin-top: 22px;
}

.dial {
  --bulb-radius: 180px;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 4px auto 0;
  border-radius: 50%;
  background: #131921;
  box-shadow:
    0 8px 0 rgba(8, 12, 16, 0.55),
    0 16px 24px rgba(0, 0, 0, 0.28);
}

#wheel,
.lights,
.pointer {
  pointer-events: none;
}

#wheel {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.lights {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.lights i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #fff6c8;
  box-shadow: 0 0 6px #ffe08a;
  transform: rotate(var(--a)) translateY(calc(var(--bulb-radius) * -1));
  animation: blink 0.9s infinite;
}

.lights i.alt {
  animation-delay: 0.45s;
}

.dial.is-spinning .lights i {
  animation-duration: 0.28s;
}

.pointer {
  position: absolute;
  z-index: 4;
  top: -18px;
  left: 50%;
  width: 34px;
  height: 44px;
  margin-left: -17px;
  transform-origin: 50% 12px;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.28));
}

.pointer svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pointer.tick {
  animation: wobble 0.12s linear;
}

.hub {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #fff 0 8%, #ffe38a 9% 38%, #f5b42a 72%, #e08a10 100%);
  color: #232f3e;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    inset 0 -4px 0 rgba(176, 78, 0, 0.35),
    0 5px 0 #a86408;
}

.hub.is-spinning,
.hub.is-spinning span {
  font-size: 14px;
}

.hub.is-idle {
  animation: pulse 1.6s ease-in-out infinite;
}

.hub.is-empty {
  filter: saturate(0.65);
}

.hub.shake {
  animation: shake 0.4s linear;
}

.hub:active {
  animation: none;
  transform: translate(-50%, -50%) translateY(3px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    0 2px 0 #a86408;
}

.hub.is-spinning::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.stand {
  width: 42%;
  height: 20px;
  margin: -2px auto 0;
  background: linear-gradient(#f6d98a, #c4842a 55%, #8a5a12);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}

.chances {
  margin: 14px 0 12px;
  text-align: center;
  color: #ffe7c2;
  font-size: 15px;
}

.chances strong {
  display: inline-block;
  min-width: 1.2em;
  color: #fff;
  font-size: 22px;
}

.chances strong.pop {
  animation: pop 0.35s ease;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.actions button {
  padding: 10px 6px;
  border: 1px solid rgba(255, 228, 180, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff6e4;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.actions button:active {
  transform: translateY(1px);
}

.ad-slot {
  margin: 12px auto 0;
}

.ad-slot-medium {
  width: 300px;
  height: 250px;
}

.ad-slot > div {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(255, 228, 180, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 236, 210, 0.78);
  font-size: 12px;
  letter-spacing: 0.4px;
}

.ad-slot-medium > div:empty::before {
  content: "Advertisement · 300×250";
}

.ad-slot > div:not(:empty) {
  border: 0;
  border-radius: 0;
  background: #fff;
}

.pool-window {
  margin: 12px -8px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

.pool {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  animation: ticker 28s linear infinite;
}

.pool li {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-right: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid rgba(255, 236, 190, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff8ea;
  font-size: 12px;
  white-space: nowrap;
}

.pool img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}

.disclaimer {
  margin-top: 14px;
  text-align: center;
  color: rgba(255, 236, 210, 0.78);
  font-size: 12px;
}
