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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a2a0f;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Background painting images */
#bg-image,
#bg-image-next {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  transition: opacity 0.8s ease;
}

#bg-image-next {
  opacity: 0;
  z-index: 0;
}

/* Interaction canvas — smooth rendering over paintings */
#interaction-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* Custom cursor — set dynamically via JS (data URL) */
body, canvas {
  cursor: pointer;
}

/* Music player */
#music-player {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  user-select: none;
}

#play-pause-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

#play-pause-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.icon {
  font-family: monospace;
  letter-spacing: -3px;
}

.hidden {
  display: none;
}

/* Background stepper — bottom center */
#bg-stepper-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
}

#bg-prev,
#bg-next {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

#bg-prev:hover,
#bg-next:hover {
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

#bg-stepper {
  --pill-dot-size: 12px;
  --pill-active-width: 36px;
  --pill-gap: 8px;
  --pill-bg: rgba(255, 255, 255, 0.2);
  --pill-active-bg: rgba(255, 255, 255, 0.8);
  --pill-fill-bg: rgba(255, 255, 255, 0.3);
  --pill-container-bg: rgba(0, 0, 0, 0.2);
  --pill-container-border: rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
}

/* Page title */
#page-title {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  user-select: none;
}

/* Floating wisdom sentences */
.floating-sentence {
  position: fixed;
  z-index: 2;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  max-width: 280px;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  canvas,
  #bg-image,
  #bg-image-next,
  .floating-sentence {
    transition: none !important;
  }
}
