:root {
  --bg: #070914;
  --ink: #f6efe0;
  --muted: #b7ad96;
  --gold: #f0c14b;
  --gold-2: #ffe9a3;
  --cyan: #5eead4;
  --rose: #ff7a6e;
  --card: rgba(16, 20, 36, 0.72);
  --line: rgba(240, 193, 75, 0.22);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Serif SC", "Songti SC", "PingFang SC", serif;
}

body { overflow-x: hidden; }

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
}

[hidden] { display: none !important; }

.stage-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(240, 193, 75, 0.12), transparent 46%),
    radial-gradient(ellipse at 20% 0%, rgba(94, 234, 212, 0.08), transparent 36%),
    linear-gradient(180deg, #0c1020 0%, #070914 70%);
}

.aurora {
  position: absolute;
  inset: auto;
  width: 55vw;
  height: 55vw;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
}

.aurora-a {
  top: -18vw;
  left: -10vw;
  background: #1d3a5f;
  animation: drift 16s ease-in-out infinite alternate;
}

.aurora-b {
  right: -12vw;
  bottom: -14vw;
  background: #5a3a12;
  animation: drift 20s ease-in-out infinite alternate-reverse;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

#dust-canvas,
#burst-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#burst-canvas { z-index: 32; }

.shockwave {
  position: fixed;
  left: 50%;
  top: 46%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid rgba(255, 233, 163, 0.8);
  border-radius: 50%;
  z-index: 31;
  pointer-events: none;
}

.shockwave.play {
  animation: shock 720ms ease-out forwards;
}

.topbar,
.draw-view,
.result-view,
.result-cta,
.modal,
.draw-modal,
.toast {
  position: relative;
  z-index: 2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 36px 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
  border-radius: 14px;
  background: #f4f6f8;
  box-shadow: 0 0 24px rgba(0, 102, 204, 0.22);
}

.eyebrow {
  font-family: Cinzel, serif;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--gold);
}

.topbar h1,
.result-head h2 {
  font-size: 28px;
  letter-spacing: 0.06em;
}

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

.progress-chip,
.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  backdrop-filter: blur(10px);
}

.progress-chip b { color: var(--gold-2); }
.progress-chip.tick { animation: chip-tick 420ms ease; }

.progress-track {
  position: relative;
  z-index: 2;
  height: 3px;
  margin: 8px 36px 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0c14b, #5eead4);
  transition: width 420ms ease;
}

.ghost-btn:hover { border-color: var(--gold); color: var(--gold-2); }
.ghost-btn.danger:hover { border-color: var(--rose); color: var(--rose); }

.draw-view {
  display: block;
  padding: 12px 36px 88px;
  min-height: calc(100vh - 92px);
}

.roster {
  max-width: 1080px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h2 { font-size: 20px; }
.section-head p,
.hint,
.now-drawing,
.modal-card p,
.result-head p:last-child {
  color: var(--muted);
  font-size: 13px;
}

.team-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

.team-card {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 16px 16px 14px;
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  border-color: rgba(240, 193, 75, 0.35);
}

.team-card.drawn {
  background: rgba(20, 28, 24, 0.7);
}

.team-card.next-up {
  border-color: rgba(240, 193, 75, 0.55);
  box-shadow: 0 0 0 1px rgba(240, 193, 75, 0.2);
}

.team-card.stamping {
  animation: row-flash 700ms ease;
}

.team-card.stamping .lot-badge {
  animation: stamp 560ms cubic-bezier(0.2, 1.4, 0.3, 1);
}

.action-wrap {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.next-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.idx {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-family: Orbitron, sans-serif;
}

.team-meta { min-width: 0; }

.topic-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.topic {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}

.members {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-2);
  white-space: nowrap;
}

.row-draw {
  position: relative;
  min-width: 96px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe7a0, #d7a31a);
  color: #2a1c05;
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(240, 193, 75, 0.22);
}

.row-draw .draw-btn-glow {
  animation: sheen 2.8s ease-in-out infinite;
}

.row-draw:hover { transform: translateY(-1px); }
.row-draw:active { transform: scale(0.96); }
.row-draw:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35) brightness(0.75);
}

body.is-drawing .row-draw {
  pointer-events: none;
  filter: grayscale(0.25) brightness(0.8);
}

.lot-badge {
  min-width: 96px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.lot-badge.hit {
  color: #042f2e;
  background: linear-gradient(160deg, #99f6e4, #2dd4bf);
  border: 0;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.4);
}

.draw-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 14, 0.42);
  backdrop-filter: blur(18px) saturate(1.15);
  z-index: 28;
  animation: fade-in 220ms ease;
}

.draw-modal.leaving {
  animation: fade-out 280ms ease forwards;
}

.draw-stage {
  position: relative;
  width: min(640px, calc(100vw - 28px));
  padding: 12px 16px;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.draw-stage.rumble {
  animation: dialog-rumble 80ms linear infinite;
}

.draw-kicker {
  font-family: Cinzel, serif;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--gold);
}

.draw-names {
  display: inline-block;
  margin: 10px 0 8px;
  padding: 6px 22px 10px;
  font-size: clamp(36px, 5.4vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  color: #fff8dc;
  border-bottom: 3px solid var(--gold);
  text-shadow: 0 0 28px rgba(240, 193, 75, 0.55);
  animation: name-in 420ms cubic-bezier(0.2, 1.2, 0.3, 1);
}

.draw-topic {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.draw-status {
  color: var(--gold-2);
  min-height: 22px;
  margin: 4px 0 0;
  font-size: 16px;
}

.scramble {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(8, 10, 18, 0.72);
  border: 1px solid rgba(240, 193, 75, 0.35);
  color: var(--gold-2);
  font-family: Orbitron, sans-serif;
  font-size: 54px;
  font-weight: 800;
  z-index: 9;
  animation: scramble-flicker 90ms linear infinite;
}

.tube-scene {
  position: relative;
  width: 320px;
  height: 400px;
  margin: 8px auto 10px;
  perspective: 900px;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  border: 1px solid rgba(240, 193, 75, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  width: 230px;
  height: 90px;
  margin: -45px 0 0 -115px;
  animation: orbit-spin 7s linear infinite;
}

.orbit-b {
  width: 280px;
  height: 120px;
  margin: -60px 0 0 -140px;
  border-color: rgba(94, 234, 212, 0.16);
  animation: orbit-spin 11s linear infinite reverse;
}

.tube-scene.live .orbit {
  border-color: rgba(255, 233, 163, 0.55);
  box-shadow: 0 0 18px rgba(240, 193, 75, 0.2);
}

.spark-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.spark-field span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe9a3;
  box-shadow: 0 0 8px #f0c14b;
  animation: spark-float 900ms ease-in forwards;
}

.tube-glow {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 220px;
  height: 70px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(240, 193, 75, 0.45), transparent 70%);
  filter: blur(8px);
}

.pedestal {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 190px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, #2c2416, #0d0c0a);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

.tube {
  position: absolute;
  left: 50%;
  bottom: 42px;
  width: 148px;
  height: 292px;
  transform: translateX(-50%);
  transform-origin: 50% 82%;
  transition: transform 0.35s ease;
}

.tube.idle {
  animation: float 3.6s ease-in-out infinite;
}

.tube.lift {
  transform: translateX(-50%) translateY(-18px) scale(1.05);
  transition: transform 0.35s ease;
}

.tube.shaking-soft {
  animation: shake-tube-soft 130ms linear infinite;
}

.tube.shaking {
  animation: shake-tube 90ms linear infinite;
}

.tube-scene:has(.tube.shaking) .tube-glow,
.tube-scene:has(.tube.shaking-soft) .tube-glow,
.tube-scene:has(.tube.lift) .tube-glow {
  transform: translateX(-50%) scale(1.25);
  opacity: 1;
  filter: blur(6px);
}

.tube.tilt {
  animation: tilt-pop 520ms ease forwards;
}

.tube-rim,
.tube-mouth,
.tube-body,
.tube-base {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.tube-rim {
  top: 18px;
  width: 168px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #c8962a 42%, #6b4a12);
  box-shadow: 0 0 20px rgba(240, 193, 75, 0.35);
  z-index: 4;
}

.tube-mouth {
  top: 28px;
  width: 132px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #1a140c, #050403 70%);
  z-index: 3;
}

.tube-body {
  top: 38px;
  width: 148px;
  height: 236px;
  border-radius: 18px 18px 46px 46px / 12px 12px 60px 60px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.55), transparent 18%, transparent 82%, rgba(0,0,0,0.55)),
    linear-gradient(180deg, #8a6118 0%, #5a3d10 38%, #3a270b 100%);
  box-shadow:
    inset 10px 0 16px rgba(255, 233, 163, 0.12),
    inset -12px 0 18px rgba(0, 0, 0, 0.45),
    0 18px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.tube-band {
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(90deg, #6d4c12, #f2d36b, #6d4c12);
  opacity: 0.9;
}

.tube-band.top { top: 18px; }
.tube-band.mid { top: 108px; }
.tube-band.bot { bottom: 36px; }

.tube-window {
  position: absolute;
  left: 50%;
  top: 46px;
  width: 64px;
  height: 86px;
  transform: translateX(-50%);
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(180, 230, 255, 0.16), rgba(20, 24, 20, 0.15));
  border: 1px solid rgba(255, 233, 163, 0.25);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.35);
}

.tube-seal {
  position: absolute;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 210, 110, 0.7);
  color: #ffe7a6;
  font-weight: 900;
  background: rgba(80, 30, 18, 0.45);
}

.tube-base {
  bottom: 0;
  width: 120px;
  height: 22px;
  border-radius: 50%;
  background: #1a140c;
}

.stick-well {
  position: absolute;
  left: 50%;
  top: 0;
  width: 110px;
  height: 88px;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.stick {
  position: absolute;
  bottom: 8px;
  width: 9px;
  height: 72px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #f3d7a4, #c0893a 70%, #8a5a1c);
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.25);
  transform-origin: 50% 100%;
}

.stick::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 2px;
  width: 5px;
  height: 10px;
  border-radius: 1px;
  background: #9b1c1c;
}

.tube.shaking .stick {
  animation: stick-jiggle 80ms linear infinite;
}

.flying-stick {
  position: absolute;
  left: 50%;
  top: 70px;
  width: 86px;
  height: 86px;
  margin-left: -43px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #fff4c8, #f0c14b);
  color: #2a1c05;
  font-family: Orbitron, sans-serif;
  font-size: 42px;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(240, 193, 75, 0.45);
  z-index: 8;
}

.flying-stick.pop {
  animation: stick-pop 900ms cubic-bezier(0.16, 0.84, 0.3, 1) forwards;
}

.stick-trail {
  position: absolute;
  left: 50%;
  top: 40px;
  width: 8px;
  height: 120px;
  margin-left: -4px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 233, 163, 0), #ffe9a3);
  filter: blur(1px);
  z-index: 7;
  animation: trail-up 420ms ease-out forwards;
}

.tube.shaking-soft .stick,
.tube.shaking .stick {
  animation: stick-jiggle 80ms linear infinite;
}

.draw-btn {
  position: relative;
  min-width: 280px;
  height: 64px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe7a0, #d7a31a);
  color: #2a1c05;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(240, 193, 75, 0.28);
}

.draw-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35) brightness(0.75);
  box-shadow: none;
}

.draw-btn:not(:disabled):hover { transform: translateY(-1px); }

.draw-btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.55) 48%, transparent 70%);
  transform: translateX(-120%);
}

.draw-btn:not(:disabled) .draw-btn-glow {
  animation: sheen 2.4s ease-in-out infinite;
}

.hint { margin-top: 12px; }

.result-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  z-index: 6;
  animation: cta-in 520ms cubic-bezier(0.2, 1.2, 0.3, 1);
}

.reveal-btn { min-width: 320px; }

.result-view {
  padding: 18px 48px 48px;
}

.result-head {
  text-align: center;
  margin-bottom: 28px;
}

.result-head h2 { font-size: 40px; margin: 6px 0 8px; }

.result-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto 28px;
}

.result-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  min-height: 108px;
  opacity: 0;
  transform: translateY(18px);
}

.result-card.sealed {
  opacity: 0.62;
  filter: saturate(0.7);
}

.result-card.sealed .secret {
  letter-spacing: 0.28em;
  color: var(--muted);
}

.result-card.show {
  animation: card-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.result-card.first {
  border-color: rgba(240, 193, 75, 0.45);
}

.result-card.show.fresh {
  animation:
    card-in 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
    stamp 560ms cubic-bezier(0.2, 1.4, 0.3, 1);
  border-color: var(--gold);
  box-shadow: 0 0 28px rgba(240, 193, 75, 0.28);
}

.reveal-next-btn {
  min-width: 240px;
  height: 56px;
  font-size: 18px;
}

.result-actions .draw-btn[hidden],
.result-actions .ghost-btn[hidden] {
  display: none !important;
}

.result-no {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: Orbitron, sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #2a1c05;
  background: linear-gradient(160deg, #fff1b8, #e2b13a);
}

.result-card h3 { font-size: 20px; margin-bottom: 4px; }
.result-card .members { font-size: 15px; }
.result-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.62);
  display: grid;
  place-items: center;
  z-index: 30;
}

.modal-card {
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  border-radius: 20px;
  background: #141826;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal-card h3 { margin-bottom: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 24, 36, 0.9);
  border: 1px solid var(--line);
  z-index: 40;
}

body.flash .stage-bg {
  filter: brightness(1.45);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(40px, 24px, 0); }
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes shake-tube-soft {
  0% { transform: translateX(-50%) rotate(-5deg) translate(-3px, 1px); }
  50% { transform: translateX(-50%) rotate(5deg) translate(3px, -2px); }
  100% { transform: translateX(-50%) rotate(-4deg) translate(-2px, 2px); }
}

@keyframes shake-tube {
  0% { transform: translateX(-50%) rotate(-11deg) translate(-7px, 2px); }
  50% { transform: translateX(-50%) rotate(12deg) translate(8px, -3px); }
  100% { transform: translateX(-50%) rotate(-8deg) translate(-5px, 3px); }
}

@keyframes tilt-pop {
  0% { transform: translateX(-50%) rotate(0); }
  40% { transform: translateX(-50%) rotate(-18deg) translateY(-10px); }
  100% { transform: translateX(-50%) rotate(0); }
}

@keyframes stick-jiggle {
  0% { transform: rotate(-8deg) translateY(-10px); }
  50% { transform: rotate(9deg) translateY(-2px); }
  100% { transform: rotate(-6deg) translateY(-12px); }
}

@keyframes stick-pop {
  0% { transform: translateY(40px) scale(0.2) rotate(-20deg); opacity: 0; }
  45% { transform: translateY(-70px) scale(1.15) rotate(8deg); opacity: 1; }
  100% { transform: translateY(-20px) scale(1) rotate(0); }
}

@keyframes shock {
  to { transform: scale(18); opacity: 0; }
}

@keyframes sheen {
  0%, 55% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

@keyframes stamp {
  0% { transform: scale(1.6) rotate(-10deg); filter: brightness(1.6); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  to { opacity: 0; }
}

@keyframes chip-tick {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes row-flash {
  0% { box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.55), 0 0 24px rgba(45, 212, 191, 0.25); }
  100% { box-shadow: var(--shadow); }
}

@keyframes cta-in {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes name-in {
  from { transform: scale(0.86) translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes dialog-rumble {
  0% { transform: translate(-3px, 1px) rotate(-0.4deg); }
  50% { transform: translate(3px, -2px) rotate(0.5deg); }
  100% { transform: translate(-2px, 2px) rotate(-0.3deg); }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes spark-float {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-70px) scale(0.2); opacity: 0; }
}

@keyframes scramble-flicker {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

@keyframes trail-up {
  from { transform: translateY(40px); opacity: 0.9; }
  to { transform: translateY(-30px); opacity: 0; }
}

@media (max-width: 980px) {
  .progress-track { margin: 8px 16px 0; }
  .draw-view { padding: 8px 16px 88px; }
  .topic { font-size: 18px; }
  .team-card { grid-template-columns: 48px minmax(0, 1fr); }
  .action-wrap, .row-draw, .lot-badge { grid-column: 2; justify-self: start; }
  .result-list { grid-template-columns: 1fr; }
  .topbar { padding: 16px; }
  .topbar h1 { font-size: 22px; }
}
