[hidden] { display: none !important; }

#beeChapter {
  position: absolute;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  background: #090b10;
}

#beeFrame {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  container-type: inline-size;
  overflow: hidden;
}

#beeScene, .bee-film, #uvLayer, #uvGarden, #flowerTargets {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#beeScene, .bee-film, #uvGarden { object-fit: cover; }
.bee-film { background: #090b10; }
#uvLayer { z-index: 3; touch-action: none; cursor: crosshair; }
#uvGarden { transition: filter 700ms ease; }
#uvBeam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #04091b65;
}

#uvBeam.aiming {
  background: radial-gradient(
    circle var(--beam-radius) at var(--x) var(--y),
    #a8a1ff36 0%, #a8a1ff22 76%, #04091b65 100%
  );
}

.bee-action, .bee-hotspot {
  padding: .65em 1em;
  background: #08090fee;
  color: #f5f1e5;
  font: inherit;
  border: 1px solid #f5f1e5;
  cursor: pointer;
}

.bee-action:hover, .bee-hotspot:hover { background: #272238; }
#beeChapter button:focus-visible, #dialog button:focus-visible {
  outline: 2px solid #e4dcff;
  outline-offset: 4px;
}

#uvHud h2 { font-weight: normal; }
#skipFilm {
  position: absolute;
  bottom: max(6px, 2cqh);
  right: max(6px, 2cqw);
  z-index: 25;
}

#goggles {
  z-index: 3;
  position: absolute;
  left: 46%;
  top: 57%;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  font-size: clamp(.75rem, 2cqw, 1rem);
}

#goggles::after {
  content: '';
  position: absolute;
  left: 26%;
  top: 100%;
  border: 7px solid transparent;
  border-top-color: #f5f1e5;
}

.uv-flower {
  position: absolute;
  width: 12%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #ece9ff;
  cursor: inherit;
}

.uv-flower img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  transform: translate(var(--flower-origin-x, -50%), var(--flower-origin-y));
  opacity: var(--reveal, 0);
  filter: drop-shadow(0 0 10px #ad89fe);
  pointer-events: none;
}

/* Align each flower centre independently of the PNG's transparent padding. */
.uv-flower[data-flower="purple"] { --flower-origin-x: -47.8%; --flower-origin-y: -45%; }
.uv-flower[data-flower="pink"] { --flower-origin-x: -52.2%; --flower-origin-y: -45.2%; }
.uv-flower[data-flower="cluster"] { --flower-origin-x: -48.1%; --flower-origin-y: -41.9%; }
.uv-flower[data-flower="cluster"] img { width: 80%; }
.uv-flower[data-flower="white"] { --flower-origin-x: -50.5%; --flower-origin-y: -43.4%; }

#uvHud {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  z-index: 1;
  background: #090b18ed;
  border: 1px solid #9e90c1;
  padding: .65rem .85rem;
  line-height: 1.4;
  font-size: clamp(.75rem, 1.4cqw, 1rem);
}

#uvStatus { margin: .35em 0; }



@container (max-height: 490px) {
  #uvHud { top: 6px; padding: .25rem .5rem; }
  #uvHud h2 { font-size: 1rem; }
  #uvStatus { margin: .15em 0; }
}

#hotDoor span { color: #fff; }
#hotDoor:focus-visible span { opacity: 1; }

#map {
  background-color: #090b10;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity .24s ease;
}






#languageToggle {
  position: absolute;
  z-index: 35;
  top: max(6px, 2cqh);
  right: max(6px, 2cqw);
  padding: .35em .65em;
  border: 1px solid #d8d1bd;
  color: #faf4e7;
  background: #090b10e8;
  font: clamp(.75rem, 1.4cqw, 1rem) Georgia, 'Microsoft YaHei', serif;
  cursor: pointer;
}

#languageToggle:hover { background: #322b24; }
#languageToggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#close { text-transform: uppercase; }
:lang(zh-CN) #dtext { font-family: 'Noto Serif CJK SC', 'Songti SC', SimSun, serif; }
:lang(zh-CN) #close { letter-spacing: .08em; }

#uvLayer.ending { cursor: default; }

.ending-glow img {
  animation: nectar-glow .6s ease-out both;
}

@keyframes nectar-glow {
  0% { filter: brightness(1) drop-shadow(0 0 4px #b292ff); }
  45% { filter: brightness(1.75) drop-shadow(0 0 16px #fff0b6); }
  100% { filter: brightness(1.2) drop-shadow(0 0 10px #e0bcff); }
}

#endingBee {
  position: absolute;
  z-index: 3;
  width: 9%;
  pointer-events: none;
}

#endingMap {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  background: #141414;
}

#endingMap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#foldEndingMap {
  position: absolute;
  right: max(6px, 2cqw);
  bottom: max(6px, 2cqh);
  z-index: 25;
}

#endingScreen {
  position: absolute;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: 10%;
  background: #000;
  color: #eee;
  text-align: center;
}

#endingQuote {
  font-size: clamp(16px, 2.5cqw, 34px);
  line-height: 1.5;
  animation: ending-quote 1.6s ease both;
}

@keyframes ending-quote {
  from { opacity: 0; }
  to { opacity: 1; }
}

#endingReplay {
  position: absolute;
  bottom: 8%;
}

#fieldGuide {
  grid-row: 1;
  display: block;
  width: min(100%, 55cqh);
  max-height: 24cqh;
  object-fit: contain;
  margin: 0 auto 1em;
}

#dialog:has(#fieldGuide:not([hidden])) { padding-top: max(24px, 4cqh); }

