/* Structure shared by the prototypes. Each world owns its own colour and type. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ground); color: var(--ink); }
body { -webkit-font-smoothing: antialiased; }

.wedge {
  position: fixed;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.label {
  position: absolute;
  max-width: 44vw;
}
/* Positions go by seat, not by wedge: hub.js sets data-slot from SLOT. */
[data-slot=left] .label { left: clamp(18px, 3.4vw, 56px); top: clamp(18px, 4.4vh, 56px); }
[data-slot=right] .label { right: clamp(18px, 3.4vw, 56px); top: clamp(18px, 4.4vh, 56px); text-align: right; }
[data-slot=bottom] .label {
  left: 50%;
  bottom: clamp(46px, 8vh, 84px);
  transform: translateX(-50%);
  text-align: center;
  max-width: 88vw;
  width: max-content;
}
.label h2 { margin: 0; font-weight: 400; }
.label p { margin: 0; }
.wedge:focus-visible .label h2 { text-decoration: underline; text-underline-offset: 0.14em; text-decoration-thickness: 0.06em; }

.mark {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--mark-w, min(44vmin, 62vw));
  aspect-ratio: 1 / 1;
  pointer-events: none;
  z-index: 5;
}
.mark svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* The ring of koi circles the skull, about the mark's own centre. */
#koi-a, #koi-b { transform-origin: 837.1px 837.1px; animation: swim 90s linear infinite; }
@keyframes swim { to { transform: rotate(360deg); } }
#koi-a, #koi-b, #skull, #star, #face { transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1); }
[data-active=readings] :is(#koi-a, #koi-b, #star) { opacity: 0.18; }
[data-active=garden] :is(#skull, #face, #star) { opacity: 0.18; }
[data-active=work] :is(#koi-a, #koi-b, #skull, #face) { opacity: 0.18; }

/* His name, the hub's h1, signed at the foot of the page on the right like the plate's own maker, where it clears
   the names, their taglines and the ring at every size. It belongs to the room and takes no clicks. */
.name {
  position: fixed;
  /* A phone's rounded corner cut into the name at 16px. */
  right: clamp(28px, 2.4vw, 36px);
  bottom: clamp(24px, 2.4vw, 36px);
  margin: 0;
  white-space: nowrap;
  z-index: 6;
  pointer-events: none;
  font-weight: 400;
}

/* Prototype chrome only: leaves with the prototypes. */
.worlds {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  display: flex;
  gap: 2px;
  font: 500 12px/1 ui-sans-serif, system-ui, sans-serif;
  background: #111;
  border-radius: 8px;
  padding: 3px;
}
.worlds a { color: #bbb; text-decoration: none; padding: 7px 8px; border-radius: 5px; }
.worlds a[aria-current] { background: #fff; color: #111; }
.worlds a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.worlds-settings { font: inherit; color: #bbb; background: none; border: 0; border-left: 1px solid #333; margin-left: 3px; padding: 7px 9px; border-radius: 5px; cursor: pointer; }
.worlds-settings[aria-pressed=true] { color: #fff; }
.worlds-settings:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

@media (max-width: 600px) {
  .worlds { right: auto; left: 50%; transform: translateX(-50%); bottom: 6px; white-space: nowrap; font-size: 10px; }
  .worlds a { padding: 6px 8px; }
  .worlds span { display: none; }
  [data-slot=bottom] .label { bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  #koi-a, #koi-b { animation: none; }
}
