/* Birthday mode: decorative balloons + banner. Balloons never take input. */
.balloons {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.balloons[hidden] {
  display: none;
}
.performance-stage .balloons {
  z-index: 0;
  opacity: 0.6;
}
/* Page balloons drift behind content; controls and text stay on top. */
body.birthday-on > main,
body.birthday-on > .footer {
  position: relative;
  z-index: 1;
}
body > .balloons {
  z-index: 0;
  opacity: 0.75;
}
.performance-stage > :not(.balloons, .stage-header) {
  position: relative;
  z-index: 1;
}
.balloon {
  position: absolute;
  left: var(--x);
  bottom: calc(var(--size) * -2);
  width: var(--size);
  height: calc(var(--size) * 1.22);
  border-radius: 50% 50% 47% 47% / 55% 55% 45% 45%;
  background:
    radial-gradient(
      circle at 32% 28%,
      rgb(255 255 255 / 0.55) 0 9%,
      transparent 24%
    ),
    var(--color);
  box-shadow: inset -6px -9px 0 rgb(0 0 0 / 0.14);
  animation: balloon-rise var(--duration) linear var(--delay) infinite;
  will-change: transform;
}
.balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 9px;
  height: 7px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: var(--color);
}
.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: calc(var(--size) * 1.3);
  background: linear-gradient(var(--muted), transparent);
  margin-top: 4px;
}
@keyframes balloon-rise {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(var(--sway), -60vh);
  }
  100% {
    transform: translate(0, calc(-120vh - var(--size) * 3));
  }
}
@media (prefers-reduced-motion: reduce) {
  .balloon {
    animation: none;
    bottom: auto;
    top: var(--rest);
    opacity: 0.55;
  }
  .balloon:nth-child(odd) {
    left: auto;
    right: calc(var(--x) / 6);
  }
  .balloon:nth-child(even) {
    left: calc(var(--x) / 6);
  }
}
.birthday-toggle {
  font-size: 11px;
  padding: 4px 9px;
  min-height: 30px;
}
.birthday-toggle[aria-pressed="true"] {
  background: var(--selection);
  color: var(--accent);
  border-color: var(--accent);
}
.birthday-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}
.birthday-banner[hidden] {
  display: none;
}
.birthday-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex: none;
}
.birthday-copy {
  min-width: 0;
  flex: 1;
}
.birthday-title {
  margin: 0;
  font:
    italic clamp(20px, 2.4vw, 30px) / 1.1 Georgia,
    serif;
  color: var(--fg);
  overflow-wrap: anywhere;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.birthday-lyric {
  margin: 4px 0 0;
  font: 12px var(--mono);
  color: var(--muted);
}
.birthday-lyric span[data-active="true"] {
  color: var(--accent);
  text-decoration: underline 2px;
  text-underline-offset: 4px;
}
.birthday-edit {
  flex: none;
}
.birthday-setup {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.birthday-setup .form-stack {
  flex: 1;
  min-width: 0;
}
.birthday-photo-pick {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  color: var(--muted);
  font-size: 11px;
}
.birthday-photo-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.record-button[data-recording="true"] {
  color: var(--error);
  border-color: var(--error);
}
/* Live view banner: large photo + name for streams and recorded messages. */
.stage-birthday {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.stage-birthday[hidden] {
  display: none;
}
.stage-birthday .birthday-photo {
  width: clamp(72px, 9vw, 132px);
  height: clamp(72px, 9vw, 132px);
  border-width: 3px;
}
.stage-birthday .birthday-title {
  font-size: clamp(28px, 4vw, 60px);
  color: var(--accent);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stage-birthday .birthday-lyric {
  font-size: clamp(14px, 1.5vw, 22px);
  margin-top: 8px;
}
@media (min-width: 901px) and (max-height: 820px) {
  .stage-birthday {
    padding: 8px 0;
  }
  .stage-birthday .birthday-photo {
    width: 64px;
    height: 64px;
  }
  .stage-birthday .birthday-title {
    font-size: 34px;
  }
  .stage-birthday .birthday-lyric {
    font-size: 13px;
    margin-top: 4px;
  }
}
@media (max-width: 560px) {
  .birthday-toggle {
    padding: 4px 6px;
  }
  .birthday-banner {
    gap: 10px;
    padding: 8px 10px;
  }
  .birthday-photo {
    width: 44px;
    height: 44px;
  }
  .birthday-setup {
    flex-direction: column;
  }
}
