/* HAVES Draw Theater v5 — glass globe + helical tube chute */
.vl-theater {
  --th-ball: 50px;
  --th-gap: 10px;
  --th-mix: 22px;
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 12px 16px;
  box-sizing: border-box;
  overflow: hidden;
  min-height: 500px;
  color: #f7fafc;
  text-align: center;
  isolation: isolate;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 168, 80, 0.34), transparent 58%),
    radial-gradient(ellipse 40% 35% at 12% 88%, rgba(255, 70, 50, 0.1), transparent 55%),
    radial-gradient(ellipse 45% 30% at 90% 70%, rgba(70, 140, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #1c0e0a 0%, #121018 40%, #080c14 100%);
}
.vl-theater--mega {
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(80, 160, 255, 0.32), transparent 58%),
    linear-gradient(180deg, #071428 0%, #0a1524 42%, #070c14 100%);
}
.vl-theater--lotto535 {
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(120, 220, 70, 0.26), transparent 58%),
    linear-gradient(180deg, #0a180c 0%, #0c1610 42%, #070c10 100%);
}

.vl-theater__floor {
  position: absolute;
  left: -12%; right: -12%; bottom: -10%;
  height: 42%;
  background:
    linear-gradient(180deg, transparent, rgba(0,0,0,.55)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 44px);
  transform: perspective(420px) rotateX(58deg);
  transform-origin: center top;
  pointer-events: none;
  z-index: 0;
}
.vl-theater__beams {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.vl-theater__beams span {
  position: absolute; top: -18%; width: 88px; height: 130%;
  background: linear-gradient(180deg, rgba(255,210,140,.14), transparent 72%);
  filter: blur(10px);
  transform-origin: top center;
  animation: vl-th-beam 7s ease-in-out infinite;
}
.vl-theater__beams span:nth-child(1) { left: 16%; transform: rotate(-14deg); }
.vl-theater__beams span:nth-child(2) { left: 44%; width: 110px; transform: rotate(2deg); animation-delay: 1.1s; }
.vl-theater__beams span:nth-child(3) { left: 70%; transform: rotate(15deg); animation-delay: 2s; }
@keyframes vl-th-beam { 0%,100%{opacity:.3} 50%{opacity:.8} }

.vl-theater__dust {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .22;
  background-image: radial-gradient(circle, rgba(255,255,255,.55) 0 1px, transparent 1.5px);
  background-size: 120px 120px;
  animation: vl-th-dust 22s linear infinite;
}
@keyframes vl-th-dust { to { background-position: 120px -70px; } }

.vl-theater__glow {
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  top: -48px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,180,90,.26), transparent 68%);
  filter: blur(12px); pointer-events: none; z-index: 0;
}
.vl-theater--mega .vl-theater__glow {
  background: radial-gradient(circle, rgba(90,160,255,.24), transparent 68%);
}

.vl-theater__notice {
  position: relative; z-index: 3; max-width: 42rem; margin: 0;
  padding: 7px 11px; border-radius: 12px;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,220,140,.28);
  color: #ffe9b8; font-size: .72rem; font-weight: 700; line-height: 1.4;
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
}
.vl-theater__notice strong { color: #fff; font-weight: 900; }

.vl-theater__head {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
}
.vl-theater__logo {
  max-width: 180px; max-height: 56px; width: auto; height: auto; object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.5));
}
.vl-theater__meta {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  font-size: .76rem; font-weight: 800;
}
.vl-theater__pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
}
.vl-theater__pill i {
  width: 7px; height: 7px; border-radius: 50%; background: #ff4d4f;
  animation: vl-th-pulse 1.35s ease-out infinite;
}
@keyframes vl-th-pulse {
  70% { box-shadow: 0 0 0 8px rgba(255,77,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,79,0); }
}

.vl-theater__stage {
  position: relative; z-index: 2; width: min(100%, 580px); margin-top: 4px;
  overflow: visible; padding-bottom: 4px;
}
.vl-theater__fly {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  z-index: 20; pointer-events: none;
}

.vl-theater__platform {
  position: absolute;
  left: 50%; bottom: 118px; transform: translateX(-50%);
  width: 210px; height: 28px; border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(90,180,120,.35), transparent 60%),
    linear-gradient(180deg, #2a6b45, #163528);
  box-shadow:
    0 10px 18px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.2);
  z-index: 0;
  pointer-events: none;
}
.vl-theater__platform::after {
  content: "";
  position: absolute; inset: 4px 10px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.18);
}

/* ===== machine ===== */
.vl-theater__machine {
  position: relative;
  width: 260px;
  height: 280px;
  margin: 0 auto 2px;
  z-index: 2;
}

.vl-theater__globe {
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 176px; height: 176px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.55), transparent 28%),
    radial-gradient(circle at 70% 78%, rgba(40,120,220,.2), transparent 40%),
    radial-gradient(circle at 50% 55%, rgba(140,200,255,.22), rgba(28,90,180,.16) 46%, rgba(8,28,58,.34) 100%);
  border: 2px solid rgba(200, 235, 255, .55);
  box-shadow:
    inset 0 0 0 7px rgba(255,255,255,.05),
    inset 0 -28px 42px rgba(0,35,70,.35),
    inset 0 20px 30px rgba(255,255,255,.08),
    0 0 0 3px rgba(50,110,170,.28),
    0 16px 34px rgba(0,0,0,.42);
  overflow: hidden;
  z-index: 5;
}
.vl-theater__globe-rim {
  position: absolute; inset: -4px; border-radius: 50%;
  pointer-events: none; z-index: 6;
  background: none;
  border: 3px solid transparent;
  box-shadow:
    0 0 0 2px rgba(210, 235, 255, .55),
    0 0 0 5px rgba(40, 100, 170, .28),
    inset 0 0 0 1px rgba(255,255,255,.25);
}
.vl-theater__globe-shine {
  position: absolute; inset: 14px; border-radius: 50%;
  background: radial-gradient(circle at 28% 20%, rgba(255,255,255,.28), transparent 40%);
  border: 1px solid rgba(255,255,255,.12);
  pointer-events: none; z-index: 6;
}
.vl-theater__globe.is-mixing {
  animation: vl-th-globe-shake 0.55s ease-in-out infinite;
}
@keyframes vl-th-globe-shake {
  0%,100% { transform: translateX(-50%) rotate(-0.4deg); }
  50% { transform: translateX(-50%) rotate(0.4deg); }
}

.vl-theater__swish {
  position: absolute; inset: 16%;
  border: 2px solid transparent;
  border-top-color: rgba(255,255,255,.42);
  border-right-color: rgba(255,255,255,.08);
  border-radius: 50%;
  z-index: 4; pointer-events: none; opacity: 0;
}
.vl-theater__globe.is-mixing .vl-theater__swish {
  opacity: 1;
  animation: vl-th-swish .5s linear infinite;
}
.vl-theater__swish:nth-of-type(2) {
  inset: 26%;
  border-top-color: rgba(255,220,140,.5);
  animation-duration: .68s;
  animation-direction: reverse;
}
.vl-theater__swish:nth-of-type(3) {
  inset: 36%;
  border-top-color: rgba(140,210,255,.45);
  animation-duration: .9s;
}
@keyframes vl-th-swish { to { transform: rotate(360deg); } }

.vl-theater__mix {
  position: absolute;
  width: var(--th-mix); height: var(--th-mix);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .55rem; font-weight: 900; color: #fff;
  z-index: 2;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), 0 2px 5px rgba(0,0,0,.28);
  will-change: transform, left, top;
}
.vl-theater__mix::before {
  content: ""; position: absolute; top: 12%; left: 18%; width: 34%; height: 26%;
  border-radius: 50%; background: rgba(255,255,255,.48);
}
.vl-theater__mix--c0 { background: linear-gradient(160deg,#ff6b5a,#b71c1c); }
.vl-theater__mix--c1 { background: linear-gradient(160deg,#ffe082,#e0a21a); color:#2a1d00; }
.vl-theater__mix--c2 { background: linear-gradient(160deg,#6ec6ff,#1565c0); }
.vl-theater__mix--c3 { background: linear-gradient(160deg,#8fd94a,#1b5e20); }
.vl-theater__mix--c4 { background: linear-gradient(160deg,#ce93d8,#6a1b9a); }
.vl-theater__mix--c5 { background: linear-gradient(160deg,#fff,#cfd8e3); color:#0b1a2e; }

.vl-theater__neck {
  position: absolute;
  left: 50%; top: 158px;
  transform: translateX(-50%);
  width: 46px; height: 22px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #9fd0ff, #3a7fd0 55%, #1e5aa8);
  border: 1px solid rgba(220,240,255,.45);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.35), 0 4px 8px rgba(0,0,0,.25);
  z-index: 4;
}

.vl-theater__pedestal {
  position: absolute;
  left: 50%; bottom: 36px;
  transform: translateX(-50%);
  width: 86px; height: 112px;
  border-radius: 16px 16px 20px 20px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.22), transparent 18%, transparent 82%, rgba(0,0,0,.22)),
    linear-gradient(180deg, #7ec0ff 0%, #3b86e8 38%, #1f5fb8 72%, #143f7a 100%);
  border: 2px solid rgba(190,225,255,.5);
  box-shadow:
    inset 0 10px 16px rgba(255,255,255,.22),
    inset 0 -12px 20px rgba(0,0,0,.28),
    0 12px 22px rgba(0,0,0,.35);
  z-index: 1;
  overflow: hidden;
}
.vl-theater__band {
  position: absolute; left: 8%; right: 8%; height: 7px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.05) 40%, rgba(0,0,0,.2));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.vl-theater__band:nth-child(1) { top: 18%; }
.vl-theater__band:nth-child(2) { top: 42%; }
.vl-theater__band:nth-child(3) { top: 66%; }

/* helical tube */
.vl-theater__spiral {
  position: absolute;
  left: 50%; top: 148px;
  transform: translateX(-50%);
  width: 260px; height: 168px;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
  transition: filter .25s ease;
}
.vl-theater__spiral.is-hot {
  filter: drop-shadow(0 0 10px rgba(120,200,255,.55));
}
.vl-theater__spiral path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vl-theater__spiral .vl-sp-shadow {
  stroke: rgba(4, 18, 40, .35);
  stroke-width: 22;
}
.vl-theater__spiral .vl-sp-body {
  stroke-width: 18;
}
.vl-theater__spiral .vl-sp-edge {
  stroke: rgba(220, 240, 255, .55);
  stroke-width: 19;
  stroke-dasharray: 0;
  opacity: .35;
}
.vl-theater__spiral .vl-sp-hi {
  stroke-width: 6;
  stroke-dashoffset: 3;
  opacity: .85;
  transform: translateY(-3px);
}
.vl-theater__spiral .vl-sp-dash {
  stroke: rgba(255,255,255,.28);
  stroke-width: 1.6;
  stroke-dasharray: 5 7;
}
.vl-theater__spiral .vl-sp-path {
  stroke: transparent;
  stroke-width: 2;
}

.vl-theater__exit {
  position: absolute;
  right: 4px; bottom: 34px;
  width: 36px; height: 22px;
  border-radius: 8px 10px 10px 8px;
  background: linear-gradient(180deg, #a8d8ff, #3b86e8 55%, #1c5cb0);
  border: 1px solid rgba(255,255,255,.4);
  z-index: 6;
  box-shadow: 0 5px 12px rgba(0,0,0,.35), inset 0 2px 4px rgba(255,255,255,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.vl-theater__exit span {
  position: absolute; inset: 4px 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(0,20,40,.35), rgba(0,0,0,.15));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.vl-theater__exit.is-pop {
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(140,210,255,.65), 0 5px 12px rgba(0,0,0,.35);
}

/* result tray */
.vl-theater__rail {
  position: relative;
  margin-top: 6px;
  padding: 18px 14px 14px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.02)),
    rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 18px 40px rgba(0,0,0,.4);
  overflow: visible;
}
.vl-theater__tray-label {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  font-size: .62rem; font-weight: 900; letter-spacing: .14em;
  color: rgba(255,230,170,.7);
}
.vl-theater__rail::before {
  content: "";
  position: absolute; left: 12%; right: 12%; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,210,140,.55), transparent);
}
.vl-theater__docks {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: var(--th-gap); min-height: calc(var(--th-ball) + 10px); margin-top: 6px;
}
.vl-theater__dock {
  width: var(--th-ball); height: var(--th-ball); border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.22);
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.06), transparent 50%),
    rgba(0,0,0,.32);
  box-shadow: inset 0 8px 16px rgba(0,0,0,.45);
  position: relative;
}
.vl-theater__dock > i {
  position: absolute; inset: 18%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}
.vl-theater__dock.is-bonus {
  border-color: rgba(255,204,77,.55);
  background: rgba(255,196,86,.1);
}
.vl-theater__dock.is-filled {
  border-style: solid; border-color: transparent; background: transparent; box-shadow: none;
}
.vl-theater__dock.is-filled > i { display: none; }
.vl-theater__dock.is-thud { animation: vl-th-thud .48s cubic-bezier(.15,1.6,.3,1); }
.vl-theater__dock.is-impact::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(255,230,160,.75);
  animation: vl-th-ring .55s ease-out forwards; pointer-events: none;
}
@keyframes vl-th-thud {
  0% { transform: scale(1); }
  30% { transform: translateY(3px) scale(1.14,.88); }
  55% { transform: translateY(-2px) scale(.95,1.06); }
  100% { transform: scale(1); }
}
@keyframes vl-th-ring {
  0% { opacity: .9; transform: scale(.7); }
  100% { opacity: 0; transform: scale(1.45); }
}

.vl-theater__ball {
  width: var(--th-ball); height: var(--th-ball); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--vl-font-display, "Pretendard", system-ui, sans-serif);
  font-weight: 900; font-size: 1.02rem; font-variant-numeric: tabular-nums;
  color: #fff; position: absolute; z-index: 8;
  will-change: transform, left, top;
  box-shadow:
    inset 0 -5px 0 rgba(0,0,0,.18),
    inset 0 8px 12px rgba(255,255,255,.3),
    0 10px 20px rgba(0,0,0,.4);
  pointer-events: none; user-select: none;
}
.vl-theater__ball.is-flying {
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.35));
}
.vl-theater__ball-num {
  position: relative; z-index: 1;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.vl-theater__dock .vl-theater__ball {
  position: relative; left: auto; top: auto; transform: none; filter: none;
}
.vl-theater__ball::before {
  content: ""; position: absolute; top: 8%; left: 16%; width: 34%; height: 26%;
  border-radius: 50%; background: rgba(255,255,255,.48); filter: blur(.4px);
}
.vl-theater__ball--power {
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.62), transparent 42%),
    linear-gradient(160deg, #ff6b5a 0%, #e53935 48%, #b71c1c 100%);
}
.vl-theater__ball--mega {
  color: #0b1a2e;
  background: radial-gradient(circle at 32% 28%, #fff 0%, #f4f6f8 42%, #dfe5ec 100%);
  border: 1px solid rgba(11,26,46,.12);
}
.vl-theater__ball--lotto535 {
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.5), transparent 42%),
    linear-gradient(160deg, #8fd94a 0%, #43a047 52%, #1b5e20 100%);
}
.vl-theater__ball--bonus {
  color: #2a1d00;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.78), transparent 42%),
    linear-gradient(160deg, #ffe082 0%, #f5c542 48%, #e0a21a 100%);
  box-shadow:
    inset 0 -5px 0 rgba(0,0,0,.12),
    inset 0 8px 12px rgba(255,255,255,.35),
    0 0 0 2px rgba(255,210,100,.45),
    0 12px 24px rgba(255,180,40,.42);
}

.vl-theater__ghost {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), rgba(120,180,255,.28));
  pointer-events: none; z-index: 11;
  animation: vl-th-ghost .28s ease-out forwards;
}
.vl-theater__ghost.is-bonus {
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.4), rgba(255,200,80,.32));
}
@keyframes vl-th-ghost {
  0% { opacity: .55; }
  100% { opacity: 0; transform: scale(.55); }
}

.vl-theater__status {
  position: relative; z-index: 2; margin: 4px 0 0; min-height: 1.3em;
  font-size: .84rem; font-weight: 800; opacity: .92;
}
.vl-theater__actions {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 2px;
}
.vl-theater__btn {
  appearance: none; border: 0; cursor: pointer; border-radius: 999px;
  padding: 9px 16px; font-size: .8rem; font-weight: 800;
  color: #1a0f0c; background: linear-gradient(135deg, #ffe08a, #ffb84d);
  box-shadow: 0 10px 22px rgba(255,160,40,.3);
}
.vl-theater__btn--ghost {
  color: #eef3f8; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16); box-shadow: none;
}

.vl-theater__countdown {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(3.2rem, 11vw, 5.5rem); font-weight: 900; letter-spacing: -.06em;
  color: #fff; text-shadow: 0 12px 40px rgba(0,0,0,.55);
  z-index: 22; pointer-events: none; opacity: 0;
}
.vl-theater__countdown.is-on { animation: vl-th-count .85s ease-out; }
@keyframes vl-th-count {
  0% { opacity: 0; transform: scale(1.55); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: scale(.7); }
}

.vl-theater__burst {
  position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden;
}
.vl-theater__spark {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #ffd666; opacity: 0;
  animation: vl-th-spark 1s ease-out forwards;
}
@keyframes vl-th-spark {
  0% { opacity: 0; transform: translate(0,0) scale(.4); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.15); }
}

.vl-theater.is-finale .vl-theater__rail { animation: vl-th-finale .7s ease-out; }
@keyframes vl-th-finale {
  0% { filter: brightness(1.28); transform: scale(.985); }
  100% { filter: brightness(1); transform: scale(1); }
}

.vl-live-frame.is-theater {
  height: auto !important; padding-top: 0 !important; aspect-ratio: unset; min-height: 500px;
}
.vl-live-frame.is-theater .vl-theater { width: 100%; min-height: 500px; }

@media (max-width: 720px) {
  .vl-theater { --th-ball: 44px; --th-gap: 7px; --th-mix: 18px; min-height: 470px; padding: 12px 8px 14px; }
  .vl-theater__machine { width: 220px; height: 250px; }
  .vl-theater__globe { width: 150px; height: 150px; }
  .vl-theater__spiral { width: 220px; height: 142px; top: 128px; }
  .vl-theater__pedestal { width: 72px; height: 96px; bottom: 32px; }
  .vl-theater__neck { top: 136px; width: 40px; height: 18px; }
  .vl-theater__platform { width: 180px; bottom: 100px; }
  .vl-theater__logo { max-width: 148px; max-height: 48px; }
  .vl-theater__notice { font-size: .68rem; }
  .vl-live-frame.is-theater,
  .vl-live-frame.is-theater .vl-theater { min-height: 470px; }
}

@media (prefers-reduced-motion: reduce) {
  .vl-theater__beams span,
  .vl-theater__dust,
  .vl-theater__pill i,
  .vl-theater__globe.is-mixing,
  .vl-theater__globe.is-mixing .vl-theater__swish { animation: none !important; }
}
