:root {
  color-scheme: light;
  --bg: #f7f5f9;
  --panel: #ffffff;
  --panel-soft: #fbfafc;
  --ink: #201927;
  --muted: #716978;
  --line: #e6e1ec;
  --berry: #8f24c6;
  --berry-dark: #4b176b;
  --plum: #2b143c;
  --rose: #c33f8a;
  --mint: #168b72;
  --mint-soft: #e8f7f2;
  --gold: #e7a72f;
  --gold-soft: #fff7e5;
  --danger: #b91c1c;
  --shadow: 0 24px 60px rgba(42, 24, 56, 0.12);
  --shadow-soft: 0 12px 34px rgba(42, 24, 56, 0.09);
  --radius: 8px;
  --wheel-size: clamp(382px, 41.5vw, 628px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 245, 249, 0.92)),
    radial-gradient(circle at 50% -10%, rgba(143, 36, 198, 0.12), transparent 38%),
    var(--bg);
}

body.modal-open {
  overflow: hidden;
}

.page-public {
  min-height: 100vh;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 29%, rgba(132, 44, 174, 0.12), transparent 33%),
    linear-gradient(180deg, #ffffff 0%, #fbfaff 62%, #ffffff 100%);
}

.public-frame {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - 24px);
  border: 1px solid #dcd7e2;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 80px rgba(34, 19, 45, 0.05);
}

.show-effects {
  position: absolute;
  left: 50%;
  top: calc(27px + var(--wheel-size) / 2);
  z-index: 12;
  width: min(calc(var(--wheel-size) * 1.36), calc(100vw - 24px));
  height: min(calc(var(--wheel-size) * 1.22), 760px);
  overflow: visible;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.stage-light {
  position: absolute;
  top: -9%;
  width: 62%;
  height: 118%;
  opacity: 0;
  background: linear-gradient(180deg, rgba(255, 203, 85, 0.22), rgba(144, 36, 198, 0.08) 48%, transparent 72%);
  filter: blur(16px);
  transform-origin: top center;
  transition: opacity 0.35s ease;
}

.stage-light-left {
  left: -4%;
  transform: rotate(22deg);
}

.stage-light-right {
  right: -4%;
  transform: rotate(-22deg);
}

.show-running .stage-light {
  opacity: 1;
  animation: stageSweep 2.6s ease-in-out infinite alternate;
}

.show-rings {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(calc(var(--wheel-size) * 1.08), 700px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 198, 55, 0.18);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
}

.show-running .show-rings {
  opacity: 1;
  animation: showRing 1.8s ease-out infinite;
}

.confetti-layer {
  position: absolute;
  inset: -20% -18%;
  overflow: visible;
}

.confetti-layer i {
  position: absolute;
  left: var(--x);
  top: 34%;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall 2.2s ease-out var(--delay) forwards;
}

.count-in,
.winner-toast {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  text-shadow: 0 10px 28px rgba(34, 11, 52, 0.36);
}

.count-in {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.48), transparent 28%),
    linear-gradient(135deg, rgba(166, 45, 214, 0.94), rgba(74, 20, 106, 0.96));
  box-shadow:
    0 28px 70px rgba(112, 23, 173, 0.36),
    0 0 0 11px rgba(255, 255, 255, 0.24);
  font-size: 3.2rem;
  font-weight: 950;
}

.count-in.is-visible {
  animation: countPop 0.58s ease both;
}

.winner-toast {
  z-index: 3;
  min-width: min(520px, calc(100vw - 42px));
  min-height: 118px;
  padding: 20px 34px;
  border: 1px solid rgba(240, 189, 64, 0.7);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 216, 111, 0.26), transparent 34%),
    linear-gradient(135deg, rgba(255, 251, 241, 0.94), rgba(255, 245, 226, 0.86));
  box-shadow: 0 24px 80px rgba(102, 58, 14, 0.18);
  color: var(--ink);
  text-shadow: none;
}

.winner-toast span,
.winner-toast strong {
  display: block;
}

.winner-toast span {
  color: #bd7615;
  font-weight: 850;
}

.winner-toast strong {
  margin-top: 6px;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
}

.winner-toast.is-visible {
  animation: toastReveal 1.85s ease both;
}

button,
input {
  font: inherit;
}

a {
  color: var(--berry);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

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

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  font-size: 1.22rem;
  background:
    linear-gradient(135deg, #a22bd4 0%, #7120ad 48%, #31114a 100%);
  box-shadow: 0 16px 36px rgba(143, 36, 198, 0.28);
}

.brand strong {
  display: block;
  font-size: clamp(1.4rem, 2vw, 2.5rem);
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.98rem;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(310px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
  min-height: 148px;
  padding: 26px clamp(24px, 3.2vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  position: relative;
  top: 0;
  z-index: 20;
}

.brand-public {
  gap: 8px;
  align-items: flex-start;
}

.brand-public .public-logo {
  color: #8e24c6;
  font-size: clamp(2.2rem, 3.2vw, 3rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
}

.brand-public strong {
  font-size: clamp(2.2rem, 3vw, 3rem);
  letter-spacing: 0;
}

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

.brand-public small {
  margin-top: 0;
}

.brand-public .brand-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  font-size: 1.05rem;
}

.brand-public .brand-subtitle i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #8d28d0;
}

.brand-public .brand-address {
  display: block;
  margin-top: 5px;
  padding-left: 23px;
  color: #8b8293;
  font-size: 0.92rem;
  font-weight: 700;
  width: fit-content;
  text-decoration: none;
}

.brand-public .brand-address:hover {
  color: var(--berry);
  text-decoration: underline;
}

.countdown {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: min(660px, 48vw);
}

.countdown-row {
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.8vw, 38px);
}

.countdown-title,
.eyebrow {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: start;
  gap: clamp(8px, 1vw, 20px);
}

.countdown-grid span {
  display: grid;
  justify-items: center;
  min-width: 54px;
}

.countdown-grid b {
  font-size: clamp(2.25rem, 3.4vw, 3.75rem);
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
}

.next-draw {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding-left: 30px;
  border-left: 1px solid var(--line);
  color: #7a7282;
  line-height: 1.35;
  white-space: nowrap;
}

.next-draw strong {
  color: #7a7282;
  font-weight: 700;
}

.calendar-icon {
  position: relative;
  width: 31px;
  height: 31px;
  border: 2px solid #181420;
  border-radius: 7px;
}

.calendar-icon::before,
.calendar-icon::after {
  content: "";
  position: absolute;
  background: #181420;
}

.calendar-icon::before {
  left: 5px;
  right: 5px;
  top: 8px;
  height: 2px;
}

.calendar-icon::after {
  width: 9px;
  height: 9px;
  right: -7px;
  bottom: -6px;
  border: 2px solid #181420;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px #fff;
}

.countdown-grid small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.countdown-grid i {
  font-size: clamp(1.6rem, 3vw, 3.4rem);
  line-height: 0.9;
  color: #7b7283;
  font-style: normal;
}

.mobile-live-strip {
  justify-self: end;
  display: grid;
  grid-template-columns: auto;
  align-items: center;
  gap: 10px;
}

.mobile-participants-pill,
.mobile-sound-toggle {
  display: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 40px rgba(29, 20, 39, 0.07);
  font-weight: 800;
}

.live-badge span {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: transparent;
}

.live-badge span::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #e30055;
  box-shadow: 0 0 0 0 rgba(227, 0, 85, 0.34);
  animation: pulse 1.8s infinite;
}

.live-badge span::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #e30055;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px #fff,
    inset 0 0 0 4px #fff;
}

.live-badge.is-live {
  border-color: rgba(227, 0, 85, 0.34);
  box-shadow: 0 18px 48px rgba(227, 0, 85, 0.12);
}

.mobile-participants-icon {
  width: 22px;
  height: 18px;
  background:
    radial-gradient(circle at 50% 23%, currentColor 0 4px, transparent 4.3px),
    radial-gradient(circle at 24% 34%, currentColor 0 3.5px, transparent 3.8px),
    radial-gradient(circle at 76% 34%, currentColor 0 3.5px, transparent 3.8px),
    radial-gradient(ellipse at 50% 88%, currentColor 0 8px, transparent 8.4px),
    radial-gradient(ellipse at 22% 90%, currentColor 0 6px, transparent 6.4px),
    radial-gradient(ellipse at 78% 90%, currentColor 0 6px, transparent 6.4px);
}

.public-shell {
  display: grid;
  grid-template-columns: 175px 620px 520px;
  gap: clamp(22px, 2.4vw, 36px);
  align-items: center;
  width: min(1450px, calc(100% - 54px));
  min-height: 0;
  margin: 0 auto;
  padding: 0 0 18px;
}

.side-rail {
  display: grid;
  gap: 18px;
  align-self: start;
  margin-top: 54px;
}

.stat-card,
.mini-card,
.winners-panel,
.admin-card,
.login-card,
.register-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  display: grid;
  gap: 13px;
  min-height: 230px;
  padding: 24px 22px;
}

.stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--berry);
  background: #f1e4fa;
}

.participants-icon::before {
  content: "";
  width: 24px;
  height: 20px;
  background:
    radial-gradient(circle at 50% 23%, currentColor 0 4px, transparent 4.3px),
    radial-gradient(circle at 24% 34%, currentColor 0 3.5px, transparent 3.8px),
    radial-gradient(circle at 76% 34%, currentColor 0 3.5px, transparent 3.8px),
    radial-gradient(ellipse at 50% 88%, currentColor 0 8px, transparent 8.4px),
    radial-gradient(ellipse at 22% 90%, currentColor 0 6px, transparent 6.4px),
    radial-gradient(ellipse at 78% 90%, currentColor 0 6px, transparent 6.4px);
}

.stat-card small {
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  font-size: 2.55rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card em {
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #8b27c6;
  background: #fff;
  box-shadow: 0 10px 28px rgba(34, 19, 45, 0.08);
  cursor: pointer;
  font-weight: 700;
}

.sound-icon {
  position: relative;
  width: 18px;
  height: 18px;
}

.sound-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 6px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 22%, 42% 22%, 100% 0, 100% 100%, 42% 78%, 0 78%);
}

.sound-icon::after {
  content: "";
  position: absolute;
  inset: 2px 0 2px 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
}

.sound-toggle strong {
  color: #7a7282;
  font-size: 0.8rem;
  white-space: nowrap;
}

.sound-toggle.is-on strong {
  color: #7d21bb;
}

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

.mini-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.mini-card strong {
  font-size: 0.96rem;
}

.mini-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.mini-card.success {
  border-color: #cdeadd;
  background: linear-gradient(180deg, #ffffff, var(--mint-soft));
}

.draw-stage {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-width: 0;
}

.wheel-wrap {
  position: relative;
  width: var(--wheel-size);
  height: calc(var(--wheel-size) + 92px);
  display: grid;
  justify-items: center;
  align-items: start;
}

.show-running .wheel-wrap {
  filter: drop-shadow(0 0 22px rgba(145, 43, 205, 0.24));
}

.recording-mode .stage-light {
  filter: blur(8px);
}

.recording-mode .show-running .wheel-wrap {
  filter: none;
}

.recording-mode .wheel-halo {
  filter: blur(8px);
}

.recording-mode .wheel-sector:nth-child(3n + 1) .wheel-segment,
.recording-mode .wheel-sector:nth-child(5n + 2) .wheel-segment {
  filter: none;
}

.show-chase .pointer {
  animation: pointerTap 0.16s linear infinite;
}

.wheel-stand {
  position: absolute;
  bottom: 12px;
  z-index: 0;
  width: 86%;
  height: clamp(70px, 6.2vw, 92px);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 13%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.45) 42%, transparent 46%),
    linear-gradient(180deg, #ffffff 0%, #eceaf0 42%, #c6c2cc 100%);
  box-shadow:
    inset 0 11px 20px rgba(255, 255, 255, 0.96),
    inset 0 -13px 22px rgba(118, 112, 126, 0.26),
    0 18px 34px rgba(52, 35, 67, 0.18);
}

.wheel-stand::before {
  content: "";
  position: absolute;
  inset: 3px 6% auto;
  height: 35px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(132, 31, 196, 0.54), rgba(132, 31, 196, 0.22) 42%, transparent 72%);
  filter: blur(5px);
}

.wheel-stand::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 9px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(150, 145, 156, 0.28));
}

.wheel-halo {
  position: absolute;
  top: 6px;
  width: var(--wheel-size);
  height: var(--wheel-size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 171, 26, 0.1), transparent 22%),
    radial-gradient(circle at 50% 48%, rgba(136, 53, 174, 0.19), transparent 68%);
  filter: blur(18px);
}

.pointer {
  position: absolute;
  top: -1px;
  z-index: 8;
  width: clamp(76px, 7.2vw, 102px);
  height: clamp(78px, 7.4vw, 106px);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  background:
    linear-gradient(180deg, #fff8dc 0%, #ffd36f 45%, #f49a08 100%);
  filter:
    drop-shadow(0 18px 24px rgba(255, 157, 17, 0.5))
    drop-shadow(0 0 18px rgba(255, 181, 43, 0.74));
}

.pointer::before {
  content: "";
  position: absolute;
  inset: clamp(9px, 0.9vw, 13px);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  background:
    linear-gradient(180deg, #ffffff 0%, #fff8e8 54%, rgba(255, 255, 255, 0.72) 100%);
}

.pointer::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff, rgba(255, 255, 255, 0));
  transform: translateX(-50%);
}

.wheel {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--wheel-size);
  height: var(--wheel-size);
  margin-top: 27px;
  border: clamp(12px, 1.1vw, 16px) solid #fff;
  border-radius: 50%;
  background: #34104e;
  box-shadow:
    0 0 0 6px rgba(229, 225, 233, 0.96),
    0 0 0 12px rgba(255, 255, 255, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    inset 0 0 72px rgba(15, 7, 25, 0.45),
    0 28px 60px rgba(63, 22, 89, 0.28);
  overflow: hidden;
  transform: rotate(0deg);
  transition: transform 4.8s cubic-bezier(0.12, 0.72, 0.12, 1);
  will-change: transform;
}

.wheel.is-idle-spin {
  transition: none;
}

.wheel.is-show-spin {
  box-shadow:
    0 0 0 6px rgba(251, 245, 255, 0.98),
    0 0 0 14px rgba(255, 255, 255, 0.86),
    0 0 48px rgba(255, 185, 44, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 0 78px rgba(15, 7, 25, 0.42),
    0 34px 78px rgba(84, 25, 130, 0.32);
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 29%;
  border: 5px solid rgba(245, 238, 248, 0.88);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(84, 38, 111, 0.24),
    0 0 0 1px rgba(70, 28, 91, 0.2);
  pointer-events: none;
  z-index: 3;
}

.wheel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 31%, rgba(255, 255, 255, 0.09) 32% 34%, transparent 35%),
    radial-gradient(circle at 50% 50%, transparent 0 54%, rgba(10, 4, 18, 0.16) 78%, rgba(9, 3, 15, 0.38) 100%),
    linear-gradient(112deg, rgba(255, 255, 255, 0.24), transparent 25% 70%, rgba(255, 255, 255, 0.08));
  pointer-events: none;
  z-index: 2;
}

.wheel-svg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.wheel-empty {
  position: absolute;
  z-index: 2;
  inset: 35% 24%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-weight: 850;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  text-shadow: 0 2px 12px rgba(16, 5, 25, 0.4);
}

.wheel-segment {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.05;
  stroke-linejoin: round;
}

.wheel-sector:nth-child(3n + 1) .wheel-segment {
  filter: brightness(1.06);
}

.wheel-sector:nth-child(5n + 2) .wheel-segment {
  filter: saturate(1.18);
}

.wheel.is-name-refreshing .wheel-sector {
  animation: sectorRefresh 0.88s cubic-bezier(0.2, 0.75, 0.22, 1) both;
  animation-delay: calc(var(--i, 0) * 8ms);
}

.wheel-name {
  fill: #fff;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(30, 9, 40, 0.28);
  stroke-width: 2.6px;
  stroke-linejoin: round;
}

.wheel.is-name-refreshing .wheel-name {
  animation: nameRefresh 0.86s cubic-bezier(0.2, 0.75, 0.22, 1) both;
  animation-delay: calc(90ms + var(--i, 0) * 8ms);
}

.wheel-center {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 29%;
  aspect-ratio: 1;
  border: 7px solid rgba(83, 55, 93, 0.24);
  border-radius: 50%;
  background:
    linear-gradient(180deg, #fff, #fbf8ff),
    var(--panel);
  box-shadow:
    0 18px 46px rgba(21, 14, 28, 0.22),
    inset 0 0 0 2px #fff;
  transform: rotate(var(--counter-rotation, 0deg));
  transition: transform 4.8s cubic-bezier(0.12, 0.72, 0.12, 1);
}

.wheel-center span {
  color: var(--berry-dark);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 0.85;
}

.wheel-center small {
  margin-top: -18%;
  color: var(--plum);
  font-size: clamp(0.7rem, 1vw, 1rem);
  font-weight: 800;
}

.stage-actions {
  display: inline-grid;
  grid-template-columns: minmax(260px, 360px);
  gap: 12px;
  width: min(360px, 100%);
  margin-top: -54px;
  position: relative;
  z-index: 3;
}

.auto-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 22px;
  border: 1px solid rgba(128, 33, 178, 0.18);
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(162, 46, 212, 0.96) 0%, rgba(125, 33, 187, 0.96) 45%, rgba(77, 23, 108, 0.98) 100%);
  box-shadow:
    0 16px 30px rgba(118, 21, 173, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 850;
  text-align: center;
}

.show-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(135deg, #ffb72c, #a42ed4 36%, #551673 100%);
  box-shadow:
    0 18px 34px rgba(121, 31, 178, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  cursor: pointer;
  font-weight: 900;
  text-align: center;
}

.show-start span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  position: relative;
}

.show-start span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 7px;
  border-left: 9px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.show-start:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.test-show-mode .stage-actions {
  grid-template-columns: minmax(260px, 360px);
  width: min(360px, 100%);
}

.show-running .stage-actions {
  grid-template-columns: minmax(260px, 360px);
  width: min(360px, 100%);
}

.auto-status strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
}

.auto-status.is-live .status-dot {
  background: #ffcf4b;
  box-shadow: 0 0 0 0 rgba(255, 207, 75, 0.45);
  animation: pulse 1.1s infinite;
}

.auto-status.is-done {
  background:
    linear-gradient(135deg, rgba(151, 44, 198, 0.96), rgba(75, 23, 107, 0.98));
}

.auto-status.is-error {
  background:
    linear-gradient(135deg, rgba(185, 28, 28, 0.95), rgba(103, 22, 22, 0.98));
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 60px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  color: #fff;
  background:
    linear-gradient(135deg, #a32ed4 0%, #7d21bb 45%, #4d176c 100%);
  box-shadow: 0 16px 30px rgba(118, 21, 173, 0.36);
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.ghost-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
}

.ghost-button:hover {
  text-decoration: none;
}

.icon-button {
  font-size: 1.5rem;
}

.icon-button svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.full {
  width: 100%;
}

.ticker {
  position: relative;
  width: min(calc(var(--wheel-size) + 74px), 100%);
  min-height: 46px;
  overflow: hidden;
  border: 1px solid rgba(143, 36, 198, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(250, 246, 253, 0.86)),
    #fff;
  box-shadow:
    0 18px 42px rgba(52, 25, 76, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 72px;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0));
}

.ticker::after {
  right: 0;
  background: linear-gradient(270deg, #fff 0%, rgba(255, 255, 255, 0));
}

#tickerTrack {
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 8px 10px;
  animation: ticker var(--ticker-duration, 42s) linear infinite;
  will-change: transform;
}

.ticker-chip {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--plum);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(241, 232, 248, 0.92)),
    #f1e8f8;
  box-shadow: inset 0 0 0 1px rgba(143, 36, 198, 0.08);
  font-size: 0.86rem;
  font-weight: 750;
}

.ticker-chip-count {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(162, 46, 212, 0.96), rgba(77, 23, 108, 0.98));
  box-shadow: 0 8px 18px rgba(118, 21, 173, 0.2);
}

.winners-panel {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: clamp(24px, 2.4vw, 28px);
  min-height: 646px;
  align-self: start;
  margin-top: 54px;
}

.panel-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-head span:first-child {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.panel-head strong,
.section-head strong {
  display: block;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.winners-panel .panel-head strong {
  font-size: clamp(1.45rem, 1.8vw, 1.8rem);
}

.trophy {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--gold);
}

.trophy::before {
  content: "";
  width: 25px;
  height: 25px;
  background:
    linear-gradient(currentColor, currentColor) 10px 19px / 5px 5px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 23px / 11px 3px no-repeat;
  border: 3px solid currentColor;
  border-top-width: 4px;
  border-bottom-width: 6px;
  border-radius: 4px 4px 10px 10px;
}

.trophy::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 6px;
  width: 32px;
  height: 14px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  clip-path: polygon(0 0, 28% 0, 28% 100%, 72% 100%, 72% 0, 100% 0, 100% 100%, 0 100%);
}

.winner-list {
  display: grid;
  gap: 14px;
}

.winner-card {
  --medal-accent: #e6a11a;
  --medal-dark: #be6f13;
  --medal-light: #fff3ae;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 18px;
  min-height: 132px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.winner-card.revealed {
  animation: reveal 0.58s ease both;
}

.winner-card.place-1 {
  --medal-accent: #eca90e;
  --medal-dark: #be6f13;
  --medal-light: #fff2aa;
  border-color: #f1d389;
  background:
    radial-gradient(circle at 14% 50%, rgba(231, 167, 47, 0.15), transparent 38%),
    linear-gradient(135deg, #fff, var(--gold-soft));
}

.winner-card.place-2 {
  --medal-accent: #9aa5b3;
  --medal-dark: #64707d;
  --medal-light: #f4f7fb;
  background:
    radial-gradient(circle at 14% 50%, rgba(154, 165, 179, 0.13), transparent 38%),
    #fff;
}

.winner-card.place-3 {
  --medal-accent: #cd7c35;
  --medal-dark: #8b4b27;
  --medal-light: #ffe0ba;
  border-color: rgba(205, 124, 53, 0.26);
  background:
    radial-gradient(circle at 14% 50%, rgba(205, 124, 53, 0.14), transparent 38%),
    linear-gradient(135deg, #fff, #fff7ef);
}

.winner-medal {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
}

.winner-medal svg {
  width: 86px;
  height: 86px;
  overflow: visible;
}

.winner-medal .laurel {
  fill: none;
  stroke: var(--medal-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
  opacity: 0.92;
}

.winner-medal .medal-glow {
  fill: var(--medal-accent);
  opacity: 0.22;
}

.winner-medal .medal-ring {
  fill: var(--medal-accent);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 4;
}

.winner-medal .medal-face {
  fill: var(--medal-accent);
  stroke: var(--medal-light);
  stroke-width: 2.5;
  filter: drop-shadow(0 4px 7px rgba(95, 49, 13, 0.18));
}

.winner-medal text {
  fill: #fff;
  font-size: 28px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(111, 56, 6, 0.18);
  stroke-width: 3px;
}

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

.winner-info strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
}

.winner-info span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 700;
}

.winner-gift {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--gold);
  background: rgba(255, 255, 255, 0.7);
}

.winner-gift svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.place-2 .winner-gift {
  color: #687585;
  background: rgba(248, 250, 252, 0.85);
}

.place-3 .winner-gift {
  color: #d58a32;
  background: rgba(255, 247, 239, 0.85);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #d9d1df;
  border-radius: var(--radius);
  background: #fbfafc;
}

.empty-state.compact {
  min-height: 110px;
}

.results-button {
  min-height: 58px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.results-button span {
  display: inline-block;
  margin-left: 14px;
  font-size: 1.35rem;
  vertical-align: -1px;
}

.results-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(27, 16, 38, 0.28);
  backdrop-filter: blur(10px);
}

.results-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  border: 1px solid rgba(226, 218, 232, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 90px rgba(32, 18, 46, 0.22);
  overflow: hidden;
}

.results-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.results-dialog-head span,
.public-result-date span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.results-dialog-head strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
}

.modal-close {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.modal-close svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.public-results-list {
  display: grid;
  gap: 14px;
  padding: 20px;
  overflow: auto;
}

.public-result-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 18%, rgba(143, 36, 198, 0.08), transparent 36%),
    #fff;
}

.public-result-date strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 1rem;
}

.public-result-card ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-history-winner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(226, 218, 232, 0.82);
  border-radius: var(--radius);
  background: #fbfafc;
}

.public-history-winner span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--gold);
  font-weight: 950;
}

.public-history-winner.place-2 span {
  background: #9aa5b3;
}

.public-history-winner.place-3 span {
  background: #cd7c35;
}

.public-history-winner strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.public-history-winner small {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.public-history-empty {
  color: var(--muted);
  font-weight: 750;
}

.privacy-note,
.site-footer {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin: 0 auto;
  padding: 24px clamp(28px, 3.2vw, 44px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.footer-note {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
}

.footer-note strong,
.footer-note small {
  display: block;
}

.footer-note strong {
  color: var(--ink);
}

.footer-note small {
  margin-top: 6px;
}

.footer-icon {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
}

.footer-icon::before {
  content: "";
  width: 25px;
  height: 21px;
  background:
    radial-gradient(circle at 50% 20%, currentColor 0 4px, transparent 4.4px),
    radial-gradient(circle at 26% 34%, currentColor 0 3.5px, transparent 3.9px),
    radial-gradient(circle at 74% 34%, currentColor 0 3.5px, transparent 3.9px),
    radial-gradient(ellipse at 50% 90%, currentColor 0 8px, transparent 8.5px),
    radial-gradient(ellipse at 24% 92%, currentColor 0 6px, transparent 6.5px),
    radial-gradient(ellipse at 76% 92%, currentColor 0 6px, transparent 6.5px);
}

.footer-icon.purple {
  color: #8e24c6;
  background: #f2e4fb;
}

.footer-icon.green {
  color: #0d8c68;
  background: #e6f8f0;
}

.footer-icon.green::before {
  width: 19px;
  height: 23px;
  background: currentColor;
  clip-path: polygon(50% 0, 91% 16%, 84% 66%, 50% 100%, 16% 66%, 9% 16%);
}

.footer-icon.green::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

.admin-shell,
.register-shell,
.privacy-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 54px) 0;
}

.page-admin,
.page-register,
.page-privacy {
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(247, 245, 249, 0.86)),
    radial-gradient(circle at 78% 10%, rgba(22, 139, 114, 0.12), transparent 32%),
    radial-gradient(circle at 18% 0%, rgba(143, 36, 198, 0.16), transparent 38%),
    var(--bg);
}

.login-card,
.register-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px);
}

.admin-brand {
  margin-bottom: 34px;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.form-stack.compact {
  gap: 14px;
}

.form-stack label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.form-stack input,
.qr-result input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-stack input:focus,
.qr-result input:focus {
  border-color: rgba(143, 36, 198, 0.58);
  box-shadow: 0 0 0 4px rgba(143, 36, 198, 0.12);
}

.checkline {
  grid-template-columns: 22px 1fr;
  align-items: start;
  color: var(--ink) !important;
  line-height: 1.42;
}

.checkline input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--berry);
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
  line-height: 1.4;
}

.form-message.ok {
  color: var(--mint);
}

.dashboard {
  display: grid;
  gap: 22px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.admin-actions .ghost-button {
  min-height: 46px;
  padding: 0 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 18px;
}

.admin-card {
  padding: 22px;
}

.admin-card > .eyebrow {
  display: block;
  margin-bottom: 12px;
}

.next-card strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.next-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.qr-result {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.qr-result img {
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  justify-self: center;
}

.admin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(320px, 0.76fr);
  gap: 18px;
  align-items: start;
}

.table-card {
  min-width: 0;
}

.section-head {
  margin-bottom: 14px;
}

.section-head span:last-child {
  color: var(--muted);
  font-weight: 750;
  text-align: right;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.94rem;
}

th {
  color: var(--muted);
  background: #fbfafc;
  font-size: 0.8rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--berry-dark);
  background: #f1e4fa;
  font-weight: 800;
  font-size: 0.78rem;
}

.source-badge.manual {
  color: #0f684f;
  background: var(--mint-soft);
}

.admin-results {
  display: grid;
  gap: 12px;
}

.draw-result {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.draw-result strong {
  font-size: 1rem;
}

.draw-result ol {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding-left: 20px;
}

.draw-result li {
  line-height: 1.4;
}

.recordings-card {
  display: grid;
  gap: 14px;
}

.recordings-list {
  display: grid;
  gap: 12px;
}

.recording-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.recording-item strong,
.recording-item small {
  display: block;
}

.recording-item strong {
  margin-top: 7px;
  font-size: 1rem;
}

.recording-item small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.recording-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #6f3d04;
  background: #fff3d4;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.recording-status.completed {
  color: #0f684f;
  background: var(--mint-soft);
}

.recording-status.running {
  color: #8a4f00;
  background: #fff0c2;
}

.recording-status.failed {
  color: #9f1239;
  background: #ffe4e6;
}

.recording-download {
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
}

.recording-note {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.4;
  text-align: right;
}

.register-status {
  margin: 28px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbfafc;
  font-weight: 750;
  line-height: 1.45;
}

.success-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #cdeadd;
  border-radius: var(--radius);
  text-align: center;
  background: var(--mint-soft);
}

.success-card span {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--mint);
  font-size: 2rem;
  font-weight: 900;
}

.success-card strong {
  font-size: 1.5rem;
}

.success-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.privacy-document {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.privacy-document h1 {
  margin: 24px 0 10px;
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1.05;
}

.privacy-document h2 {
  margin: 30px 0 10px;
  font-size: 1.22rem;
}

.privacy-document p,
.privacy-document li {
  color: #4c4454;
  line-height: 1.65;
}

.privacy-document ul {
  padding-left: 22px;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(227, 0, 85, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(227, 0, 85, 0);
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sectorRefresh {
  0% {
    opacity: 0;
    filter: brightness(1.7) saturate(1.28);
  }
  42% {
    opacity: 0.72;
    filter: brightness(1.32) saturate(1.2);
  }
  100% {
    opacity: 1;
    filter: none;
  }
}

@keyframes nameRefresh {
  0% {
    opacity: 0;
    filter: blur(4px);
  }
  55% {
    opacity: 0.9;
    filter: blur(0.8px);
  }
  100% {
    opacity: 1;
    filter: none;
  }
}

@keyframes stageSweep {
  from {
    transform: rotate(18deg) translateX(-2%);
  }
  to {
    transform: rotate(-18deg) translateX(3%);
  }
}

@keyframes showRing {
  from {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.82);
    box-shadow: 0 0 0 0 rgba(255, 194, 54, 0.22);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.14);
    box-shadow: 0 0 0 44px rgba(255, 194, 54, 0);
  }
}

@keyframes countPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65);
  }
  32% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.22);
  }
}

@keyframes toastReveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.9);
  }
  18%,
  78% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -56%) scale(0.98);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -40px, 0) rotate(0deg);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--tx), 420px, 0) rotate(var(--rot));
  }
}

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

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

@media (min-width: 1181px) {
  :root {
    --public-pad: clamp(6px, 0.8vh, 12px);
    --wheel-size: clamp(320px, min(41.5vw, calc(100dvh - 320px)), 628px);
  }

  body.page-public {
    height: 100%;
    overflow: hidden;
  }

  .page-public {
    height: 100dvh;
    min-height: 0;
    padding: var(--public-pad);
  }

  .public-frame {
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
  }

  .topbar {
    min-height: clamp(86px, 12.5vh, 124px);
    padding: clamp(12px, 1.6vh, 18px) clamp(22px, 2.6vw, 38px);
  }

  .brand-public .public-logo,
  .brand-public strong {
    font-size: clamp(2rem, 2.55vw, 2.7rem);
  }

  .brand-public .brand-subtitle {
    margin-top: 9px;
    font-size: 0.98rem;
  }

  .brand-public .brand-address {
    margin-top: 3px;
    font-size: 0.86rem;
  }

  .countdown {
    gap: 5px;
    min-width: min(610px, 45vw);
  }

  .countdown-row {
    gap: clamp(18px, 2.2vw, 32px);
  }

  .countdown-grid {
    gap: clamp(7px, 0.9vw, 16px);
  }

  .countdown-grid span {
    min-width: 48px;
  }

  .countdown-grid b {
    font-size: clamp(2rem, 3vw, 3.25rem);
  }

  .countdown-grid small {
    margin-top: 5px;
  }

  .countdown-grid i {
    font-size: clamp(1.4rem, 2.5vw, 3rem);
  }

  .next-draw {
    min-height: 42px;
    padding-left: 22px;
  }

  .live-badge {
    min-height: 50px;
    padding: 0 20px;
  }

  .public-shell {
    grid-template-columns:
      minmax(138px, 0.36fr)
      minmax(calc(var(--wheel-size) + 18px), calc(var(--wheel-size) + 74px))
      minmax(390px, 0.96fr);
    gap: clamp(16px, 1.8vw, 32px);
    align-items: center;
    width: min(1450px, calc(100% - 38px));
    height: 100%;
    padding: clamp(7px, 1vh, 14px) 0 clamp(4px, 0.8vh, 10px);
  }

  .side-rail {
    gap: 12px;
    align-self: center;
    margin-top: 0;
  }

  .stat-card {
    gap: 10px;
    min-height: clamp(150px, 22vh, 198px);
    padding: clamp(16px, 2vh, 21px) clamp(16px, 1.6vw, 20px);
  }

  .stat-icon {
    width: 38px;
    height: 38px;
  }

  .stat-card strong {
    font-size: clamp(2rem, 3vh, 2.45rem);
  }

  .sound-toggle {
    min-height: 42px;
    padding: 0 12px;
  }

  .draw-stage {
    gap: clamp(8px, 1.1vh, 14px);
    align-self: center;
  }

  .wheel-wrap {
    height: calc(var(--wheel-size) + 62px);
  }

  .wheel-stand {
    bottom: 6px;
    height: clamp(54px, 6vh, 78px);
  }

  .stage-actions {
    margin-top: clamp(-50px, -6.4vh, -38px);
  }

  .auto-status,
  .show-start {
    min-height: clamp(48px, 6.4vh, 58px);
  }

  .ticker {
    min-height: clamp(38px, 5.5vh, 46px);
  }

  #tickerTrack {
    padding: 7px 10px;
  }

  .ticker-chip {
    padding: 7px 12px;
    font-size: clamp(0.76rem, 1.5vh, 0.86rem);
  }

  .winners-panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(12px, 1.7vh, 18px);
    align-self: center;
    height: min(calc(var(--wheel-size) + 108px), 100%);
    min-height: 0;
    margin-top: 0;
    padding: clamp(16px, 2vh, 24px);
  }

  .winner-list {
    min-height: 0;
    overflow: hidden;
  }

  .winners-panel .panel-head strong {
    font-size: clamp(1.28rem, 2.6vh, 1.7rem);
  }

  .trophy {
    width: 38px;
    height: 38px;
  }

  .empty-state {
    min-height: 0;
    height: 100%;
    padding: 22px;
  }

  .winner-card {
    grid-template-columns: clamp(66px, 8vh, 86px) minmax(0, 1fr) 52px;
    gap: 14px;
    min-height: clamp(98px, 14vh, 122px);
    padding: clamp(12px, 1.8vh, 17px) 18px;
  }

  .winner-medal,
  .winner-medal svg {
    width: clamp(66px, 8vh, 82px);
    height: clamp(66px, 8vh, 82px);
  }

  .winner-info strong {
    font-size: clamp(1.05rem, 2.2vh, 1.42rem);
  }

  .winner-info span {
    margin-top: 5px;
    font-size: 0.92rem;
  }

  .winner-gift {
    width: 48px;
    height: 48px;
  }

  .results-button {
    min-height: clamp(48px, 6vh, 56px);
  }

  .site-footer {
    min-height: 0;
    padding: clamp(8px, 1.2vh, 14px) clamp(24px, 3vw, 40px);
    font-size: 0.84rem;
  }

  .footer-note {
    gap: 10px;
    min-width: 250px;
  }

  .footer-icon {
    width: 34px;
    height: 34px;
  }

  .footer-note small {
    margin-top: 2px;
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    position: static;
  }

  .mobile-live-strip {
    justify-self: center;
  }

  .public-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .side-rail {
    grid-template-columns: repeat(3, 1fr);
    order: 2;
  }

  .draw-stage {
    order: 1;
  }

  .winners-panel {
    order: 3;
    min-height: auto;
  }

  .admin-grid,
  .admin-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --wheel-size: min(86vw, 420px);
  }

  .topbar {
    min-height: auto;
    padding: 22px 16px;
  }

  .brand {
    align-items: center;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  .brand strong {
    font-size: 1.45rem;
  }

  .countdown {
    min-width: 0;
    width: 100%;
  }

  .countdown-grid {
    gap: 6px;
  }

  .countdown-grid span {
    min-width: 42px;
  }

  .countdown-grid b {
    font-size: 1.9rem;
  }

  .countdown-grid small {
    font-size: 0.66rem;
  }

  .countdown-row {
    justify-content: center;
    width: 100%;
  }

  .next-draw {
    display: none;
  }

  .mobile-live-strip {
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    justify-self: center;
    width: min(100%, 326px);
    gap: 8px;
  }

  .mobile-participants-pill,
  .sound-toggle.mobile-sound-toggle {
    display: grid;
    place-items: center;
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 30px rgba(29, 20, 39, 0.07);
  }

  .mobile-participants-pill {
    gap: 2px;
    color: var(--berry);
    font-weight: 900;
  }

  .mobile-participants-pill strong {
    color: var(--ink);
    font-size: 0.93rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }

  .mobile-participants-icon {
    width: 21px;
    height: 17px;
  }

  .mobile-live-strip .live-badge {
    justify-content: center;
    justify-self: stretch;
    min-height: 58px;
    padding: 0 10px;
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .mobile-live-strip .live-badge span {
    width: 22px;
    height: 22px;
  }

  .mobile-sound-toggle {
    min-width: 0;
    padding: 0;
    color: var(--berry);
    cursor: pointer;
  }

  .mobile-sound-toggle .sound-icon {
    width: 23px;
    height: 23px;
  }

  .mobile-sound-toggle strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .mobile-sound-toggle.is-on {
    color: #fff;
    border-color: rgba(143, 36, 198, 0.28);
    background:
      linear-gradient(135deg, rgba(162, 46, 212, 0.96), rgba(77, 23, 108, 0.98));
    box-shadow: 0 14px 32px rgba(118, 21, 173, 0.2);
  }

  .public-shell,
  .site-footer,
  .admin-shell,
  .register-shell,
  .privacy-shell {
    width: min(100% - 24px, 640px);
  }

  .side-rail {
    display: none;
  }

  .stat-card {
    min-height: 0;
  }

  .wheel-wrap {
    height: calc(var(--wheel-size) + 70px);
  }

  .show-effects {
    width: min(calc(var(--wheel-size) * 1.24), calc(100vw - 18px));
    height: calc(var(--wheel-size) * 1.2);
  }

  .stage-light {
    top: -7%;
    width: 72%;
    height: 112%;
    filter: blur(12px);
  }

  .stage-light-left {
    left: -12%;
  }

  .stage-light-right {
    right: -12%;
  }

  .show-rings {
    width: min(calc(var(--wheel-size) * 1.02), calc(100vw - 36px));
  }

  .confetti-layer {
    inset: -12% -10%;
  }

  .wheel-name {
    font-size: 10.5px;
  }

  .stage-actions {
    grid-template-columns: minmax(0, 1fr);
    width: min(360px, 100%);
    gap: 10px;
    margin-top: -42px;
  }

  .test-show-mode .stage-actions,
  .show-running .stage-actions {
    grid-template-columns: minmax(0, 1fr);
    width: min(360px, 100%);
  }

  .ticker {
    width: min(100%, calc(100vw - 32px));
    min-height: 42px;
  }

  .ticker::before,
  .ticker::after {
    width: 34px;
  }

  #tickerTrack {
    gap: 7px;
    padding: 7px;
  }

  .ticker-chip {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .auto-status {
    min-height: 54px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .show-start {
    min-height: 54px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .count-in {
    width: 112px;
    height: 112px;
    font-size: 2.08rem;
  }

  .winner-toast {
    top: 50%;
    min-width: min(360px, calc(100vw - 28px));
    min-height: 96px;
    padding: 16px 18px;
  }

  .winner-toast strong {
    font-size: 1.32rem;
  }

  .results-overlay {
    padding: 12px;
  }

  .results-dialog {
    max-height: calc(100vh - 24px);
  }

  .results-dialog-head {
    padding: 18px;
  }

  .public-results-list {
    padding: 14px;
  }

  .public-result-card {
    grid-template-columns: 1fr;
  }

  .public-history-winner {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .public-history-winner small {
    grid-column: 2;
    white-space: normal;
  }

  .winner-card {
    grid-template-columns: 60px minmax(0, 1fr);
    min-height: 96px;
  }

  .winner-medal {
    width: 60px;
    height: 60px;
  }

  .winner-medal svg {
    width: 60px;
    height: 60px;
  }

  .winner-gift {
    display: none;
  }

  .site-footer,
  .admin-topbar,
  .admin-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions .ghost-button {
    width: 100%;
  }

  .recording-item {
    grid-template-columns: 1fr;
  }

  .recording-download {
    width: 100%;
  }

  .recording-note {
    max-width: none;
    text-align: left;
  }
}
