html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
  font-family: "Chalkboard SE", "Marker Felt", "Comic Sans MS", "Comic Neue", ui-rounded, system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
  background: #fff;
}

.hit { fill: #000; fill-opacity: 0; }
.shadow { fill: #000; opacity: 0.08; }
.creature { cursor: grab; }
.creature:active { cursor: grabbing; }
.particle, .bubble { pointer-events: none; }
.photo-card { cursor: zoom-in; }

.bubble text {
  font-size: 26px;
  font-weight: bold;
  fill: #5b3ccf;
  letter-spacing: 2px;
}

.drawin {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawin 0.45s ease-out forwards;
}
@keyframes drawin { to { stroke-dashoffset: 0; } }

#mute {
  position: fixed;
  right: 12px;
  bottom: 12px;
  font-size: 28px;
  background: #fff;
  border: 3px solid #5b3ccf;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  cursor: pointer;
  z-index: 5;
}

#pics {
  position: fixed;
  right: 76px;
  bottom: 12px;
  font-size: 26px;
  background: #fff;
  border: 3px solid #5b3ccf;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  cursor: pointer;
  z-index: 5;
}
#pics[aria-pressed="true"] { background: #e8e2fb; }

#photo {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  z-index: 20;
  cursor: zoom-out;
}
#photo[hidden] { display: none; }
#photo p {
  margin: 0;
  color: #5b3ccf;
  font-weight: bold;
  font-size: 24px;
}
#photo img {
  max-width: calc(100% - 32px);
  max-height: calc(100% - 96px);
  border: 4px solid #5b3ccf;
  border-radius: 6px;
  transform: rotate(-1.5deg);
}

#splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10;
  cursor: pointer;
  transition: opacity 0.5s, transform 0.5s;
}
#splash svg {
  width: min(40vw, 40vh);
  animation: bob 1.4s ease-in-out infinite;
}
#splash h1 {
  color: #5b3ccf;
  font-size: min(10vw, 64px);
  margin: 0.2em 0 0;
}
#splash.gone {
  opacity: 0;
  transform: scale(1.3);
  pointer-events: none;
}
@keyframes bob {
  50% { transform: translateY(-12px) rotate(4deg); }
}

#timeline {
  position: fixed;
  left: 12px;
  right: 144px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
  color: #5b3ccf;
  font-weight: bold;
  font-size: 18px;
}
#timeline span { white-space: pre; overflow: hidden; text-overflow: ellipsis; min-width: 0; line-height: 1.15; }
#time {
  flex: 1;
  min-width: 90px;
  max-width: 420px;
  height: 44px;
  accent-color: #5b3ccf;
  cursor: pointer;
}
#time::-webkit-slider-thumb { width: 32px; height: 32px; }
