/*
 * The bay scene.
 *
 * The panorama is one flat illustration with the animals painted into it, so
 * each hotspot is a transparent target sitting over its own animal. Positions
 * are percentages, which hold at every width.
 *
 * On a phone the panorama stays at its own aspect ratio and pans sideways
 * rather than shrinking to a stamp. That is an interim: when the vertical
 * recomposition arrives it gets its own coordinate set and this rule goes away.
 */
.bay {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 30px 60px -30px rgba(28, 46, 74, 0.45);
}

.bay__art { display: block; width: 100%; height: auto; }

.bay__spots { position: absolute; inset: 0; }

.spot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(var(--tap), 7vw, 92px);
  height: clamp(var(--tap), 7vw, 92px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: opacity 0.6s ease, transform 0.2s ease;
}

/* The ring only appears on hover or focus so it never fights the painting. */
.spot::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2.5px solid var(--cream);
  box-shadow: 0 0 0 2px rgba(28, 46, 74, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.spot:hover::before, .spot:focus-visible::before { opacity: 1; }
.spot:hover { transform: translate(-50%, -50%) scale(1.06); }

/* Away and hidden characters keep a faint marker where they would be. Tapping
   it opens the chat and they explain where they went - a better lesson than
   removing them. */
.spot[data-presence='away']::before,
.spot[data-presence='hidden']::before {
  opacity: 0.55;
  border-style: dashed;
}
.spot[data-presence='away']::after,
.spot[data-presence='hidden']::after {
  content: '';
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: rgba(245, 239, 228, 0.5);
}

/* Reserved for a looping, muted character clip dropped in later. */
.spot__media { position: absolute; inset: -40%; pointer-events: none; }
.spot__media > video, .spot__media > img { width: 100%; height: 100%; object-fit: contain; }

.spot__tag {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(245, 239, 228, 0.94);
  color: var(--navy);
  font-size: 14px;
  line-height: 1.3;
  padding: 7px 12px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  max-width: 44vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spot:hover .spot__tag, .spot:focus-visible .spot__tag { opacity: 1; }

.season {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 2px;
  background: rgba(245, 239, 228, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 4px;
  color: var(--navy);
}
.season__button { padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; min-height: 40px; }
.season__button[aria-pressed='true'] { background: var(--navy); color: var(--cream); }

.bay__strip {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 17px;
  opacity: 0.85;
}

@media (max-width: 760px) {
  .bay {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  /* Hold the painting at a readable size and let the bay pan under the thumb. */
  .bay__art { width: 200%; max-width: none; }
  .bay__spots { width: 200%; }
  .season { position: sticky; left: 16px; }
  .spot__tag { max-width: 60vw; }
}
