:root {
  color-scheme: dark;
  --bg: #0b090c;
  --bg-soft: #121014;
  --panel: rgba(31, 25, 29, 0.74);
  --panel-strong: rgba(39, 31, 35, 0.92);
  --ink: #f7f1e7;
  --ink-soft: #d8cdbf;
  --muted: #9b8f87;
  --muted-dim: #746a65;
  --gold: #f2c977;
  --gold-bright: #ffe4a6;
  --gold-deep: #b98037;
  --gold-wash: rgba(242, 201, 119, 0.12);
  --line: rgba(242, 201, 119, 0.16);
  --line-strong: rgba(242, 201, 119, 0.35);
  --red: #e05b50;
  --red-soft: rgba(224, 91, 80, 0.16);
  --green: #60d8b4;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  --font-sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans CJK SC", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun",
    serif;
  --font-number: "Bahnschrift", "DIN Alternate", "Arial Narrow", var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 7% 6%, rgba(150, 44, 43, 0.28), transparent 37%),
    radial-gradient(ellipse at 92% 12%, rgba(179, 122, 44, 0.13), transparent 34%),
    radial-gradient(ellipse at 50% 114%, rgba(111, 30, 39, 0.2), transparent 46%),
    linear-gradient(145deg, #100c10 0%, var(--bg) 47%, #080709 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 10%, transparent 74%);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(242, 201, 119, 0.28);
  color: #fff8e8;
}

/* Background atmosphere -------------------------------------------------- */

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

.ambient-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.7;
}

.ambient-orb--one {
  top: -200px;
  left: -170px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(165, 45, 45, 0.26), transparent 66%);
  animation: drift-one 18s ease-in-out infinite alternate;
}

.ambient-orb--two {
  right: -190px;
  bottom: -260px;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(201, 142, 54, 0.17), transparent 67%);
  animation: drift-two 22s ease-in-out infinite alternate;
}

.ambient-ring {
  position: absolute;
  display: block;
  border: 1px solid rgba(242, 201, 119, 0.075);
  border-radius: 50%;
}

.ambient-ring--one {
  top: 48%;
  left: 51%;
  width: 880px;
  height: 880px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 80px rgba(242, 201, 119, 0.018);
  animation: ring-turn 60s linear infinite;
}

.ambient-ring--two {
  top: 48%;
  left: 51%;
  width: 1120px;
  height: 1120px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.04);
  transform: translate(-50%, -50%);
  animation: ring-turn 90s linear infinite reverse;
}

.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.5px, transparent 0.5px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

@keyframes drift-one {
  to {
    transform: translate3d(55px, 45px, 0) scale(1.08);
  }
}

@keyframes drift-two {
  to {
    transform: translate3d(-45px, -55px, 0) scale(1.06);
  }
}

@keyframes ring-turn {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(100%, 1500px);
  height: 92px;
  margin: 0 auto;
  padding: 0 34px;
}

.site-header::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: 0;
  left: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 201, 119, 0.2), transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
}

.brand-seal {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(242, 201, 119, 0.5);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(242, 201, 119, 0.16), transparent 60%),
    rgba(41, 28, 27, 0.68);
  box-shadow:
    inset 0 0 0 4px rgba(9, 8, 10, 0.44),
    0 8px 24px rgba(0, 0, 0, 0.25);
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  transform: rotate(-3deg);
}

.brand-seal::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(242, 201, 119, 0.14);
  border-radius: 8px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.38em;
  line-height: 1;
}

.header-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.live-pulse {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(96, 216, 180, 0.7);
}

.live-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(96, 216, 180, 0.45);
  border-radius: 50%;
  animation: live-ping 2.2s ease-out infinite;
}

@keyframes live-ping {
  0% {
    opacity: 0.7;
    transform: scale(0.6);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sound-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.sound-toggle:hover {
  border-color: var(--line-strong);
  background: rgba(242, 201, 119, 0.07);
  color: var(--gold);
}

.sound-toggle svg {
  width: 17px;
  height: 17px;
}

.sound-toggle .sound-off {
  display: none;
}

.sound-toggle.is-muted .sound-on {
  display: none;
}

.sound-toggle.is-muted .sound-off {
  display: block;
}

.admin-link {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid rgba(242, 201, 119, 0.18);
  border-radius: 999px;
  background: rgba(242, 201, 119, 0.035);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.admin-link:hover {
  border-color: rgba(242, 201, 119, 0.45);
  background: rgba(242, 201, 119, 0.09);
  color: var(--gold-bright);
}

.admin-link svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
}

/* Main layout ------------------------------------------------------------ */

.site-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(440px, 1.25fr) minmax(300px, 0.9fr);
  gap: clamp(24px, 3.1vw, 48px);
  align-items: center;
  width: min(100%, 1500px);
  min-height: calc(100vh - 172px);
  margin: 0 auto;
  padding: 38px 34px 34px;
}

/* Intro ------------------------------------------------------------------ */

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

.intro-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 23px;
}

.ornament {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-number);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1;
}

.intro h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(3.4rem, 4.7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.intro h1 span,
.intro h1 em {
  display: block;
}

.intro h1 em {
  position: relative;
  width: max-content;
  margin-top: 4px;
  background: linear-gradient(110deg, #fff5d8 4%, var(--gold) 42%, #c19045 91%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
  text-shadow: 0 14px 40px rgba(218, 170, 82, 0.1);
}

.intro h1 em::after {
  content: "✦";
  position: absolute;
  top: -8px;
  right: -23px;
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 13px;
  opacity: 0.7;
  text-shadow: 0 0 18px rgba(242, 201, 119, 0.6);
}

.intro-copy {
  max-width: 290px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1.8;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 38px;
}

.stat-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.stat-item strong {
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-item span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 25px;
  background: linear-gradient(transparent, rgba(242, 201, 119, 0.24), transparent);
}

.fair-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 310px;
  margin-top: 36px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.037), rgba(242, 201, 119, 0.02));
}

.fair-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(242, 201, 119, 0.17);
  border-radius: 50%;
  background: rgba(242, 201, 119, 0.05);
  color: var(--gold);
}

.fair-icon svg {
  width: 14px;
  height: 14px;
}

.fair-note p {
  margin: 1px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.55;
}

.fair-note p span {
  display: block;
  margin-top: 2px;
  color: var(--muted-dim);
  font-size: 10px;
}

.site-notice {
  max-width: 310px;
  margin: 21px 0 0;
  padding-left: 11px;
  border-left: 1px solid rgba(242, 201, 119, 0.21);
  color: var(--muted-dim);
  font-size: 10px;
  line-height: 1.7;
}

/* Wheel ------------------------------------------------------------------ */

.wheel-stage {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.stage-heading {
  display: flex;
  width: min(100%, 560px, 60vh);
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 16px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.22em;
}

.stage-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.stage-hint i {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(242, 201, 119, 0.8);
}

.wheel-wrap {
  position: relative;
  display: grid;
  width: min(100%, 560px, 60vh);
  aspect-ratio: 1;
  place-items: center;
  isolation: isolate;
}

.wheel-aura {
  position: absolute;
  inset: 3%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(242, 201, 119, 0.13) 20%,
    rgba(194, 77, 58, 0.09) 52%,
    transparent 72%
  );
  filter: blur(26px);
  animation: aura-breathe 5.5s ease-in-out infinite;
}

@keyframes aura-breathe {
  50% {
    opacity: 0.65;
    transform: scale(1.04);
  }
}

#wheelCanvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 34px 48px rgba(0, 0, 0, 0.47));
  touch-action: manipulation;
}

.wheel-pointer {
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 6;
  display: flex;
  width: 48px;
  height: 70px;
  align-items: center;
  flex-direction: column;
  transform: translateX(-50%);
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.pointer-crown {
  position: relative;
  z-index: 2;
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid #ffe9b0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 26%, #fff4cb 0 12%, transparent 13%),
    radial-gradient(circle at 38% 32%, #f8d58a, #bd823a 64%, #74481e 100%);
  box-shadow:
    0 0 0 4px rgba(25, 15, 13, 0.7),
    0 0 22px rgba(242, 201, 119, 0.6);
}

.pointer-tip {
  display: block;
  width: 0;
  height: 0;
  margin-top: -5px;
  border-top: 34px solid #e8b75e;
  border-right: 16px solid transparent;
  border-left: 16px solid transparent;
}

.spin-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  width: clamp(92px, 23.5%, 132px);
  height: clamp(92px, 23.5%, 132px);
  padding: 0;
  place-items: center;
  border: 1px solid #ffe6a7;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 250, 225, 0.95), transparent 24%),
    radial-gradient(circle at 46% 38%, #f8d87f 0%, #e7b75d 45%, #a86d26 78%, #7d4a19 100%);
  box-shadow:
    0 0 0 7px #1c1315,
    0 0 0 9px rgba(242, 201, 119, 0.64),
    0 0 0 12px rgba(17, 11, 12, 0.86),
    0 15px 38px rgba(0, 0, 0, 0.55),
    inset 0 2px 3px rgba(255, 255, 255, 0.55),
    inset 0 -10px 18px rgba(95, 48, 8, 0.3);
  color: #2d1a0d;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 180ms ease;
}

.spin-button::before {
  content: "";
  position: absolute;
  inset: -21px;
  z-index: -1;
  border: 1px solid rgba(242, 201, 119, 0.27);
  border-radius: 50%;
  animation: button-halo 3.2s ease-out infinite;
}

.spin-button::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(81, 45, 14, 0.35);
  border-radius: 50%;
  pointer-events: none;
}

@keyframes button-halo {
  0% {
    opacity: 0.65;
    transform: scale(0.96);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

.spin-button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translate(-50%, -50%) scale(1.04);
}

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

.spin-button:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 15px;
}

.spin-button:disabled {
  cursor: wait;
  filter: saturate(0.74) brightness(0.84);
}

.spin-button.is-unavailable {
  cursor: not-allowed;
}

.spin-ring {
  position: absolute;
  inset: 15px;
  border: 1px solid rgba(86, 48, 13, 0.19);
  border-radius: 50%;
}

.spin-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1px;
  user-select: none;
}

.spin-label b {
  font-family: var(--font-serif);
  font-size: clamp(23px, 2.3vw, 30px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-indent: 0.12em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.spin-label small {
  font-size: clamp(8px, 0.8vw, 10px);
  font-weight: 600;
  letter-spacing: 0.36em;
  line-height: 1.2;
  opacity: 0.64;
  text-indent: 0.36em;
}

.wheel-badge {
  position: absolute;
  bottom: 18px;
  left: 50%;
  z-index: 3;
  display: flex;
  height: 19px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(242, 201, 119, 0.23);
  border-radius: 999px;
  background: rgba(18, 13, 15, 0.74);
  color: rgba(242, 201, 119, 0.68);
  font-family: var(--font-number);
  font-size: 6px;
  letter-spacing: 0.17em;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.wheel-badge i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--gold);
}

.result-panel {
  position: relative;
  display: flex;
  width: min(100%, 390px);
  min-height: 88px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  overflow: hidden;
  padding: 13px 22px;
  border: 1px solid rgba(242, 201, 119, 0.14);
  border-radius: 17px;
  background:
    linear-gradient(110deg, rgba(242, 201, 119, 0.055), transparent 43%),
    linear-gradient(160deg, rgba(35, 27, 30, 0.86), rgba(17, 13, 16, 0.86));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition:
    border-color 500ms ease,
    box-shadow 500ms ease;
  backdrop-filter: blur(16px);
}

.result-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 201, 119, 0.45), transparent);
}

.result-empty {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.result-empty span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.26em;
}

.result-empty strong {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.result-win {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
}

.result-kicker {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.result-win strong {
  max-width: 320px;
  overflow: hidden;
  color: var(--win-color, var(--gold-bright));
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-shadow: 0 0 26px color-mix(in srgb, var(--win-color, #f2c977) 34%, transparent);
  white-space: nowrap;
}

.result-win small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.result-panel.is-win {
  border-color: color-mix(in srgb, var(--win-color, #f2c977) 36%, transparent);
  box-shadow:
    0 0 40px color-mix(in srgb, var(--win-color, #f2c977) 9%, transparent),
    0 16px 35px rgba(0, 0, 0, 0.24);
}

.result-panel.is-consolation {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
}

.result-panel.is-consolation .result-kicker {
  color: var(--muted);
}

.result-panel.is-consolation .result-win strong {
  color: var(--ink-soft);
  text-shadow: none;
}

.result-panel.is-popping .result-win {
  animation: result-pop 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes result-pop {
  0% {
    opacity: 0;
    transform: translateY(9px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.spin-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 12px 0 0;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.spin-footnote span {
  color: rgba(242, 201, 119, 0.54);
  font-size: 7px;
}

/* Prize panel ------------------------------------------------------------ */

.prize-panel {
  position: relative;
  align-self: center;
  width: 100%;
  min-width: 0;
  max-height: min(760px, calc(100vh - 150px));
  overflow: hidden auto;
  padding: 23px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 35%),
    linear-gradient(165deg, rgba(37, 29, 33, 0.89), rgba(17, 13, 16, 0.87));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(22px);
}

.prize-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 201, 119, 0.52), transparent);
}

.prize-panel::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 201, 119, 0.075), transparent 70%);
  pointer-events: none;
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-family: var(--font-number);
  font-size: 7px;
  letter-spacing: 0.31em;
}

.panel-heading h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.refresh-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.refresh-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(96, 216, 180, 0.65);
}

.refresh-state.is-loading i {
  animation: loading-pulse 0.8s ease-in-out infinite alternate;
}

.refresh-state.is-offline i {
  background: var(--red);
  box-shadow: 0 0 8px rgba(224, 91, 80, 0.65);
}

@keyframes loading-pulse {
  to {
    opacity: 0.25;
    transform: scale(0.65);
  }
}

.panel-subtitle {
  margin: 8px 0 14px;
  color: var(--muted-dim);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.prize-list {
  display: flex;
  max-height: 322px;
  margin: 0 -5px;
  padding: 1px 5px;
  overflow: hidden auto;
  flex-direction: column;
  gap: 3px;
  list-style: none;
  scrollbar-color: rgba(242, 201, 119, 0.26) transparent;
  scrollbar-width: thin;
}

.prize-list::-webkit-scrollbar {
  width: 4px;
}

.prize-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(242, 201, 119, 0.24);
}

.prize-item {
  display: grid;
  grid-template-columns: 7px 17px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 8px;
  border-radius: 10px;
  transition:
    background 180ms ease,
    opacity 180ms ease;
}

.prize-index {
  color: var(--muted-dim);
  font-family: var(--font-number);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-align: center;
}

.prize-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.prize-swatch {
  width: 6px;
  height: 24px;
  border-radius: 999px;
  background: var(--prize-color, var(--gold));
  box-shadow: 0 0 10px color-mix(in srgb, var(--prize-color, #f2c977) 46%, transparent);
}

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

.prize-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.prize-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prize-stock {
  flex: 0 0 auto;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.prize-stock.is-unlimited {
  color: rgba(96, 216, 180, 0.6);
}

.prob-track {
  height: 2px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.prob-fill {
  display: block;
  width: var(--prob-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--prize-color, #f2c977) 58%, transparent),
    var(--prize-color, #f2c977)
  );
  transition: width 550ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.prize-probability {
  min-width: 43px;
  color: var(--gold);
  font-family: var(--font-number);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-align: right;
}

.prize-item.is-unavailable {
  opacity: 0.4;
}

.prize-item.is-unavailable .prize-name {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.prize-item.is-unavailable .prize-probability {
  color: var(--muted-dim);
  font-size: 8px;
}

.prize-empty {
  display: flex;
  min-height: 200px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  font-size: 13px;
}

.prize-empty strong {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
}

.prize-empty p {
  margin: 4px 0 0;
  font-size: 10px;
}

.recent-block {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.recent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.recent-heading h3 {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.09em;
}

.recent-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-dim);
  font-family: var(--font-number);
  font-size: 6px;
  letter-spacing: 0.18em;
}

.recent-live i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px rgba(224, 91, 80, 0.8);
}

.recent-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

.recent-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 10px;
}

.recent-dot {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--prize-color, var(--gold));
  opacity: 0.8;
}

.recent-name {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-time {
  margin-left: auto;
  color: var(--muted-dim);
  font-size: 9px;
  white-space: nowrap;
}

.recent-empty {
  margin: 8px 0 2px;
  color: var(--muted-dim);
  font-size: 9.5px;
  line-height: 1.6;
}

.panel-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.panel-footer p {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted-dim);
  font-size: 7px;
  letter-spacing: 0.2em;
}

.footer-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09));
}

.footer-line:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent);
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 6px 34px 24px;
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.footer-separator {
  color: rgba(242, 201, 119, 0.4);
}

/* Toast and confetti ----------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  z-index: 120;
  max-width: min(90vw, 440px);
  padding: 11px 18px;
  border: 1px solid rgba(242, 201, 119, 0.25);
  border-radius: 999px;
  background: rgba(27, 21, 23, 0.94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.4);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 12px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  backdrop-filter: blur(16px);
}

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

.toast.is-error {
  border-color: rgba(224, 91, 80, 0.35);
}

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

.confetti-piece {
  position: absolute;
  top: -10vh;
  left: var(--left, 50%);
  width: var(--width, 7px);
  height: var(--height, 12px);
  border-radius: 2px;
  background: var(--color, var(--gold));
  opacity: 0;
  animation: confetti-fall var(--duration, 3.2s) cubic-bezier(0.16, 0.62, 0.35, 1) var(--delay, 0s)
    forwards;
  transform: translate3d(0, -10vh, 0) rotate(0);
  will-change: transform, opacity;
}

.confetti-piece.is-round {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10vh, 0) rotate(0deg);
  }
  8% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--sway, 0px), 112vh, 0) rotate(var(--spin, 540deg));
  }
}

.noscript-note {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel-strong);
  font-size: 13px;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1240px) {
  .site-main {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
    min-height: 0;
    align-items: center;
    padding-top: 34px;
  }

  .intro {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    column-gap: 32px;
    align-items: center;
    padding-bottom: 7px;
  }

  .intro-topline {
    grid-column: 1 / -1;
    margin-bottom: 16px;
  }

  .intro h1 {
    font-size: clamp(3.3rem, 6.2vw, 4.4rem);
  }

  .intro h1 span,
  .intro h1 em {
    display: inline;
  }

  .intro h1 em {
    margin: 0 0 0 0.1em;
  }

  .intro h1 em::after {
    right: -19px;
  }

  .intro-copy {
    align-self: start;
    max-width: 340px;
    margin: 8px 0 0;
  }

  .stats-row {
    grid-column: 2;
    align-self: start;
    margin-top: 16px;
  }

  .fair-note {
    grid-column: 2;
    max-width: 340px;
    margin-top: 18px;
  }

  .site-notice {
    grid-column: 1;
    max-width: 340px;
    margin-top: 15px;
  }

  .wheel-stage {
    align-self: start;
  }

  .prize-panel {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .site-header {
    height: 74px;
    padding: 0 18px;
  }

  .site-header::after {
    right: 18px;
    left: 18px;
  }

  .brand-seal {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 19px;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand-copy small {
    font-size: 7px;
  }

  .header-live {
    display: none;
  }

  .admin-link {
    height: 35px;
    padding: 0 12px;
  }

  .sound-toggle {
    width: 35px;
    height: 35px;
  }

  .site-main {
    display: flex;
    min-height: 0;
    padding: 24px 18px 28px;
    flex-direction: column;
    gap: 28px;
  }

  .intro {
    display: block;
    width: 100%;
    padding-bottom: 0;
    text-align: center;
  }

  .intro-topline {
    justify-content: center;
    margin-bottom: 16px;
  }

  .intro h1 {
    font-size: clamp(2.65rem, 11vw, 3.8rem);
    line-height: 1.14;
  }

  .intro h1 span,
  .intro h1 em {
    display: inline;
  }

  .intro h1 em {
    margin-left: 0.08em;
  }

  .intro h1 em::after {
    top: -7px;
    right: -18px;
    font-size: 10px;
  }

  .intro-copy {
    max-width: none;
    margin: 13px auto 0;
    font-size: 13px;
  }

  .stats-row {
    justify-content: center;
    gap: 20px;
    margin-top: 21px;
  }

  .stat-item strong {
    font-size: 21px;
  }

  .stat-item span {
    font-size: 9px;
  }

  .fair-note {
    max-width: 390px;
    margin: 23px auto 0;
    text-align: left;
  }

  .site-notice {
    max-width: 390px;
    margin: 15px auto 0;
    text-align: left;
  }

  .wheel-stage {
    width: 100%;
  }

  .stage-heading {
    width: min(100%, 520px);
    padding: 0 8px;
  }

  .wheel-wrap {
    width: min(100%, 500px, 60vh);
  }

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

  .spin-footnote {
    font-size: 8px;
  }

  .wheel-badge {
    bottom: 12px;
    height: 17px;
  }

  .prize-panel {
    width: 100%;
    max-height: none;
    padding: 21px 19px 17px;
    border-radius: 22px;
  }

  .prize-list {
    max-height: none;
  }

  .site-footer {
    padding: 5px 18px 22px;
    font-size: 8px;
  }
}

@media (max-width: 520px) {
  .header-actions {
    gap: 6px;
  }

  .admin-link {
    padding: 0 11px;
    font-size: 11px;
  }

  .admin-link svg {
    width: 14px;
    height: 14px;
  }

  .brand {
    gap: 9px;
  }

  .brand-copy strong {
    letter-spacing: 0.08em;
  }

  .site-main {
    padding-top: 20px;
    gap: 24px;
  }

  .stats-row {
    gap: 14px;
  }

  .stat-divider {
    height: 21px;
  }

  .fair-note {
    padding: 11px 12px;
  }

  .fair-note p {
    font-size: 10px;
  }

  .fair-note p span {
    font-size: 9px;
  }

  .stage-heading {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .stage-hint {
    font-size: 8px;
  }

  .wheel-wrap {
    width: min(100%, 94vw, 60vh);
  }

  .wheel-pointer {
    top: -3px;
    width: 39px;
    height: 62px;
  }

  .pointer-crown {
    width: 23px;
    height: 23px;
  }

  .pointer-tip {
    border-top-width: 29px;
    border-right-width: 13px;
    border-left-width: 13px;
  }

  .result-panel {
    width: min(100%, 350px);
    min-height: 78px;
    padding: 10px 16px;
  }

  .result-win strong {
    max-width: 280px;
    font-size: 21px;
  }

  .spin-footnote {
    gap: 6px;
    font-size: 7.5px;
    letter-spacing: 0;
  }

  .prize-panel {
    padding: 19px 16px 15px;
  }

  .panel-heading h2 {
    font-size: 24px;
  }

  .prize-name {
    font-size: 12px;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 5px;
  }
}

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