:root {
  color-scheme: dark;
  --bg: #080911;
  --panel: rgba(16, 22, 37, 0.84);
  --panel-strong: rgba(28, 38, 65, 0.92);
  --text: #f8fbff;
  --muted: #9ca8be;
  --cyan: #42f5e9;
  --gold: #ffd15c;
  --pink: #ff3df2;
  --red: #ff4d6d;
  --green: #58ff9a;
  --border: rgba(132, 171, 255, 0.28);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #ff8b3d);
  color: #160d02;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(255, 180, 75, 0.22);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(5, 9, 18, 0.86);
  color: var(--text);
}

input[readonly] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(5, 9, 18, 0.72);
  color: var(--cyan);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--pink);
}

h1,
h2,
p {
  margin-top: 0;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.compact-shell {
  width: min(620px, calc(100% - 28px));
}

.page-header,
.panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.26);
}

.page-header,
.panel {
  padding: 24px;
}

.page-header {
  margin-bottom: 18px;
}

.live-header {
  background:
    linear-gradient(135deg, rgba(66, 245, 233, 0.12), rgba(255, 61, 242, 0.16)),
    var(--panel);
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.muted,
.hint {
  color: var(--muted);
}

.panel {
  margin: 16px 0;
}

.primary-action {
  width: 100%;
  margin-top: 14px;
}

.warning {
  border-color: rgba(255, 77, 109, 0.44);
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 12px;
}

.reveal-result-action {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(135deg, #fff1a6, var(--gold) 42%, #ff3df2);
  color: #180813;
  box-shadow:
    0 0 0 1px rgba(255, 209, 92, 0.24),
    0 0 26px rgba(255, 209, 92, 0.32),
    0 14px 34px rgba(255, 61, 242, 0.22);
}

.reveal-result-action::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  pointer-events: none;
}

.screen-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 16%, rgba(66, 245, 233, 0.18), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(255, 61, 242, 0.22), transparent 28%),
    linear-gradient(180deg, #090a15 0%, #0e1322 50%, #06070d 100%);
}

.screen-viewport {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.screen-stage {
  position: relative;
  z-index: 1;
  width: min(100vw, 177.7778vh);
  height: min(100vh, 56.25vw);
  max-width: 1920px;
  max-height: 1080px;
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: clamp(5px, 1.05vmin, 18px);
  padding: clamp(8px, 1.35vmin, 24px);
  overflow: hidden;
}

.stage-aura,
.pulse-ring {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.stage-aura {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(66, 245, 233, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.pulse-ring {
  width: min(42%, 520px);
  aspect-ratio: 1;
  border: 2px solid rgba(66, 245, 233, 0.18);
  border-radius: 50%;
  filter: blur(0.4px);
  animation: pulse 4s ease-in-out infinite;
}

.ring-one {
  left: 5%;
  top: 26%;
}

.ring-two {
  right: 4%;
  top: 8%;
  border-color: rgba(255, 61, 242, 0.2);
  animation-delay: 1.2s;
}

.safe-top,
.safe-main,
.climax-zone {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(9, 14, 26, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.34);
}

.safe-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 32%);
  gap: clamp(8px, 1.4vmin, 24px);
  align-items: center;
  padding: clamp(8px, 1.25vmin, 20px) clamp(10px, 1.55vmin, 24px);
  min-height: 0;
}

.safe-top h1 {
  margin: 0;
  font-size: clamp(22px, 5.4vmin, 88px);
  line-height: 0.96;
  text-shadow: 0 0 22px rgba(66, 245, 233, 0.36);
}

.song-stack {
  display: grid;
  gap: clamp(3px, 0.6vmin, 8px);
  justify-items: end;
  text-align: right;
  min-width: 0;
}

.song-stack strong {
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(12px, 1.9vmin, 24px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-stack span:not(.status-chip) {
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(11px, 1.45vmin, 16px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: clamp(22px, 2.8vmin, 34px);
  padding: 0 clamp(8px, 1vmin, 14px);
  border-radius: 999px;
  background: rgba(255, 209, 92, 0.16);
  color: var(--gold);
  font-size: clamp(11px, 1.3vmin, 15px);
  font-weight: 800;
}

.safe-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 28%);
  gap: clamp(7px, 1.25vmin, 20px);
  padding: clamp(8px, 1.35vmin, 22px);
  min-height: 0;
  overflow: hidden;
}

.sound-core,
.assist-board {
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, 1.35vmin, 24px);
  border-radius: 8px;
  background: rgba(16, 22, 37, 0.72);
}

.sound-core {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto auto;
  align-content: center;
}

.sound-number {
  display: flex;
  align-items: baseline;
  gap: clamp(5px, 0.9vmin, 12px);
  margin: clamp(4px, 1vmin, 16px) 0 clamp(6px, 1.15vmin, 18px);
}

.sound-number span {
  font-size: clamp(46px, 17vmin, 210px);
  line-height: 0.86;
  font-weight: 900;
  color: var(--gold);
  text-shadow:
    0 0 20px rgba(255, 209, 92, 0.45),
    0 0 70px rgba(255, 61, 242, 0.2);
}

.sound-number small {
  color: var(--cyan);
  font-size: clamp(17px, 4vmin, 42px);
  font-weight: 800;
}

.energy-track {
  height: clamp(12px, 2.9vmin, 32px);
  overflow: hidden;
  border: 1px solid rgba(66, 245, 233, 0.28);
  border-radius: 999px;
  background: rgba(3, 7, 16, 0.9);
}

.energy-track.small {
  height: 20px;
}

.energy-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--pink));
  box-shadow: 0 0 24px rgba(66, 245, 233, 0.35);
  transition: width 180ms ease-out;
}

.heat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(4px, 0.7vmin, 8px);
  margin-top: clamp(6px, 1.1vmin, 18px);
  color: var(--muted);
  font-size: clamp(9px, 1.25vmin, 13px);
  text-transform: uppercase;
}

.assist-board ol {
  display: grid;
  gap: clamp(5px, 0.95vmin, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.assist-board li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: clamp(5px, 0.8vmin, 12px);
  align-items: center;
  padding: clamp(6px, 1vmin, 14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.assist-board li:first-child {
  border-color: rgba(255, 209, 92, 0.58);
  box-shadow: 0 0 24px rgba(255, 209, 92, 0.16);
}

.assist-board span {
  font-size: clamp(14px, 2.2vmin, 24px);
  font-weight: 900;
}

.assist-board strong {
  color: var(--gold);
  font-size: clamp(16px, 2.55vmin, 28px);
}

.assist-board small {
  color: var(--muted);
  font-size: clamp(10px, 1.2vmin, 13px);
}

.climax-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 22%);
  gap: clamp(8px, 1.25vmin, 24px);
  align-items: center;
  padding: clamp(8px, 1.3vmin, 22px) clamp(10px, 1.55vmin, 24px);
  min-height: 0;
  overflow: hidden;
}

.climax-zone h2 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(17px, 3.35vmin, 54px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completion-meter {
  display: grid;
  justify-items: end;
  text-align: right;
}

.completion-meter span {
  color: var(--cyan);
  font-size: clamp(22px, 4.8vmin, 54px);
  font-weight: 900;
}

.completion-meter small {
  color: var(--muted);
  font-size: clamp(10px, 1.35vmin, 14px);
}

.safe-bottom {
  min-height: 0;
  overflow: hidden;
  color: rgba(248, 251, 255, 0.52);
  font-size: clamp(9px, 1.15vmin, 14px);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.countdown-overlay,
.result-panel {
  position: absolute;
  inset: clamp(8px, 1.4vmin, 22px);
  z-index: 12;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 209, 92, 0.22), transparent 34%),
    radial-gradient(circle at 50% 55%, rgba(255, 61, 242, 0.2), transparent 46%),
    rgba(5, 8, 16, 0.68);
  text-align: center;
  pointer-events: none;
}

.countdown-overlay[hidden],
.result-panel[hidden],
.screen-qr-card[hidden] {
  display: none;
}

.countdown-overlay strong {
  display: block;
  color: #fff8cf;
  font-size: clamp(92px, 30vmin, 360px);
  line-height: 0.82;
  font-weight: 900;
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.82),
    0 0 74px rgba(255, 209, 92, 0.82),
    0 0 110px rgba(255, 61, 242, 0.62);
  animation: countdownPop 0.95s ease-in-out infinite;
}

.countdown-kicker,
.countdown-overlay span:last-child {
  display: block;
  color: #ffffff;
  font-size: clamp(18px, 4vmin, 58px);
  font-weight: 900;
  text-shadow: 0 0 22px rgba(66, 245, 233, 0.48);
}

.result-panel {
  z-index: 20;
  align-content: center;
  gap: clamp(7px, 1.2vmin, 16px);
  padding: clamp(14px, 3vmin, 46px);
  background:
    radial-gradient(circle at 50% 34%, rgba(66, 245, 233, 0.18), transparent 32%),
    radial-gradient(circle at 50% 64%, rgba(255, 209, 92, 0.22), transparent 42%),
    rgba(5, 8, 16, 0.76);
}

.result-panel strong {
  color: #fff8cf;
  font-size: clamp(48px, 13vmin, 180px);
  line-height: 0.95;
  font-weight: 900;
  text-shadow:
    0 0 26px rgba(255, 209, 92, 0.7),
    0 0 70px rgba(255, 61, 242, 0.38);
}

.result-panel span,
.result-panel em {
  display: block;
  color: #ffffff;
  font-size: clamp(17px, 3vmin, 40px);
  font-style: normal;
  font-weight: 900;
}

.result-panel em {
  color: var(--gold);
  font-size: clamp(13px, 2.1vmin, 28px);
}

.winner-card {
  display: grid;
  gap: clamp(3px, 0.6vmin, 8px);
  margin-bottom: clamp(6px, 1vmin, 12px);
  padding: clamp(6px, 1vmin, 14px);
  border: 1px solid rgba(255, 209, 92, 0.42);
  border-radius: 8px;
  background: rgba(255, 209, 92, 0.12);
}

.winner-card span {
  color: var(--muted);
  font-size: clamp(10px, 1.25vmin, 13px);
}

.winner-card strong {
  color: var(--gold);
  font-size: clamp(18px, 3vmin, 32px);
}

.screen-qr-card {
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 18;
  display: grid;
  justify-items: center;
  gap: clamp(8px, 1.25vmin, 18px);
  width: min(520px, 42vw);
  max-width: calc(100% - 40px);
  padding: clamp(14px, 2.1vmin, 28px);
  border: 1px solid rgba(66, 245, 233, 0.54);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(66, 245, 233, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(255, 61, 242, 0.16), rgba(255, 209, 92, 0.1)),
    rgba(5, 9, 18, 0.9);
  box-shadow:
    0 0 34px rgba(66, 245, 233, 0.18),
    0 0 70px rgba(255, 61, 242, 0.13),
    0 22px 70px rgba(0, 0, 0, 0.45);
  text-align: center;
  transform: translate(-50%, -50%);
}

.screen-qr-card.qr-card--center {
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
}

.screen-qr-card.qr-card--mini {
  left: auto;
  right: clamp(12px, 2.2vmin, 34px);
  top: auto;
  bottom: clamp(10px, 1.9vmin, 28px);
  z-index: 22;
  width: clamp(132px, 13vw, 230px);
  max-width: 24vw;
  gap: clamp(3px, 0.6vmin, 8px);
  padding: clamp(7px, 1vmin, 12px);
  border-color: rgba(255, 209, 92, 0.5);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 209, 92, 0.16), transparent 42%),
    rgba(5, 9, 18, 0.82);
  box-shadow:
    0 0 20px rgba(255, 209, 92, 0.16),
    0 14px 42px rgba(0, 0, 0, 0.38);
  transform: none;
}

.screen-qr-card img {
  width: clamp(220px, 18vw, 360px);
  max-width: min(100%, 42vh);
  aspect-ratio: 1;
  border: clamp(5px, 0.75vmin, 10px) solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.26),
    0 0 38px rgba(66, 245, 233, 0.22);
}

.screen-qr-card.qr-card--mini img {
  width: clamp(76px, 7.2vw, 132px);
  max-width: min(100%, 20vh);
  border-width: clamp(3px, 0.45vmin, 5px);
}

.screen-qr-card p,
.screen-qr-card strong,
.screen-qr-card small {
  max-width: 100%;
  display: block;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-qr-card p {
  color: #ffffff;
  font-size: clamp(20px, 3.1vmin, 42px);
  font-weight: 900;
  text-shadow: 0 0 24px rgba(66, 245, 233, 0.4);
}

.screen-qr-card.qr-card--mini p {
  font-size: clamp(10px, 1.25vw, 16px);
}

.screen-qr-card strong {
  color: var(--gold);
  font-size: clamp(14px, 2vmin, 26px);
  font-weight: 900;
}

.screen-qr-card.qr-card--mini strong,
.screen-qr-card.qr-card--mini small {
  font-size: clamp(8px, 0.9vw, 12px);
}

.screen-qr-card small {
  color: var(--muted);
  font-size: clamp(9px, 1.2vmin, 13px);
}

[data-session-status="countdown"] .sound-number span,
[data-session-status="result"] .sound-number span {
  color: rgba(255, 209, 92, 0.82);
}

[data-heat-level="heating"] .sound-number span {
  color: var(--cyan);
}

[data-heat-level="hot"] .safe-top,
[data-heat-level="hot"] .climax-zone {
  border-color: rgba(255, 209, 92, 0.7);
}

[data-heat-level="climax"] .safe-top h1,
[data-heat-level="climax"] .sound-number span,
[data-heat-level="climax"] .climax-zone h2 {
  animation: flash 0.74s ease-in-out infinite alternate;
}

[data-heat-level="climax"] .climax-zone {
  background:
    linear-gradient(135deg, rgba(255, 61, 242, 0.3), rgba(255, 209, 92, 0.2)),
    rgba(12, 12, 22, 0.9);
}

@media (max-width: 760px), (max-height: 460px) {
  .screen-stage {
    gap: clamp(3px, 0.95vmin, 8px);
    padding: clamp(5px, 1vmin, 10px);
  }

  .safe-top,
  .safe-main,
  .climax-zone {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.26);
  }

  .safe-top {
    grid-template-columns: minmax(0, 1fr) minmax(130px, 36%);
    padding: 6px 8px;
  }

  .safe-main {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 30%);
    gap: 6px;
    padding: 6px;
  }

  .sound-core,
  .assist-board {
    padding: 7px;
  }

  .climax-zone {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 21%);
    padding: 6px 8px;
  }

  .stage-aura {
    opacity: 0.45;
    background-size: 54px 54px;
  }

  .pulse-ring {
    display: none;
  }

  .assist-board li:nth-child(n+4) {
    display: none;
  }

  .safe-bottom {
    opacity: 0.62;
  }

  .screen-qr-card {
    top: 56%;
    width: min(360px, 44vw);
    max-width: calc(100% - 16px);
    gap: 5px;
    padding: 7px;
  }

  .screen-qr-card img {
    width: clamp(104px, 23vmin, 190px);
    max-width: min(100%, 38vh);
    border-width: 4px;
  }

  .screen-qr-card p {
    font-size: clamp(13px, 2.8vmin, 20px);
  }

  .screen-qr-card strong,
  .screen-qr-card small {
    font-size: clamp(9px, 1.9vmin, 13px);
  }

  .countdown-overlay strong {
    font-size: clamp(64px, 24vmin, 128px);
  }

  .result-panel strong {
    font-size: clamp(36px, 11vmin, 84px);
  }
}

@media (max-height: 430px) {
  .eyebrow,
  .section-label,
  .heat-row,
  .safe-bottom {
    font-size: 9px;
  }

  .safe-top h1 {
    font-size: clamp(19px, 5vmin, 30px);
  }

  .sound-number span {
    font-size: clamp(42px, 15.6vmin, 72px);
  }

  .energy-track {
    height: 11px;
  }
}

.mobile-tool-page,
.admin-page,
.admin-login-page {
  background:
    radial-gradient(circle at top right, rgba(66, 245, 233, 0.15), transparent 32%),
    linear-gradient(180deg, #080911, #111827 62%, #090a12);
}

.admin-login-page {
  display: grid;
  min-height: 100vh;
  align-items: center;
}

.admin-login-card h1 {
  font-size: clamp(28px, 6vw, 48px);
}

.admin-login-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.admin-login-card input[type="password"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(5, 9, 18, 0.86);
  color: var(--text);
}

.admin-logout-action {
  width: auto;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 16px;
  background: linear-gradient(135deg, rgba(66, 245, 233, 0.9), rgba(255, 61, 242, 0.78));
  color: #071018;
}

.status-card,
.assist-card,
.client-mic-card,
.capture-panel,
.meter-panel,
.boost-panel,
.telemetry-panel {
  background: var(--panel-strong);
}

.client-hero h1 {
  font-size: clamp(32px, 9vw, 58px);
}

.client-mic-card {
  text-align: center;
}

.client-mic-card h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 7vw, 42px);
}

.mic-action {
  font-size: 20px;
}

.client-mic-meter {
  display: grid;
  gap: 10px;
  margin: 18px 0 10px;
}

.client-mic-meter span {
  color: var(--cyan);
  font-size: 48px;
  font-weight: 900;
}

.multi-mic-chip {
  display: grid;
  gap: clamp(3px, 0.65vmin, 8px);
  margin-bottom: clamp(6px, 1vmin, 12px);
  padding: clamp(6px, 1vmin, 14px);
  border: 1px solid rgba(66, 245, 233, 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(66, 245, 233, 0.16), transparent 40%),
    rgba(255, 255, 255, 0.045);
}

.multi-mic-chip span,
.multi-mic-chip small {
  color: var(--muted);
  font-size: clamp(10px, 1.25vmin, 13px);
}

.multi-mic-chip strong {
  color: var(--cyan);
  font-size: clamp(18px, 3vmin, 34px);
}

.multi-mic-chip b {
  color: var(--gold);
}

.status-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.status-card strong,
.capture-state {
  color: var(--gold);
  font-weight: 900;
}

.mini-wave {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.mini-wave span {
  color: var(--cyan);
  font-size: 84px;
  line-height: 0.95;
  font-weight: 900;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.admin-layout .page-header {
  grid-column: 1 / -1;
}

.control-panel {
  grid-row: span 2;
}

.boost-readout {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
}

.control-readout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  margin: 8px 0 18px;
}

.control-readout strong {
  color: var(--cyan);
  font-size: 28px;
  font-weight: 900;
}

.control-readout span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.boost-readout strong {
  color: var(--pink);
  font-size: 56px;
}

.secondary-action {
  width: 100%;
  margin: 4px 0 12px;
  background: linear-gradient(135deg, rgba(66, 245, 233, 0.95), rgba(255, 61, 242, 0.82));
  color: #061018;
}

.sensitivity-panel label {
  display: block;
  margin: 12px 0 8px;
  color: var(--text);
  font-weight: 800;
}

.meter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.meter-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(66, 245, 233, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.meter-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.meter-grid strong {
  color: var(--gold);
  font-size: 22px;
}

.telemetry-panel dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.telemetry-panel div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.telemetry-panel dt {
  color: var(--muted);
}

.telemetry-panel dd {
  margin: 0;
  color: var(--gold);
  font-weight: 900;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.55;
  }
}

@keyframes flash {
  from {
    filter: brightness(1);
    text-shadow: 0 0 24px rgba(255, 209, 92, 0.45);
  }
  to {
    filter: brightness(1.32);
    text-shadow: 0 0 36px rgba(255, 61, 242, 0.85);
  }
}

@keyframes countdownPop {
  0% {
    transform: scale(0.72);
    filter: brightness(1.4);
  }
  46% {
    transform: scale(1.08);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(0.9);
    filter: brightness(0.92);
  }
}

@media (max-width: 860px) {
  .screen-top,
  .stage-grid,
  .climax-zone,
  .admin-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .song-stack,
  .completion-meter {
    justify-items: start;
    text-align: left;
  }

  .sound-core,
  .assist-board {
    min-height: auto;
  }
}

/* V0.2.2 screen visual firepower patch. Screen-only overrides below. */
.screen-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(66, 245, 233, 0.24), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(255, 61, 242, 0.3), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255, 209, 92, 0.18), transparent 40%),
    linear-gradient(180deg, #060711 0%, #111025 46%, #05060c 100%);
}

.stage-beams,
.stage-particles {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.stage-beams {
  inset: -18% -8% 0;
  background:
    conic-gradient(from 212deg at 12% 108%, transparent 0deg, rgba(66, 245, 233, 0.3) 9deg, transparent 18deg),
    conic-gradient(from 146deg at 88% 108%, transparent 0deg, rgba(255, 61, 242, 0.32) 10deg, transparent 21deg),
    linear-gradient(90deg, transparent 0%, rgba(255, 209, 92, 0.09) 50%, transparent 100%);
  filter: blur(0.5px);
  opacity: 0.9;
  animation: beamSweep 5.2s ease-in-out infinite alternate;
}

.stage-particles {
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(66, 245, 233, 0.4) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(255, 61, 242, 0.35) 0 1px, transparent 1.8px);
  background-position: 8% 18%, 44% 34%, 82% 24%;
  background-size: 120px 96px, 170px 120px, 220px 150px;
  opacity: 0.34;
  animation: particleDrift 9s linear infinite;
}

.pulse-ring {
  border-color: rgba(66, 245, 233, 0.26);
  filter: blur(0.35px) drop-shadow(0 0 28px rgba(66, 245, 233, 0.18));
}

.safe-top,
.safe-main,
.climax-zone {
  background:
    linear-gradient(135deg, rgba(66, 245, 233, 0.09), rgba(255, 61, 242, 0.08)),
    rgba(9, 14, 26, 0.78);
}

.safe-top h1 {
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(22px, 4.65vmin, 76px);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 0 14px rgba(66, 245, 233, 0.46),
    0 0 34px rgba(255, 61, 242, 0.32);
}

.brand-subline {
  max-width: 100%;
  margin-top: clamp(3px, 0.55vmin, 8px);
  overflow: hidden;
  color: rgba(255, 209, 92, 0.94);
  font-size: clamp(10px, 1.35vmin, 17px);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sound-core,
.assist-board {
  background:
    radial-gradient(circle at 50% 48%, rgba(66, 245, 233, 0.13), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(16, 22, 37, 0.72);
}

.sound-core {
  position: relative;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.sound-core::before {
  content: "";
  position: absolute;
  inset: 12% 10% 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 209, 92, 0.2), transparent 38%),
    radial-gradient(circle, rgba(255, 61, 242, 0.14), transparent 58%);
  filter: blur(10px);
  opacity: 0.9;
  animation: breathingGlow 3.2s ease-in-out infinite;
}

.sound-core::after {
  content: "";
  position: absolute;
  left: clamp(18px, 3.2vmin, 48px);
  right: clamp(18px, 3.2vmin, 48px);
  top: 38%;
  bottom: 19%;
  z-index: 0;
  border-radius: 12px;
  background:
    linear-gradient(180deg, transparent 0 9%, rgba(66, 245, 233, 0.22) 10%, transparent 11% 24%, rgba(255, 61, 242, 0.2) 25%, transparent 26% 39%, rgba(255, 209, 92, 0.18) 40%, transparent 41% 100%),
    repeating-linear-gradient(90deg,
      transparent 0 2.2%,
      rgba(66, 245, 233, 0.32) 2.3% 2.9%,
      transparent 3% 5.4%,
      rgba(255, 61, 242, 0.26) 5.5% 6.1%,
      transparent 6.2% 8.8%
    );
  filter: blur(0.25px) drop-shadow(0 0 18px rgba(66, 245, 233, 0.2));
  opacity: 0.72;
  transform-origin: center;
  animation: waveWallBreathe 2.8s ease-in-out infinite;
}

.sound-core > * {
  position: relative;
  z-index: 1;
}

.live-slogan {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: clamp(24px, 3.1vmin, 42px);
  padding: 0 clamp(10px, 1.5vmin, 22px);
  border: 1px solid rgba(255, 209, 92, 0.46);
  border-radius: 999px;
  background: rgba(255, 209, 92, 0.13);
  color: #fff7c6;
  font-size: clamp(14px, 2.4vmin, 34px);
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 209, 92, 0.34);
}

.sound-number {
  margin: clamp(1px, 0.45vmin, 10px) 0 clamp(4px, 0.75vmin, 12px);
}

.wave-visual {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  align-items: end;
  gap: clamp(2px, 0.45vmin, 7px);
  min-height: clamp(44px, 11vmin, 126px);
  margin: clamp(6px, 1vmin, 14px) 0 clamp(4px, 0.8vmin, 12px);
  padding: clamp(5px, 0.9vmin, 12px);
  border: 1px solid rgba(66, 245, 233, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(66, 245, 233, 0.08), rgba(255, 61, 242, 0.04)),
    rgba(0, 0, 0, 0.14);
}

.wave-visual span {
  display: block;
  min-height: 18%;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #fff3a0, var(--cyan) 45%, var(--pink));
  box-shadow: 0 0 16px rgba(66, 245, 233, 0.26);
  transform-origin: bottom;
  animation: spectrumPulse 1.3s ease-in-out infinite alternate;
}

.wave-visual span:nth-child(1) { height: 22%; animation-delay: -0.2s; }
.wave-visual span:nth-child(2) { height: 38%; animation-delay: -0.7s; }
.wave-visual span:nth-child(3) { height: 58%; animation-delay: -0.1s; }
.wave-visual span:nth-child(4) { height: 44%; animation-delay: -0.5s; }
.wave-visual span:nth-child(5) { height: 70%; animation-delay: -0.9s; }
.wave-visual span:nth-child(6) { height: 52%; animation-delay: -0.25s; }
.wave-visual span:nth-child(7) { height: 82%; animation-delay: -0.6s; }
.wave-visual span:nth-child(8) { height: 64%; animation-delay: -1s; }
.wave-visual span:nth-child(9) { height: 91%; animation-delay: -0.35s; }
.wave-visual span:nth-child(10) { height: 76%; animation-delay: -0.8s; }
.wave-visual span:nth-child(11) { height: 88%; animation-delay: -0.15s; }
.wave-visual span:nth-child(12) { height: 62%; animation-delay: -0.55s; }
.wave-visual span:nth-child(13) { height: 80%; animation-delay: -0.95s; }
.wave-visual span:nth-child(14) { height: 54%; animation-delay: -0.4s; }
.wave-visual span:nth-child(15) { height: 68%; animation-delay: -0.75s; }
.wave-visual span:nth-child(16) { height: 46%; animation-delay: -0.05s; }
.wave-visual span:nth-child(17) { height: 59%; animation-delay: -0.5s; }
.wave-visual span:nth-child(18) { height: 36%; animation-delay: -0.85s; }
.wave-visual span:nth-child(19) { height: 48%; animation-delay: -0.2s; }
.wave-visual span:nth-child(20) { height: 28%; animation-delay: -0.65s; }

.chorus-ring {
  position: absolute;
  right: clamp(10px, 2.2vmin, 32px);
  top: clamp(40px, 9.5vmin, 116px);
  width: clamp(74px, 13vmin, 168px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 209, 92, 0.18), transparent 46%),
    conic-gradient(from 0deg, var(--cyan), var(--pink), var(--gold), var(--cyan));
  box-shadow:
    0 0 22px rgba(66, 245, 233, 0.2),
    0 0 38px rgba(255, 61, 242, 0.14);
  animation: ringSpin 8s linear infinite;
}

.chorus-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: rgba(7, 9, 18, 0.88);
}

.chorus-ring span {
  position: relative;
  color: #fffbe6;
  font-size: clamp(10px, 1.55vmin, 18px);
  font-weight: 900;
}

.assist-board {
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 209, 92, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 61, 242, 0.09), rgba(66, 245, 233, 0.04)),
    rgba(16, 22, 37, 0.78);
}

.assist-board li {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.05);
}

.assist-board li:first-child {
  background:
    linear-gradient(90deg, rgba(255, 209, 92, 0.26), rgba(255, 61, 242, 0.12)),
    rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 24px rgba(255, 209, 92, 0.22);
}

.climax-zone {
  background:
    linear-gradient(90deg, rgba(255, 209, 92, 0.16), rgba(255, 61, 242, 0.13), rgba(66, 245, 233, 0.11)),
    rgba(9, 14, 26, 0.78);
}

[data-heat-level="heating"] .stage-beams,
[data-heat-level="hot"] .stage-beams {
  opacity: 1;
  animation-duration: 3.4s;
}

[data-heat-level="hot"] .wave-visual span {
  animation-duration: 0.82s;
}

[data-heat-level="heating"] .sound-core::after {
  opacity: 0.9;
  animation-duration: 2s;
}

[data-heat-level="hot"] .sound-core::after {
  opacity: 1;
  filter: blur(0.2px) drop-shadow(0 0 26px rgba(255, 209, 92, 0.25));
  animation-duration: 1.35s;
}

[data-heat-level="climax"] .stage-beams {
  opacity: 1;
  filter: saturate(1.4) brightness(1.35);
  animation-duration: 1.2s;
}

[data-heat-level="burst"] .stage-beams {
  opacity: 1;
  filter: saturate(1.75) brightness(1.55);
  animation-duration: 0.9s;
}

[data-heat-level="climax"] .stage-particles {
  opacity: 0.7;
  animation-duration: 3s;
}

[data-heat-level="burst"] .stage-particles {
  opacity: 0.86;
  animation-duration: 2.2s;
}

[data-heat-level="climax"] .wave-visual span {
  animation-duration: 0.46s;
  box-shadow: 0 0 22px rgba(255, 209, 92, 0.42);
}

[data-heat-level="burst"] .wave-visual span {
  animation-duration: 0.36s;
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.36),
    0 0 30px rgba(255, 209, 92, 0.45);
}

[data-heat-level="climax"] .sound-core::after {
  opacity: 1;
  filter: brightness(1.45) saturate(1.4) drop-shadow(0 0 34px rgba(255, 209, 92, 0.36));
  animation-duration: 0.7s;
}

[data-heat-level="burst"] .sound-core::after {
  opacity: 1;
  filter: brightness(1.8) saturate(1.8) drop-shadow(0 0 42px rgba(255, 209, 92, 0.5));
  animation-duration: 0.55s;
}

[data-heat-level="climax"] .assist-board li:nth-child(-n+3) {
  border-color: rgba(255, 209, 92, 0.78);
  box-shadow:
    0 0 18px rgba(255, 209, 92, 0.22),
    inset 0 0 20px rgba(255, 61, 242, 0.12);
}

[data-heat-level="burst"] .assist-board li:nth-child(-n+3) {
  border-color: rgba(255, 209, 92, 0.9);
  box-shadow:
    0 0 24px rgba(255, 209, 92, 0.32),
    0 0 34px rgba(255, 61, 242, 0.16),
    inset 0 0 24px rgba(255, 61, 242, 0.16);
}

@media (max-width: 760px), (max-height: 460px) {
  .stage-beams {
    opacity: 0.62;
  }

  .stage-particles {
    opacity: 0.2;
  }

  .chorus-ring {
    display: none;
  }

  .wave-visual {
    min-height: clamp(30px, 8vmin, 58px);
    gap: 2px;
    padding: 4px;
  }

  .sound-core::after {
    top: 40%;
    bottom: 21%;
    opacity: 0.52;
  }
}

@media (max-height: 430px) {
  .brand-subline {
    display: none;
  }

  .live-slogan {
    min-height: 20px;
    font-size: clamp(12px, 2.3vmin, 18px);
  }
}

@keyframes beamSweep {
  from {
    transform: translateX(-1.2%) rotate(-1deg);
  }
  to {
    transform: translateX(1.2%) rotate(1deg);
  }
}

@keyframes particleDrift {
  from {
    background-position: 8% 18%, 44% 34%, 82% 24%;
  }
  to {
    background-position: 18% 8%, 50% 44%, 76% 34%;
  }
}

@keyframes breathingGlow {
  0%,
  100% {
    opacity: 0.58;
    transform: scale(0.94);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes waveWallBreathe {
  0%,
  100% {
    opacity: 0.56;
    transform: scaleX(0.98) scaleY(0.88);
  }
  50% {
    opacity: 0.92;
    transform: scaleX(1.01) scaleY(1.08);
  }
}

@keyframes spectrumPulse {
  from {
    transform: scaleY(0.58);
    filter: brightness(0.9);
  }
  to {
    transform: scaleY(1.08);
    filter: brightness(1.28);
  }
}

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

/* V0.2.2 extended fluid ribbon and maxout burst. Screen-only overrides. */
.screen-page {
  --fluid-width: 58%;
  --fluid-height: 32%;
  --fluid-opacity: 0.72;
  --fluid-blur: 4px;
  --fluid-brightness: 1.05;
  --fluid-y-scale: 0.78;
  --spectrum-height: clamp(40px, 10vmin, 118px);
  --spectrum-opacity: 0.72;
}

.screen-stage {
  isolation: isolate;
}

.fluid-wave {
  position: absolute;
  left: 50%;
  top: 53%;
  z-index: 0;
  width: var(--fluid-width);
  height: var(--fluid-height);
  min-width: 46%;
  max-width: 112%;
  min-height: 26%;
  max-height: 72%;
  pointer-events: none;
  opacity: var(--fluid-opacity);
  transform: translate(-50%, -50%);
  filter:
    blur(var(--fluid-blur))
    brightness(var(--fluid-brightness))
    saturate(1.34);
  mix-blend-mode: screen;
}

.fluid-ribbon,
.fluid-sparkline {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112%;
  height: 58%;
  border-radius: 48% 52% 50% 50%;
  transform-origin: center;
  clip-path: polygon(
    0 49%, 8% 43%, 15% 49%, 23% 35%, 31% 48%, 39% 29%,
    48% 54%, 57% 31%, 65% 46%, 74% 36%, 83% 48%, 91% 40%,
    100% 49%, 100% 61%, 91% 57%, 83% 65%, 74% 55%, 65% 66%,
    57% 54%, 48% 72%, 39% 51%, 31% 64%, 23% 52%, 15% 61%,
    8% 55%, 0 59%
  );
}

.ribbon-one {
  background:
    radial-gradient(ellipse at 20% 45%, rgba(71, 126, 255, 0.72), transparent 30%),
    radial-gradient(ellipse at 38% 48%, rgba(255, 91, 207, 0.66), transparent 28%),
    radial-gradient(ellipse at 60% 46%, rgba(66, 245, 233, 0.74), transparent 30%),
    radial-gradient(ellipse at 78% 44%, rgba(255, 209, 92, 0.72), transparent 27%),
    linear-gradient(90deg, rgba(112, 55, 255, 0.42), rgba(0, 198, 255, 0.54), rgba(255, 61, 242, 0.5), rgba(255, 141, 54, 0.5));
  animation: fluidDriftOne 5.8s ease-in-out infinite alternate;
}

.ribbon-two {
  height: 72%;
  opacity: 0.7;
  background:
    radial-gradient(ellipse at 14% 52%, rgba(172, 72, 255, 0.62), transparent 32%),
    radial-gradient(ellipse at 33% 44%, rgba(0, 188, 255, 0.58), transparent 30%),
    radial-gradient(ellipse at 53% 56%, rgba(255, 255, 255, 0.45), transparent 20%),
    radial-gradient(ellipse at 72% 52%, rgba(255, 61, 242, 0.56), transparent 32%),
    linear-gradient(90deg, rgba(255, 61, 242, 0.35), rgba(66, 245, 233, 0.48), rgba(255, 209, 92, 0.42));
  animation: fluidDriftTwo 4.8s ease-in-out infinite alternate;
}

.ribbon-three {
  height: 44%;
  opacity: 0.82;
  background:
    linear-gradient(90deg,
      rgba(120, 64, 255, 0.2) 0%,
      rgba(34, 171, 255, 0.7) 18%,
      rgba(255, 111, 218, 0.72) 40%,
      rgba(66, 245, 233, 0.7) 63%,
      rgba(255, 209, 92, 0.78) 82%,
      rgba(255, 93, 54, 0.38) 100%);
  animation: fluidDriftThree 3.6s ease-in-out infinite alternate;
}

.ribbon-four {
  height: 30%;
  opacity: 0.58;
  background:
    radial-gradient(ellipse at 50% 52%, rgba(255, 255, 255, 0.84), transparent 24%),
    linear-gradient(90deg, transparent, rgba(66, 245, 233, 0.72), rgba(255, 61, 242, 0.72), rgba(255, 209, 92, 0.72), transparent);
  filter: blur(1px);
  animation: fluidDriftFour 2.9s ease-in-out infinite alternate;
}

.fluid-sparkline {
  height: 17%;
  opacity: 0.9;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(66, 245, 233, 0.9) 16%,
      rgba(255, 255, 255, 0.95) 35%,
      rgba(255, 61, 242, 0.88) 52%,
      rgba(255, 209, 92, 0.94) 72%,
      transparent 100%);
  filter: blur(0.5px) drop-shadow(0 0 14px rgba(255, 255, 255, 0.28));
  animation: sparklinePulse 1.8s ease-in-out infinite alternate;
}

.wave-visual {
  min-height: var(--spectrum-height);
  opacity: var(--spectrum-opacity);
  transition:
    min-height 180ms ease-out,
    opacity 180ms ease-out,
    filter 180ms ease-out;
}

.wave-visual span {
  filter: brightness(var(--fluid-brightness));
}

[data-heat-level="heating"] .fluid-wave {
  filter:
    blur(calc(var(--fluid-blur) * 0.8))
    brightness(calc(var(--fluid-brightness) + 0.12))
    saturate(1.55);
}

[data-heat-level="hot"] .fluid-wave {
  filter:
    blur(calc(var(--fluid-blur) * 0.62))
    brightness(calc(var(--fluid-brightness) + 0.28))
    saturate(1.75);
}

[data-heat-level="climax"] .fluid-wave {
  opacity: 1;
  filter:
    blur(calc(var(--fluid-blur) * 0.45))
    brightness(calc(var(--fluid-brightness) + 0.48))
    saturate(2);
}

[data-heat-level="burst"] .fluid-wave {
  opacity: 1;
  filter:
    blur(calc(var(--fluid-blur) * 0.38))
    brightness(calc(var(--fluid-brightness) + 0.62))
    saturate(2.15);
}

[data-heat-level="climax"] .fluid-ribbon,
[data-heat-level="burst"] .fluid-ribbon,
[data-burst="true"] .fluid-ribbon {
  animation-duration: 1.05s;
}

[data-burst="true"] .fluid-wave {
  width: min(118%, var(--fluid-width));
  height: min(78%, var(--fluid-height));
  opacity: 1;
  filter: blur(1px) brightness(1.95) saturate(2.35);
}

.burst-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

[data-burst="true"] .burst-layer {
  visibility: visible;
  animation: burstLayerFade 1.85s ease-out forwards;
}

.burst-flash {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.92), transparent 17%),
    radial-gradient(circle at 50% 50%, rgba(255, 209, 92, 0.64), transparent 32%),
    radial-gradient(circle at 33% 52%, rgba(66, 245, 233, 0.36), transparent 28%),
    radial-gradient(circle at 70% 48%, rgba(255, 61, 242, 0.42), transparent 30%);
  opacity: 0;
}

[data-burst="true"] .burst-flash {
  animation: burstFlash 1.35s ease-out forwards;
}

.burst-shockwave {
  position: absolute;
  width: min(55vmin, 640px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  box-shadow:
    0 0 28px rgba(255, 209, 92, 0.52),
    inset 0 0 30px rgba(66, 245, 233, 0.32);
  opacity: 0;
}

.shock-two {
  border-color: rgba(255, 61, 242, 0.72);
  animation-delay: 0.14s;
}

[data-burst="true"] .burst-shockwave {
  animation: shockwave 1.2s ease-out forwards;
}

.burst-confetti {
  position: absolute;
  left: 50%;
  top: 50%;
}

.burst-confetti span {
  position: absolute;
  width: clamp(5px, 0.9vmin, 13px);
  height: clamp(12px, 2.1vmin, 24px);
  border-radius: 3px;
  background: var(--tone);
  box-shadow: 0 0 14px color-mix(in srgb, var(--tone), transparent 28%);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
}

[data-burst="true"] .burst-confetti span {
  animation: confettiBoom 1.45s cubic-bezier(0.13, 0.76, 0.24, 1) forwards;
}

.burst-hang {
  position: relative;
  display: grid;
  justify-items: center;
  opacity: 0;
  transform: scale(0.28) rotate(-7deg);
  text-align: center;
}

.burst-hang strong {
  color: #fff8cf;
  font-size: clamp(92px, 28vmin, 360px);
  line-height: 0.82;
  font-weight: 900;
  text-shadow:
    0 3px 0 #ff7a2e,
    0 0 18px rgba(255, 255, 255, 0.92),
    0 0 46px rgba(255, 209, 92, 0.82),
    0 0 92px rgba(255, 61, 242, 0.74),
    0 0 120px rgba(66, 245, 233, 0.58);
  -webkit-text-stroke: 2px rgba(46, 12, 0, 0.86);
}

.burst-hang span {
  margin-top: clamp(6px, 1.4vmin, 18px);
  padding: clamp(4px, 0.8vmin, 10px) clamp(12px, 2vmin, 28px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(8, 8, 16, 0.64);
  color: #ffffff;
  font-size: clamp(17px, 3.5vmin, 52px);
  font-weight: 900;
  text-shadow: 0 0 22px rgba(255, 209, 92, 0.62);
}

[data-burst="true"] .burst-hang {
  animation: hangImpact 1.75s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
}

@media (max-width: 760px), (max-height: 460px) {
  .fluid-wave {
    top: 55%;
    max-width: 106%;
    max-height: 62%;
  }

  .fluid-ribbon,
  .fluid-sparkline {
    width: 108%;
  }

  .wave-visual {
    min-height: clamp(28px, 7.4vmin, 58px);
  }

  .burst-confetti span:nth-child(n+9) {
    display: none;
  }

  .burst-hang strong {
    font-size: clamp(66px, 21vmin, 128px);
    -webkit-text-stroke-width: 1px;
  }

  .burst-hang span {
    font-size: clamp(12px, 2.9vmin, 20px);
  }
}

@media (max-height: 430px) {
  .fluid-wave {
    top: 57%;
    max-height: 54%;
  }

  .wave-visual {
    min-height: clamp(24px, 6vmin, 42px);
    margin-top: 3px;
    margin-bottom: 2px;
  }
}

@keyframes fluidDriftOne {
  from {
    transform: translate(-50%, -52%) scaleX(0.98) scaleY(calc(var(--fluid-y-scale) * 0.92)) rotate(-2deg);
  }
  to {
    transform: translate(-48%, -47%) scaleX(1.04) scaleY(calc(var(--fluid-y-scale) * 1.12)) rotate(2deg);
  }
}

@keyframes fluidDriftTwo {
  from {
    transform: translate(-51%, -46%) scaleX(1.02) scaleY(calc(var(--fluid-y-scale) * 0.84)) rotate(3deg);
  }
  to {
    transform: translate(-49%, -55%) scaleX(0.96) scaleY(calc(var(--fluid-y-scale) * 1.18)) rotate(-3deg);
  }
}

@keyframes fluidDriftThree {
  from {
    transform: translate(-52%, -50%) scaleX(0.98) scaleY(calc(var(--fluid-y-scale) * 0.62)) rotate(-1deg);
  }
  to {
    transform: translate(-47%, -49%) scaleX(1.08) scaleY(calc(var(--fluid-y-scale) * 1.02)) rotate(1.5deg);
  }
}

@keyframes fluidDriftFour {
  from {
    transform: translate(-50%, -48%) scaleX(0.94) scaleY(calc(var(--fluid-y-scale) * 0.45));
  }
  to {
    transform: translate(-50%, -53%) scaleX(1.08) scaleY(calc(var(--fluid-y-scale) * 0.75));
  }
}

@keyframes sparklinePulse {
  from {
    transform: translate(-50%, -50%) scaleX(0.92) scaleY(0.52);
    opacity: 0.42;
  }
  to {
    transform: translate(-50%, -50%) scaleX(1.08) scaleY(1.08);
    opacity: 0.94;
  }
}

@keyframes burstLayerFade {
  0% {
    opacity: 0;
  }
  7%,
  68% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes burstFlash {
  0% {
    opacity: 0;
    transform: scale(0.78);
  }
  10% {
    opacity: 0.94;
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes shockwave {
  0% {
    opacity: 0.88;
    transform: scale(0.18);
  }
  100% {
    opacity: 0;
    transform: scale(2.35);
  }
}

@keyframes confettiBoom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(var(--rot));
  }
}

@keyframes hangImpact {
  0% {
    opacity: 0;
    transform: scale(0.18) rotate(-9deg);
  }
  14% {
    opacity: 1;
    transform: scale(1.18) rotate(3deg);
  }
  24% {
    transform: scale(0.96) rotate(-2deg);
  }
  38%,
  68% {
    opacity: 1;
    transform: scale(1.02) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.72) rotate(0deg);
  }
}
