:root {
  --cream: #f6efe2;
  --gold: #ffd77a;
  --panel-dark: #150a2c;
  --violet: #80265c;
  --period: 20s;
  --orbit-rx: 40vmin;
  --orbit-ry: 18vmin;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0a0414;
  font-family: "Baloo 2", "Segoe UI", sans-serif;
  color: var(--cream);
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) saturate(1.05);
}

.orbit-system {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vmin, 900px);
  height: min(92vmin, 900px);
}

.mascot-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  line-height: 0;
  /* No z-index: it must stay in normal DOM/paint order, behind the
     orbit rings and buttons that come after it in the HTML — an
     explicit z-index here previously made it paint above them even
     when an orbit's path should pass in front of it. */
}

.mascot {
  height: clamp(110px, 26vmin, 280px);
  width: auto;
  user-select: none;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5));
}

.mascot-btn:hover .mascot,
.mascot-btn:focus-visible .mascot {
  transform: scale(1.1);
  filter:
    drop-shadow(2px 0 0 var(--gold))
    drop-shadow(-2px 0 0 var(--gold))
    drop-shadow(0 2px 0 var(--gold))
    drop-shadow(0 -2px 0 var(--gold))
    drop-shadow(0 0 22px rgba(255, 210, 130, 0.65))
    drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5));
}

.mascot-btn:focus-visible {
  outline: none;
}

.orbit-track {
  position: absolute;
  inset: 0;
  /* This box spans the whole scene (it has to, for .orbit-path/.orbit-btn
     to center on Chrûk) and, despite being invisible, would otherwise
     intercept every click over that area — including on Chrûk himself,
     underneath. Only the actual buttons should be clickable. */
  pointer-events: none;
}

/* The visible ring: a plain ellipse, tilted, centered on Chrûk. Purely
   decorative — the button that travels along it is positioned separately,
   in JS, since a CSS-only elliptical path (offset-path) turned out to
   fight click handling (see script.js). */
.orbit-path {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--orbit-rx) * 2);
  height: calc(var(--orbit-ry) * 2);
  transform: translate(-50%, -50%) rotate(var(--tilt));
  border-radius: 50%;
  border: 1.5px solid rgba(255, 215, 130, 0.28);
  pointer-events: none;
}

/* Zero-size anchor point at Chrûk; script.js moves it along the ellipse
   every frame via translate(x, y). Keeping it 0×0 means it never covers
   more than the button drawn inside it, so it can't block clicks on
   neighbouring orbits. */
.orbit-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}

.orbit-btn {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  width: clamp(58px, 9vmin, 92px);
  height: clamp(58px, 9vmin, 92px);
  /* Not a %: percentage padding resolves against the containing block's
     WIDTH, which here is .orbit-slot's deliberate 0×0 box — it would
     always compute to 0. */
  padding: clamp(10px, 1.5vmin, 16px);
  border-radius: 24%;
  border: 2px solid rgba(246, 239, 226, 0.3);
  background: linear-gradient(155deg, rgba(128, 38, 92, 0.85), rgba(21, 10, 44, 0.9));
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  transform: translate(-50%, -50%);
  text-decoration: none;
  color: inherit;
}

.orbit-btn img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.orbit-btn:hover,
.orbit-btn:focus-visible {
  transform: translate(-50%, -50%) scale(1.14);
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(255, 210, 130, 0.55), 0 6px 18px rgba(0, 0, 0, 0.4);
  outline: none;
}

.orbit-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: max-content;
  max-width: 190px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(128, 38, 92, 0.96), rgba(21, 10, 44, 0.98));
  border: 1px solid rgba(255, 215, 130, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 5;
}

.orbit-tooltip strong {
  font-size: 0.86rem;
  color: var(--gold);
}

.orbit-btn:hover .orbit-tooltip,
.orbit-btn:focus-visible .orbit-tooltip {
  opacity: 1;
  transform: translate(-50%, -10px);
}
