:root {
  --ink: #fff8ee;
  --muted: #d7c4e8;
  --bar: rgba(16, 6, 28, 0.78);
  --btn: #3a2158;
  --accent: #ff4d8d;
  --accent-2: #7c5cff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  height: 100%;
  background: #12081c;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, sans-serif;
  overflow: hidden;
}
#stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: #000;
}
#vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#kanga {
  position: absolute;
  width: 38vw;
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.45));
}
#bubble {
  position: absolute;
  max-width: min(72vw, 280px);
  background: #fff;
  color: #111;
  border: 3px solid #111;
  border-radius: 50% / 46%;
  padding: 12px 16px;
  box-shadow: 2px 3px 0 #111;
}
#bubble::after {
  content: "";
  position: absolute;
  left: var(--tail-x, 70%);
  bottom: -16px;
  width: 16px;
  height: 22px;
  background: #fff;
  border-right: 3px solid #111;
  border-bottom: 3px solid #111;
  transform: skewX(-28deg);
}
#quote {
  margin: 0;
  font: 700 14px/1.25 Georgia, "Times New Roman", serif;
  text-align: center;
}
#bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bar) 30%);
}
.btn {
  appearance: none;
  border: 0;
  background: var(--btn);
  color: var(--ink);
  padding: 11px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.sound {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  z-index: 5;
  appearance: none;
  border: 0;
  background: #ff4d8d;
  color: #fff;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 16px;
}
.sound.on { background: #3a2158; }
#status {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  left: 12px; right: 12px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}
#overlay.off { display: none !important; }
#lock {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(10,4,18,.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
}
#lock[hidden] { display: none !important; }
#lock .track {
  width: min(72vw, 280px);
  height: 12px;
  background: #3a2158;
  border-radius: 999px;
  overflow: hidden;
}
#barfill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff4d8d, #7c5cff);
}
body.busy #bar, body.busy #btn-sound { pointer-events: none; opacity: .45; }
