:root {
  --ink: #21383a;
  --muted: #617477;
  --paper: #f7fbfb;
  --white: #ffffff;
  --magenta: #d00dad;
  --lavender: #dec0de;
  --mint: #c0ffee;
  --leaf: #bada55;
  --peach: #facade;
  --line: rgba(33, 56, 58, 0.16);
  --shadow: 0 18px 60px rgba(57, 90, 92, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 7%, rgba(192, 255, 238, 0.34), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.3;
  background-image: radial-gradient(rgba(33, 56, 58, 0.16) 0.65px, transparent 0.65px);
  background-size: 12px 12px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 0.6rem;
  background: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(94rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.4rem 0;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.identity-mark {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 47% 53% 42% 58% / 56% 45% 55% 44%;
  color: var(--white);
  background: var(--magenta);
  box-shadow: 3px 3px 0 var(--lavender);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  transform: rotate(-3deg);
}

.identity strong,
.identity small {
  display: block;
}

.identity strong {
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.identity small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.2vw, 2rem);
  font-size: 0.82rem;
  font-weight: 760;
}

.primary-nav :is(a, button) {
  position: relative;
  padding: 0.4rem 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.primary-nav :is(a, button)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 999px;
  content: "";
  background: var(--magenta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.primary-nav :is(a, button):hover::after,
.primary-nav :is(a, button):focus-visible::after {
  transform: scaleX(1);
}

.island-hero {
  position: relative;
  width: min(100%, 106rem);
  margin: 0 auto;
  min-height: min(60rem, calc(100svh - 5rem));
}

.intro-card {
  position: absolute;
  top: clamp(4rem, 9vw, 8rem);
  left: clamp(1.5rem, 5vw, 5rem);
  z-index: 4;
  width: min(30rem, 32vw);
  padding: clamp(1.25rem, 2vw, 2rem);
  border: 1px solid rgba(33, 56, 58, 0.12);
  border-radius: 1.1rem 1.1rem 1.1rem 0.25rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.kicker {
  margin: 0 0 0.65rem;
  color: #8e0b78;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kicker span {
  display: inline-block;
  margin-right: 0.25rem;
  color: var(--magenta);
  animation: tiny-spin 8s linear infinite;
}

@keyframes tiny-spin {
  to { transform: rotate(1turn); }
}

.intro-card h1 {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 4.25vw, 4.9rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.intro-card > p:not(.kicker, .island-hint) {
  max-width: 42rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.05vw, 1.02rem);
  line-height: 1.65;
}

.social-badges,
.island-controls {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  z-index: 5;
  display: flex;
  gap: 0.55rem;
  cursor: default;
}

.social-badges {
  top: 1.25rem;
}

.island-controls {
  bottom: 1.25rem;
}

.social-badges a,
.island-controls button,
.island-controls a {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(33, 56, 58, 0.24);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 2px 3px 0 rgba(222, 192, 222, 0.8);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.social-badges svg {
  width: 1.4rem;
  height: 1.4rem;
}

.social-badges a:nth-child(2) {
  font-size: 1.05rem;
}

.island-controls button,
.island-controls a {
  font-size: 1.2rem;
}

#motion-toggle {
  font-size: 0.9rem;
}

.social-badges a:hover,
.island-controls button:hover,
.island-controls a:hover {
  border-color: var(--magenta);
  background: var(--lavender);
  transform: translateY(-2px) rotate(-3deg);
}

.social-badges a:focus-visible,
.island-controls button:focus-visible,
.island-controls a:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

.island-hint {
  display: flex;
  margin: 1.1rem 0 0;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.hint-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 1px var(--ink);
}

.island-scroll {
  width: 68%;
  margin-left: 32%;
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
}

.island-stage {
  position: relative;
  width: 100%;
  height: min(53rem, calc(100svh - 5rem));
  min-height: 42rem;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 67% 50%, rgba(192, 255, 238, 0.55), transparent 38%),
    linear-gradient(180deg, #f8fcfd, #eff9f8);
  cursor: grab;
}

.island-stage:active {
  cursor: grabbing;
}

#island-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

#island-canvas:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: -3px;
}

.scene-loader {
  position: absolute;
  top: 50%;
  left: 65%;
  z-index: 5;
  display: flex;
  padding: 0.65rem 0.85rem;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  font-weight: 760;
  transform: translate(-50%, -50%);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.scene-loader span {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--lavender);
  border-top-color: var(--magenta);
  border-radius: 50%;
  animation: tiny-spin 0.8s linear infinite;
}

.scene-loader.is-ready {
  visibility: hidden;
  opacity: 0;
}

.scene-loader[hidden] {
  display: none;
}

.scene-label-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.building-sign {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  padding: 0;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  will-change: transform;
}

a.building-sign {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.sign-pin {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--magenta);
  box-shadow: 0 0 0 1px var(--ink), 0 4px 12px rgba(33, 56, 58, 0.25);
  animation: sign-bob 2.8s ease-in-out infinite;
}

#sign-trapdoor .sign-pin { animation-delay: -0.9s; }
#sign-caja .sign-pin { animation-delay: -1.7s; }
#sign-plush .sign-pin { animation-delay: -1.2s; }
#sign-homepage .sign-pin { animation-delay: -0.45s; }
#sign-recursive .sign-pin { animation-delay: -1.25s; }
#sign-two-dozen .sign-pin { animation-delay: -1.8s; background: var(--lavender); }
#sign-youtube .sign-pin { animation-delay: -2.05s; }

.motion-paused .sign-pin {
  animation-play-state: paused;
}

.place-sign .sign-pin {
  color: var(--ink);
  background: var(--mint);
}

.place-sign .sign-copy {
  border-color: rgba(208, 13, 173, 0.34);
  background: rgba(255, 253, 248, 0.95);
}

.island-name-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 0.22rem 0.48rem;
  border: 1px solid rgba(33, 56, 58, 0.2);
  border-radius: 999px;
  color: rgba(33, 56, 58, 0.78);
  background: rgba(255, 253, 248, 0.72);
  box-shadow: 2px 3px 0 rgba(222, 192, 222, 0.42);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.52rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  transform: translate(-50%, -100%);
  white-space: nowrap;
  will-change: transform;
}

@keyframes sign-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.sign-copy {
  display: block;
  min-width: 0;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(33, 56, 58, 0.22);
  border-radius: 0.58rem 0.58rem 0.58rem 0.12rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 14px rgba(33, 56, 58, 0.16);
  backdrop-filter: blur(8px);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sign-copy small,
.sign-copy strong {
  display: block;
}

.sign-copy small {
  margin-bottom: 0.1rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sign-copy strong {
  font-size: 0.72rem;
  white-space: nowrap;
}

.sign-description {
  display: none;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
  width: max-content;
  max-width: min(18rem, calc(100vw - 6rem));
  white-space: normal;
  text-align: left;
}

.building-sign:hover .sign-description,
.building-sign:focus-within .sign-description {
  display: block;
  margin-top: 0.24rem;
}

.building-sign:hover .sign-copy,
.building-sign:focus-within .sign-copy {
  box-shadow: 0 7px 0 var(--lavender), 0 12px 24px rgba(33, 56, 58, 0.18);
}

.building-sign:focus-visible {
  outline: none;
}

.building-sign:focus-visible .sign-pin {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}

.building-sign:hover,
.building-sign:focus-within {
  z-index: 9;
}

.sign-trigger {
  display: flex;
  padding: 0;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.sign-trigger:focus-visible {
  outline: none;
}

.sign-trigger:focus-visible .sign-pin {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

.post-preview {
  position: absolute;
  top: calc(100% - 1px);
  /* Continue the left edge of the label card, past its pin and gap. */
  left: calc(1.65rem + 0.45rem);
  display: none;
  width: min(19rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 0.75rem 0.75rem 0.75rem 0.2rem;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 5px 6px 0 var(--lavender), 0 14px 32px rgba(33, 56, 58, 0.18);
  cursor: default;
  text-align: left;
}

.writing-sign:hover .post-preview,
.writing-sign:focus-within .post-preview {
  display: block;
}

.post-preview-heading,
.dialog-recent h3 {
  margin: 0 0 0.55rem;
  color: #8e0b78;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.post-preview ol,
.dialog-recent ol {
  margin: 0;
  padding-left: 1.15rem;
}

.post-preview li,
.dialog-recent li {
  padding: 0.25rem 0;
  font-size: 0.76rem;
  line-height: 1.35;
}

.post-preview li + li,
.dialog-recent li + li {
  border-top: 1px dashed var(--line);
}

.post-preview a,
.dialog-recent a {
  color: inherit;
  text-decoration-color: var(--magenta);
  text-underline-offset: 0.2em;
}

.post-preview a:hover,
.post-preview a:focus-visible,
.dialog-recent a:hover,
.dialog-recent a:focus-visible {
  color: #8e0b78;
  outline-color: var(--magenta);
}

.post-preview-more,
.dialog-recent-more {
  display: inline-block;
  margin-top: 0.55rem;
  color: #8e0b78 !important;
  font-size: 0.72rem;
  font-weight: 800;
}

.construction-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 0.35rem 0.55rem;
  border: 1px dashed rgba(33, 56, 58, 0.55);
  border-radius: 0.25rem;
  color: var(--ink);
  background: rgba(250, 202, 222, 0.9);
  box-shadow: 2px 3px 0 rgba(33, 56, 58, 0.14);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.53rem;
  font-weight: 780;
  pointer-events: none;
  transform: translate(-50%, -100%) rotate(-2deg);
  transform-origin: 50% 100%;
  will-change: transform;
}

.construction-label span {
  color: var(--magenta);
}

.project-directory {
  width: min(76rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 6rem 0 8rem;
}

.directory-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 30rem);
  gap: 3rem;
  align-items: end;
  margin-bottom: 2.2rem;
}

.directory-heading h2 {
  max-width: 12ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.directory-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.station-board {
  border-top: 2px solid var(--ink);
}

.board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  transition: background 160ms ease;
}

.board-row:hover {
  background: rgba(192, 255, 238, 0.24);
}

.project-select {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  width: 100%;
  padding: 1.45rem 1.2rem 1.45rem 0;
  align-items: center;
  gap: 1rem;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.route-number {
  color: var(--magenta);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 900;
}

.board-copy small,
.board-copy strong,
.board-copy > span {
  display: block;
}

.board-copy small {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 560;
}

.board-copy > span {
  max-width: 44rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.open-mark {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  transition: transform 180ms ease, background 180ms ease;
}

.project-select:hover .open-mark,
.project-select:focus-visible .open-mark {
  color: var(--white);
  background: var(--magenta);
  transform: rotate(9deg) scale(1.08);
}

.project-select:focus-visible {
  outline: 3px solid var(--lavender);
  outline-offset: -3px;
}

.board-links {
  display: flex;
  flex-wrap: wrap;
  padding: 1.2rem 0 1.2rem 1.4rem;
  align-items: center;
  gap: 0.5rem;
}

.board-links a {
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.board-links a:last-child {
  border-color: var(--magenta);
  color: #770064;
}

.board-links a:hover,
.board-links a:focus-visible {
  background: var(--lavender);
  outline: none;
  transform: translateY(-1px);
}

.construction-note {
  display: flex;
  max-width: 42rem;
  margin: 3.2rem 0 0 auto;
  padding: 1rem 1.2rem;
  gap: 0.9rem;
  border: 1px dashed rgba(33, 56, 58, 0.52);
  background: rgba(250, 202, 222, 0.36);
  box-shadow: 5px 5px 0 rgba(222, 192, 222, 0.75);
  transform: rotate(-0.5deg);
}

.hard-hat {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50% 50% 35% 35%;
  color: var(--white);
  background: var(--magenta);
  font-size: 1.2rem;
}

.construction-note strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.construction-note p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

dialog {
  width: min(48rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 1.2rem;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 30px 100px rgba(20, 42, 44, 0.32);
  overflow: auto;
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(43, 66, 67, 0.42);
  backdrop-filter: blur(8px);
}

.dialog-sheet {
  position: relative;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background:
    linear-gradient(rgba(208, 13, 173, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(208, 13, 173, 0.025) 1px, transparent 1px),
    var(--white);
  background-size: 20px 20px;
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  color: var(--white);
  background: var(--magenta);
  outline: 3px solid var(--lavender);
}

.dialog-ticket {
  display: inline-flex;
  padding: 0.5rem 0.65rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px dashed var(--ink);
  background: var(--mint);
  transform: rotate(-1deg);
}

.dialog-ticket > span:first-child {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--magenta);
}

.dialog-ticket small,
.dialog-ticket strong {
  display: block;
}

.dialog-ticket small {
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-ticket strong {
  font-size: 0.72rem;
}

.dialog-type {
  margin: 1.8rem 0 0.4rem;
  color: var(--magenta);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dialog-sheet h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.dialog-lede {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.dialog-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.dialog-details h3 {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dialog-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.dialog-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1.6rem 0 0;
  padding: 0.9rem 1rem;
  gap: 1rem;
  border-radius: 0.55rem;
  background: rgba(222, 192, 222, 0.33);
}

.dialog-facts div {
  min-width: 0;
}

.dialog-facts dt {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58rem;
  text-transform: uppercase;
}

.dialog-facts dd {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  font-weight: 750;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.dialog-actions a {
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 820;
  text-decoration: none;
}

.dialog-actions a:last-child {
  color: var(--white);
  background: var(--magenta);
}

.dialog-actions a:hover,
.dialog-actions a:focus-visible {
  box-shadow: 0 4px 0 var(--lavender);
  outline: none;
  transform: translateY(-2px);
}

.dialog-recent {
  margin-top: 1.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(192, 255, 238, 0.22);
}

.dialog-shelf {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line);
}

.dialog-shelf h3 {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shelf-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shelf-entries button {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--white);
  font-size: 0.8rem;
  cursor: pointer;
}

.shelf-entries button:hover,
.shelf-entries button:focus-visible {
  background: var(--lavender);
  outline: 2px solid var(--magenta);
  outline-offset: 2px;
}

body.dialog-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .island-hero {
    padding-top: 0.5rem;
  }

  .intro-card {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% - 3rem);
    margin: 1rem auto 0;
  }

  .intro-card h1 {
    max-width: 15ch;
    font-size: clamp(2.5rem, 8vw, 4.4rem);
  }

  .island-scroll {
    width: 100%;
    margin-left: 0;
    overflow: hidden;
  }

  .island-stage {
    height: 39rem;
    min-height: 39rem;
  }

  .construction-label {
    display: none;
  }

  .directory-heading {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    width: calc(100% - 2rem);
    align-items: flex-start;
  }

  .identity small {
    display: none;
  }

  .primary-nav {
    gap: 0.8rem;
    font-size: 0.7rem;
  }

  .primary-nav a:nth-child(2) {
    max-width: 5.5rem;
    line-height: 1.15;
  }

  .intro-card {
    width: calc(100% - 2rem);
    margin-top: 0.5rem;
  }

  .island-stage {
    height: 33rem;
    min-height: 33rem;
  }

  .scene-loader {
    left: 50%;
  }

  .building-sign,
  .construction-label,
  .island-name-label {
    --label-scale: 0.88;
  }

    .project-directory {
    width: calc(100% - 2rem);
    padding: 5rem 0 6rem;
  }

  .directory-heading h2 {
    font-size: 3.35rem;
  }

  .board-row {
    grid-template-columns: 1fr;
  }

  .project-select {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    padding-right: 0;
  }

  .board-links {
    padding: 0 0 1.15rem 3rem;
  }

  .dialog-details,
  .dialog-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    gap: 0.8rem;
  }

  .primary-nav {
    width: 100%;
    justify-content: space-between;
  }

  .primary-nav a:nth-child(2) {
    max-width: none;
  }

  .intro-card h1 {
    font-size: 2.65rem;
  }

    .sign-copy {
    padding: 0.34rem 0.5rem;
  }

  .sign-copy small {
    display: none;
  }

  .building-sign {
    --label-scale: 0.76;
  }

  .island-name-label {
    --label-scale: 0.72;
  }

  .construction-label {
    display: none;
  }

  .board-copy > span {
    display: none;
  }

  .board-links {
    padding-left: 3rem;
  }

  dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
