:root {
  --ink: #2d2530;
  --muted: #756c78;
  --surface: #fffdf9;
  --surface-soft: rgba(255, 253, 249, 0.84);
  --coral: #f05f5f;
  --coral-deep: #d84652;
  --pink: #f58aa0;
  --blue: #5aaed6;
  --gold: #f3bc46;
  --gold-light: #ffe9a6;
  --green: #4aa987;
  --border: rgba(67, 49, 66, 0.12);
  --shadow-soft: 0 22px 70px rgba(115, 80, 87, 0.14);
  --shadow-card: 0 18px 45px rgba(109, 78, 85, 0.12);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: #fff9f0 url("./assets/lotteryBackground.png") center top / cover fixed no-repeat;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: #28212b;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  position: relative;
  min-height: 100vh;
  padding-top: 12px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.13), rgba(255, 252, 244, 0.78) 54%, #fffaf2 84%),
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.64), transparent 36rem);
}

.site-header,
.hero,
.prize-section,
.rules-section,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 14px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.78);
  box-shadow: 0 12px 36px rgba(115, 80, 87, 0.08), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #ff9b92, var(--coral));
  box-shadow: 0 9px 24px rgba(224, 70, 81, 0.28);
  transform: rotate(-7deg);
}

.brand-mark svg {
  width: 25px;
  fill: currentColor;
}

.brand-mark circle {
  fill: var(--coral);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: -3px;
  color: #9a7d83;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.header-tools,
.account-actions {
  display: flex;
  align-items: center;
}

.header-tools {
  min-width: 0;
  gap: 12px;
}

.account-actions {
  gap: 7px;
}

.header-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid rgba(216, 70, 82, 0.16);
  border-radius: 999px;
  color: #655960;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 20px rgba(107, 71, 80, 0.08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.header-action:hover {
  border-color: rgba(216, 70, 82, 0.34);
  color: var(--coral-deep);
  background: #fff;
  transform: translateY(-1px);
}

.header-action svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.register-action {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #ff887e, var(--coral));
  box-shadow: 0 9px 22px rgba(224, 70, 81, 0.22);
}

.register-action:hover {
  border-color: transparent;
  color: #fff;
  background: var(--coral-deep);
}

.account-chip {
  display: inline-flex;
  max-width: 150px;
  min-height: 42px;
  align-items: center;
  overflow: hidden;
  padding: 0 13px;
  border: 1px solid rgba(74, 169, 135, 0.22);
  border-radius: 999px;
  color: #397e68;
  background: rgba(239, 252, 247, 0.88);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero {
  position: relative;
  padding: clamp(42px, 7vw, 88px) 0 48px;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 9px rgba(243, 188, 70, 0.12);
  content: "";
}

.hero::before {
  top: 23%;
  left: -2%;
}

.hero::after {
  top: 37%;
  right: 3%;
  background: var(--blue);
  box-shadow: 0 0 0 9px rgba(90, 174, 214, 0.12);
}

.hero-heading {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto clamp(34px, 5vw, 58px);
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 13px;
  color: var(--coral-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(225, 76, 88, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 30px rgba(110, 80, 85, 0.08);
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(74, 169, 135, 0.13);
  animation: livePulse 1.6s ease-in-out infinite;
}

.hero h1 {
  margin: 0;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: clamp(2.35rem, 5.2vw, 4.7rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero h1 em {
  display: inline-block;
  color: var(--coral);
  font-style: normal;
  text-shadow: 0 10px 30px rgba(224, 70, 81, 0.12);
}

.hero-copy {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

.prize-highlight {
  display: inline-flex;
  max-width: 720px;
  align-items: center;
  gap: 13px;
  margin: 24px auto 0;
  padding: 13px 20px 13px 14px;
  border: 1px solid rgba(243, 188, 70, 0.38);
  border-radius: 18px;
  color: #665861;
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(255, 248, 236, 0.82));
  box-shadow: 0 12px 34px rgba(110, 80, 85, 0.1), inset 0 1px 0 #fff;
  text-align: left;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.prize-highlight-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #ff9a72, var(--coral));
  box-shadow: 0 8px 20px rgba(224, 70, 81, 0.22);
}

.prize-highlight-icon svg {
  width: 23px;
  fill: currentColor;
}

.prize-highlight strong {
  display: block;
  color: var(--coral-deep);
  font-size: 15px;
  line-height: 1.45;
}

.prize-highlight p {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.draw-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
}

.wheel-section {
  min-width: 0;
}

.wheel-stage {
  position: relative;
  width: min(700px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
}

.wheel-shadow {
  position: absolute;
  inset: 78% 13% 2%;
  border-radius: 50%;
  background: rgba(108, 68, 71, 0.22);
  filter: blur(24px);
}

.wheel-shell {
  position: absolute;
  inset: 3.5%;
  border: clamp(13px, 2.3vw, 22px) solid #f6a13e;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd16a, #f7ad3e 62%, #ec8a2f);
  box-shadow:
    0 0 0 5px #d96b32,
    0 0 0 10px #ffc860,
    0 28px 55px rgba(165, 88, 52, 0.25),
    inset 0 0 20px rgba(125, 55, 31, 0.24);
}

.wheel-shell::after {
  position: absolute;
  inset: 3.2%;
  z-index: 3;
  border: 2px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  box-shadow: inset 0 0 22px rgba(92, 42, 37, 0.16);
  pointer-events: none;
  content: "";
}

.bulb-ring {
  position: absolute;
  inset: -5.1%;
  z-index: 6;
  border-radius: 50%;
  pointer-events: none;
}

.bulb {
  position: absolute;
  width: clamp(7px, 1.35vw, 13px);
  height: clamp(7px, 1.35vw, 13px);
  border: 2px solid #fff6c8;
  border-radius: 50%;
  background: #fff8c8;
  box-shadow: 0 0 8px #fff, 0 0 17px #ffd463;
  transform: translate(-50%, -50%);
  animation: bulbPulse 1.1s ease-in-out infinite alternate;
  animation-delay: var(--bulb-delay);
}

.wheel {
  position: absolute;
  inset: 5.8%;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #ec5d76 0deg 45deg, #f7bd42 45deg 90deg, #58b69a 90deg 135deg, #54aacf 135deg 180deg, #8167c7 180deg 225deg, #ef7d54 225deg 270deg, #ec4f83 270deg 315deg, #f5a83f 315deg 360deg);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.72),
    inset 0 0 30px rgba(72, 31, 43, 0.22);
  transition: transform 4.8s cubic-bezier(0.12, 0.76, 0.12, 1);
  will-change: transform;
}

.wheel.is-instant {
  transition: none;
}

.wheel::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-conic-gradient(from -90deg, rgba(255, 255, 255, 0.78) 0 0.65deg, transparent 0.65deg var(--segment-angle, 15deg));
  pointer-events: none;
  content: "";
}

.wheel-item {
  position: absolute;
  bottom: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  width: var(--slot-width, 7.3%);
  height: 45%;
  align-items: center;
  flex-direction: column;
  transform: translateX(-50%) rotate(var(--slot-rotation, 0deg));
  transform-origin: 50% 100%;
  pointer-events: none;
}

.wheel-item-image {
  display: grid;
  width: 65%;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 5%;
  filter: drop-shadow(0 2px 2px rgba(49, 28, 37, 0.38));
}

.wheel-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wheel-item-label {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  max-height: calc(var(--slot-label-size, 6.7px) * 3.45);
  margin-top: 3px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #302731;
  font-size: var(--slot-label-size, 6.7px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: normal;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    1px 0 0 rgba(255, 255, 255, 0.65);
  writing-mode: horizontal-tb;
}

.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: clamp(78px, 18%, 124px);
  height: clamp(78px, 18%, 124px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pointer {
  position: absolute;
  left: 50%;
  bottom: 18%;
  z-index: 1;
  width: 64%;
  height: 178%;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 6px rgba(132, 16, 58, 0.22));
}

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

.wheel-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  overflow: hidden;
  border: clamp(3px, 0.55vw, 5px) solid transparent;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 34% 28%, #ffb9da 0 6%, #ff488d 24%, #f1166c 51%, #d40855 75%, #a80d3f 100%) padding-box,
    linear-gradient(145deg, #fff6d4 0%, #f3d27a 55%, #e8b24a 100%) border-box;
  box-shadow:
    0 10px 18px rgba(100, 35, 50, 0.28),
    inset -9px -11px 18px rgba(100, 8, 49, 0.3),
    inset 8px 8px 15px rgba(255, 255, 255, 0.28);
  text-align: center;
}

.wheel-center::before {
  position: absolute;
  top: 11%;
  left: 17%;
  width: 52%;
  height: 28%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.08) 72%);
  filter: blur(1px);
  transform: rotate(-15deg);
  content: "";
}

.wheel-center::after {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  box-shadow: inset -7px -9px 13px rgba(89, 0, 39, 0.16), inset 5px 5px 10px rgba(255, 255, 255, 0.2);
  pointer-events: none;
  content: "";
}

.wheel-center span {
  display: none;
}

.wheel-center strong {
  display: none;
}

.wheel-loading {
  position: absolute;
  inset: 3.5%;
  z-index: 12;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(10px, 2.2%, 16px);
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(48, 28, 36, 0.08) 0 16%, rgba(48, 28, 36, 0.34) 58%, rgba(48, 28, 36, 0.46) 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.wheel-stage.is-loading .wheel-loading {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wheel-stage.is-loading .bulb {
  animation-duration: 0.42s;
}

.wheel-loading-core {
  position: relative;
  width: 36%;
  aspect-ratio: 1;
}

.wheel-loading-core::before {
  position: absolute;
  inset: 7%;
  border: 2px solid rgba(255, 236, 186, 0.22);
  border-radius: 50%;
  content: "";
}

.wheel-loading-ring {
  position: absolute;
  inset: 7%;
  border: 4px solid transparent;
  border-top-color: #fff4c8;
  border-right-color: #f3bc46;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(243, 188, 70, 0.35);
  animation: loadingSpin 0.95s linear infinite;
}

.wheel-loading-sparkles {
  position: absolute;
  inset: 0;
  animation: loadingSpin 2.6s linear infinite reverse;
}

.wheel-loading-sparkles i {
  position: absolute;
  width: clamp(6px, 8%, 10px);
  height: clamp(6px, 8%, 10px);
  border-radius: 50%;
  background: #fff8dc;
  box-shadow: 0 0 8px #fff, 0 0 14px #ffd463;
  animation: sparklePulse 1.1s ease-in-out infinite alternate;
}

.wheel-loading-sparkles i:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
}

.wheel-loading-sparkles i:nth-child(2) {
  top: 62%;
  right: 2%;
  animation-delay: -0.35s;
}

.wheel-loading-sparkles i:nth-child(3) {
  bottom: 8%;
  left: 14%;
  animation-delay: -0.7s;
}

.wheel-loading-text {
  color: #fffaf2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-align: center;
  text-indent: 0.22em;
  text-shadow: 0 2px 10px rgba(40, 20, 28, 0.5);
  white-space: nowrap;
}

.wheel-loading-text::after {
  animation: loadingDots 1.2s steps(4, end) infinite;
  content: "";
}

.wheel-caption {
  min-height: 26px;
  margin: 13px 0 0;
  color: #776a72;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.wheel-caption.is-demo {
  color: #9a6624;
}

.draw-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  justify-self: end;
  overflow: hidden;
  padding: clamp(28px, 3vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 30px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow-soft), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.draw-panel::before {
  position: absolute;
  top: 0;
  left: 28px;
  width: 72px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #ff9b84, var(--coral), #d84672);
  content: "";
}

.panel-decoration {
  position: absolute;
  top: -68px;
  right: -50px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(240, 95, 95, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(240, 95, 95, 0.05), 0 0 0 50px rgba(90, 174, 214, 0.03);
}

.panel-label {
  color: var(--coral);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.draw-panel h2 {
  max-width: 100%;
  margin: 8px 0 12px;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.draw-panel > p {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.draw-panel label {
  display: block;
  margin-bottom: 9px;
  color: #504850;
  font-size: 14px;
  font-weight: 800;
}

.input-wrap {
  position: relative;
  margin-bottom: 18px;
}

.input-wrap svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 22px;
  fill: none;
  stroke: #b18d91;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.input-wrap input {
  width: 100%;
  min-height: 56px;
  padding: 13px 16px 13px 48px;
  border: 1px solid #e7d9d8;
  border-radius: 15px;
  outline: none;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 2px 5px rgba(99, 66, 71, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.input-wrap input::placeholder {
  color: #aa9fa7;
}

.input-wrap input:focus {
  border-color: #f3a3a8;
  box-shadow: 0 0 0 4px rgba(240, 95, 95, 0.14);
}

.draw-button,
.modal-primary {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #ff887e, var(--coral) 50%, #e74a5f);
  box-shadow: 0 13px 25px rgba(222, 69, 81, 0.26), inset 0 2px 0 rgba(255, 255, 255, 0.24);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  touch-action: manipulation;
}

.draw-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.draw-button:hover:not(:disabled),
.modal-primary:hover {
  box-shadow: 0 17px 31px rgba(222, 69, 81, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.draw-button:active:not(:disabled),
.modal-primary:active {
  transform: translateY(0) scale(0.985);
}

.draw-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.form-message {
  margin: 14px 0 0 !important;
  padding: 11px 13px;
  border: 1px solid rgba(199, 52, 71, 0.18);
  border-radius: 11px;
  color: #a92339 !important;
  background: #fff1f3;
  font-size: 13px !important;
}

.records-entry {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: 20px 1fr 20px;
  gap: 9px;
  align-items: center;
  margin-top: 16px;
  padding: 0 15px;
  border: 1px solid rgba(216, 70, 82, 0.15);
  border-radius: 13px;
  color: #655960;
  background: rgba(255, 249, 246, 0.9);
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  touch-action: manipulation;
}

.records-entry:hover {
  border-color: rgba(216, 70, 82, 0.32);
  color: var(--coral-deep);
  background: #fff;
  box-shadow: 0 8px 20px rgba(109, 78, 85, 0.1);
}

.records-entry:active {
  background: #fff4f2;
}

.records-entry svg {
  width: 17px;
  fill: none;
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.records-entry .records-entry-arrow {
  justify-self: end;
  stroke: currentColor;
}

.scroll-cue {
  display: flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  margin: 28px auto 0;
  padding: 0 14px;
  border-radius: 999px;
  color: #7e7077;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.scroll-cue:hover {
  color: var(--coral-deep);
  background: rgba(255, 255, 255, 0.55);
}

.scroll-cue svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  animation: cueBounce 1.6s ease-in-out infinite;
}

.prize-section {
  padding: clamp(58px, 9vw, 106px) 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}

.section-heading h2,
.rules-copy h2 {
  margin: 8px 0 0;
  font-size: clamp(1.85rem, 3.4vw, 3rem);
  line-height: 1.18;
}

.section-heading > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.overview-bar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  color: #766b72;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 #fff;
  font-size: 13px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(74, 169, 135, 0.12);
  animation: livePulse 1.6s ease-in-out infinite;
}

.overview-bar strong {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--coral-deep);
  background: rgba(240, 95, 95, 0.08);
}

.prize-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.prize-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow-card), inset 0 1px 0 #fff;
  transition: transform 220ms var(--ease-out), box-shadow 220ms ease, border-color 220ms ease;
}

.prize-card:hover {
  border-color: rgba(243, 188, 70, 0.45);
  box-shadow: 0 24px 55px rgba(109, 78, 85, 0.17);
  transform: translateY(-5px);
}

.prize-card-visual {
  position: relative;
  display: grid;
  aspect-ratio: 1.22;
  margin: 10px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.72), transparent 58%),
    var(--card-tint, #fff0e6);
}

.prize-card-visual::before {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 0 23px rgba(255, 255, 255, 0.25);
  content: "";
}

.prize-card-visual img {
  position: relative;
  z-index: 1;
  width: 72%;
  height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(77, 45, 52, 0.15));
}

.prize-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  min-width: 34px;
  height: 24px;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff887e, var(--coral));
  box-shadow: 0 6px 14px rgba(216, 70, 82, 0.22);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.prize-card-body {
  padding: 4px 18px 20px;
}

.prize-card-number {
  display: none;
}

.prize-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.prize-skeleton {
  min-height: 250px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.63);
}

.prize-skeleton::after {
  display: block;
  width: 58%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  animation: shimmer 1.15s infinite;
  content: "";
}

.rules-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(32px, 7vw, 90px);
  align-items: center;
  padding: clamp(58px, 8vw, 96px) clamp(24px, 5vw, 62px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.rules-list {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-list::before {
  position: absolute;
  top: 36px;
  bottom: 36px;
  left: 35px;
  width: 2px;
  background: linear-gradient(180deg, var(--coral), var(--blue), var(--gold));
  opacity: 0.28;
  content: "";
}

.rules-list li {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 82px;
  padding: 12px 18px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: inset 0 1px 0 #fff;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.rules-list li:hover {
  border-color: rgba(243, 188, 70, 0.4);
  box-shadow: 0 10px 24px rgba(109, 78, 85, 0.08), inset 0 1px 0 #fff;
  transform: translateY(-2px);
}

.rules-list li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 8px 18px rgba(216, 70, 82, 0.22);
  font-size: 12px;
  font-weight: 900;
}

.rules-list li:nth-child(2) > span {
  background: var(--blue);
}

.rules-list li:nth-child(3) > span {
  background: var(--gold);
}

.rules-list strong {
  display: block;
  margin-bottom: 1px;
}

.rules-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 22px 8px 36px;
  border-top: 1px solid rgba(243, 188, 70, 0.22);
  color: #8d7e85;
  font-size: 13px;
}

.footer-brand {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.footer-brand span {
  color: var(--coral);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.footer-brand small {
  color: #9a7d83;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
}

.result-modal,
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(53, 38, 50, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-modal {
  z-index: 110;
  overflow: hidden;
}

.modal-card {
  position: relative;
  width: min(450px, 100%);
  overflow: hidden;
  padding: 48px 36px 34px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 32px;
  background: #fffaf3;
  box-shadow: 0 30px 90px rgba(43, 25, 38, 0.28);
  animation: modalEnter 320ms var(--ease-out) both;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #7b6e76;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 18px rgba(72, 47, 57, 0.08);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.modal-close:hover {
  color: var(--coral-deep);
  background: #fff;
  transform: rotate(4deg);
}

.modal-close svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.modal-prize-image {
  display: grid;
  width: 180px;
  height: 180px;
  margin: 0 auto 18px;
  place-items: center;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #ffece5;
  box-shadow:
    0 0 0 3px #f3d27a,
    0 15px 35px rgba(117, 64, 74, 0.16);
}

.modal-rays {
  position: absolute;
  top: -130px;
  left: 50%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  opacity: 0.28;
  background: repeating-conic-gradient(from 0deg, var(--gold) 0 8deg, transparent 8deg 18deg);
  transform: translateX(-50%);
  animation: raysSpin 18s linear infinite;
}

.modal-kicker,
.modal-card h2,
.modal-prize-image,
.modal-label,
.modal-prize-name,
.modal-primary {
  position: relative;
}

.modal-kicker {
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.19em;
}

.modal-card h2 {
  margin: 0 0 21px;
  font-size: 2rem;
}

.modal-prize-image img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.modal-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-prize-name {
  display: block;
  margin: 4px 0 22px;
  color: var(--coral-deep);
  font-size: 1.35rem;
}

.modal-primary {
  width: min(260px, 100%);
}

.account-modal-card,
.records-modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), transparent 34%),
    #fffdf9;
  box-shadow: 0 30px 90px rgba(43, 25, 38, 0.3), inset 0 1px 0 #fff;
  scrollbar-color: rgba(216, 70, 82, 0.26) transparent;
  scrollbar-width: thin;
  animation: modalEnter 320ms var(--ease-out) both;
}

.account-modal-card::-webkit-scrollbar,
.records-modal-card::-webkit-scrollbar,
.records-list::-webkit-scrollbar {
  width: 6px;
  height: 0;
}

.account-modal-card::-webkit-scrollbar-thumb,
.records-modal-card::-webkit-scrollbar-thumb,
.records-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(216, 70, 82, 0.24);
}

.account-modal-card::after,
.records-modal-card::after {
  position: absolute;
  top: 0;
  left: 36px;
  width: 72px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #ff9b84, var(--coral), #d84672);
  content: "";
}

.account-modal-card::before,
.records-modal-card::before {
  position: absolute;
  top: -80px;
  right: -62px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(240, 95, 95, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(240, 95, 95, 0.045), 0 0 0 52px rgba(90, 174, 214, 0.025);
  pointer-events: none;
  content: "";
}

.records-modal-card {
  width: min(660px, 100%);
}

.account-modal-card {
  width: min(520px, 100%);
}

.account-modal-card .modal-heading {
  margin-right: 0;
}

.account-modal-card .account-modal-copy {
  white-space: nowrap;
}

.modal-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  margin: 2px 54px 24px 0;
}

.modal-heading > div {
  min-width: 0;
}

.modal-heading-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #ff9b86, var(--coral));
  box-shadow: 0 11px 25px rgba(216, 70, 82, 0.2);
}

.modal-heading-icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.records-heading-icon {
  background: linear-gradient(145deg, #72c9b0, var(--green));
  box-shadow: 0 11px 25px rgba(74, 169, 135, 0.2);
}

.account-modal-kicker {
  position: relative;
  margin: 0 0 4px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.account-modal-card h2,
.records-modal-card h2 {
  position: relative;
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  line-height: 1.25;
}

.account-modal-copy {
  position: relative;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 22px;
  padding: 5px;
  border: 1px solid rgba(98, 72, 83, 0.05);
  border-radius: 15px;
  background: #f6f0ee;
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  color: #81747b;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.auth-tab:hover:not(.is-active) {
  color: var(--coral-deep);
}

.auth-tab.is-active {
  color: var(--coral-deep);
  background: #fff;
  box-shadow: 0 6px 18px rgba(87, 56, 65, 0.11), inset 0 0 0 1px rgba(240, 95, 95, 0.07);
}

.auth-form {
  position: relative;
}

.auth-form label {
  display: block;
  margin: 0 0 7px;
  color: #514950;
  font-size: 13px;
  font-weight: 900;
}

.auth-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.auth-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  fill: none;
  stroke: #ae9095;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.auth-input-wrap input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px 12px 47px;
  border: 1px solid #eadcda;
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 2px 5px rgba(99, 66, 71, 0.025);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.auth-input-wrap input::placeholder {
  color: #aaa0a6;
}

.auth-input-wrap input:focus {
  border-color: #f3a3a8;
  box-shadow: 0 0 0 4px rgba(240, 95, 95, 0.13), inset 0 2px 5px rgba(99, 66, 71, 0.025);
}

.auth-input-wrap input:focus-visible {
  outline: none;
}

.account-message {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(200, 56, 75, 0.18);
  border-radius: 10px;
  color: #a92339;
  background: #fff1f3;
  font-size: 12px;
}

.account-message.is-success {
  border-color: rgba(74, 169, 135, 0.2);
  color: #33745f;
  background: #effbf6;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.records-state {
  position: relative;
  display: flex;
  min-height: 160px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border: 1px dashed rgba(117, 108, 120, 0.25);
  border-radius: 18px;
  color: var(--muted);
  background: #fffaf6;
  font-size: 13px;
  text-align: center;
}

.records-state.is-loading::before {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(243, 188, 70, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: loadingSpin 720ms linear infinite;
  content: "";
}

.records-state.is-error {
  border-color: rgba(200, 56, 75, 0.25);
  color: #a92339;
  background: #fff3f4;
}

.records-list {
  position: relative;
  display: grid;
  max-height: min(480px, 54vh);
  gap: 11px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: rgba(216, 70, 82, 0.24) transparent;
  scrollbar-width: thin;
}

.record-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #fffaf6;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.record-card:hover {
  border-color: rgba(243, 188, 70, 0.4);
  box-shadow: 0 10px 22px rgba(109, 78, 85, 0.08);
  transform: translateY(-1px);
}

.record-image {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  color: var(--coral);
  background: #ffe9e2;
}

.record-image img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.record-image svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.record-content {
  min-width: 0;
}

.record-content strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.record-meta span {
  overflow-wrap: anywhere;
}

.records-login-button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid rgba(216, 70, 82, 0.22);
  border-radius: 13px;
  color: var(--coral-deep);
  background: #fff;
  font-weight: 900;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.records-login-button:hover {
  border-color: rgba(216, 70, 82, 0.4);
  background: #fff7f6;
}

@keyframes bulbPulse {
  to {
    opacity: 0.55;
    box-shadow: 0 0 3px #fff, 0 0 8px #ffd463;
  }
}

@keyframes shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(230%); }
}

@keyframes loadingSpin {
  to { transform: rotate(360deg); }
}

@keyframes loadingDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

@keyframes sparklePulse {
  to {
    opacity: 0.45;
    box-shadow: 0 0 3px #fff, 0 0 7px #ffd463;
  }
}

@keyframes modalEnter {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes livePulse {
  50% {
    opacity: 0.55;
    box-shadow: 0 0 0 8px rgba(74, 169, 135, 0.08);
  }
}

@keyframes cueBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@keyframes raysSpin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(240, 95, 95, 0.55);
  outline-offset: 3px;
}

@media (max-width: 920px) {
  .draw-layout {
    grid-template-columns: 1fr;
  }

  .draw-panel {
    width: min(460px, 100%);
    margin-inline: auto;
    justify-self: center;
  }

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

  .rules-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
  }

  .site-header,
  .hero,
  .prize-section,
  .rules-section,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 72px;
    gap: 10px;
  }

  .header-tools {
    gap: 7px;
  }

  .brand > span:last-child {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .account-actions {
    gap: 5px;
  }

  .header-action,
  .account-chip {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .account-chip {
    max-width: 92px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1 {
    font-size: clamp(2.22rem, 12vw, 3.4rem);
  }

  .prize-highlight {
    align-items: flex-start;
    padding: 13px 14px;
  }

  .prize-highlight-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

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

  .wheel-shell {
    border-width: 12px;
  }

  .wheel-item-image {
    border-width: 2px;
  }

  .draw-panel {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .prize-grid {
    grid-template-columns: 1fr;
  }

  .prize-card {
    display: grid;
    grid-template-columns: 42% 58%;
    align-items: center;
  }

  .prize-card-visual {
    width: calc(100% - 16px);
    aspect-ratio: 1;
    margin: 8px;
  }

  .prize-card-body {
    padding: 14px 16px 14px 8px;
  }

  .rules-section {
    padding: 38px 18px;
    border-radius: 26px;
  }

  .site-footer {
    min-height: 120px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .modal-card {
    padding: 46px 22px 28px;
  }

  .account-modal-card,
  .records-modal-card {
    padding: 40px 21px 24px;
    border-radius: 24px;
  }

  .account-modal-card::after,
  .records-modal-card::after {
    left: 21px;
  }

  .modal-heading {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    margin-right: 38px;
    margin-bottom: 20px;
  }

  .modal-heading-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .modal-heading-icon svg {
    width: 22px;
  }

  .account-modal-card .account-modal-copy {
    white-space: normal;
  }

  .record-card {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .record-image {
    width: 66px;
    height: 66px;
  }
}

@media (max-width: 410px) {
  .site-header {
    width: min(100% - 20px, 1180px);
  }

  .header-action {
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
