:root {
  color-scheme: dark;
  background: #020101;
  color: #eee8e3;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 1px solid #ffd160; outline-offset: 4px; }

.bloom-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
}

.bloom-stage {
  position: relative;
  width: min(100%, 100svh);
  aspect-ratio: 1;
}

.bloom-name {
  z-index: 1;
  position: absolute;
  top: clamp(.8rem, 4.5%, 2.4rem);
  inset-inline: 0;
  margin: 0;
  text-align: center;
  color: #f6f2ee;
  font-size: clamp(1.2rem, 3.45vmin, 1.85rem);
  font-weight: 500;
  letter-spacing: -.035em;
  text-shadow: 0 1px .65rem #020101;
  pointer-events: none;
}

.bloom-stage img, .bloom-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.bloom-stage canvas { cursor: grab; touch-action: pan-y; }
.bloom-stage canvas:active { cursor: grabbing; }
.bloom-stage canvas:focus-visible { outline-offset: -2px; }
.bloom-stage[data-ready] img { display: none; }

.bloom-links {
  position: absolute;
  top: clamp(3rem, 12%, 5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(.8rem, 2.5vw, 1.75rem);
  align-items: center;
  font-size: .8125rem;
  line-height: 1.2;
}

.bloom-links a {
  text-decoration: none;
  color: #d9ccc2;
  white-space: nowrap;
}

.bloom-links a:hover, .bloom-links a:focus-visible { color: #fff4de; }

.bloom-sr,
.bloom-stage[data-ready] .bloom-links:not([data-anchored]):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.bloom-links[data-anchored] {
  inset: 0;
  transform: none;
  display: block;
  pointer-events: none;
}

.bloom-links[data-anchored] a {
  position: absolute;
  top: var(--label-y, 0);
  left: var(--label-x, 0);
  transform: translate(-50%, -100%);
  padding: .55rem .45rem;
  pointer-events: auto;
  border-radius: .2rem;
  color: #ffe9b9;
  background: #1c120bd9;
  text-shadow: 0 0 .65rem #ff942e7a;
  animation: bloom-link-reveal 180ms ease-out both;
}

.bloom-links[data-anchored] a::after {
  content: "";
  position: absolute;
  inset: 100% auto auto 50%;
  width: 1px;
  height: var(--guide-length, 0);
  transform: rotate(var(--guide-angle, 0rad));
  transform-origin: 50% 0;
  background: #e4ad546e;
  pointer-events: none;
}

.bloom-links[data-anchored] a:hover, .bloom-links[data-anchored] a:focus-visible {
  background: #33210f;
  color: #fff4de;
}

@keyframes bloom-link-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bloom-links[data-anchored] a { animation: none; }
}

@media (max-width: 359px) {
  .bloom-links { gap: .65rem; font-size: .75rem; }
  .bloom-links[data-anchored] a { padding-inline: .3rem; }
}
