:root { color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: #06262e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  background: #06262e;
}

#pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

#pano:active { cursor: grabbing; }

#hint {
  position: absolute;
  left: 50%;
  bottom: 30%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0,0,0,0.35);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  transition: opacity 0.6s ease;
}

#hint.hidden { opacity: 0; }

#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 0.6rem) 0.9rem 1.4rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.38), rgba(0,0,0,0));
  pointer-events: none;
}

.brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  letter-spacing: 0.01em;
}

#shuffle {
  pointer-events: auto;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#shuffle:active { background: rgba(255,255,255,0.32); }

#caption {
  position: fixed;
  left: 0.9rem;
  right: 0.9rem;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 7.6rem);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  pointer-events: none;
}

#caption .sub {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 0.1rem;
}

#sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 0 calc(env(safe-area-inset-bottom, 0px) + 0.7rem);
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.25) 70%, rgba(0,0,0,0));
}

#chips {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.1rem 0.9rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

#chips::-webkit-scrollbar { display: none; }

.chip {
  scroll-snap-align: start;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.chip.active {
  background: #ff7849;
  border-color: #ff7849;
  color: #1a0d05;
}

.chip .emoji { font-size: 1.05rem; }
