@font-face {
  font-family: "VT323";
  src: url("assets/fonts/VT323-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --chrome-height: 38px;
  --accent: #ff8fc7;
  --accent-rgb: 255, 143, 199;
  --background: #000000;
  --content-font: "VT323", monospace;
  --chrome-font: "VT323", monospace;
  --border: 1px solid var(--accent);
  --rpg-border: 4px solid var(--accent);
  --control-border: 3px solid var(--accent);
  --shadow: 3px 3px 0 var(--accent);
}

body[data-theme="paper"] {
  --accent: #f5f1e8;
  --accent-rgb: 245, 241, 232;
}

body[data-theme="blue"] {
  --accent: #8fa8ff;
  --accent-rgb: 143, 168, 255;
}

body[data-theme="acid"] {
  --accent: #c8ff5a;
  --accent-rgb: 200, 255, 90;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: var(--background);
  color-scheme: dark;
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: var(--background);
  color: var(--accent);
  font-family: var(--content-font);
  font-size: 20px;
  line-height: 1.25;
}

body[data-mode="one-page"] {
  overflow: hidden;
}

button,
a,
input {
  font: inherit;
}

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

button {
  color: inherit;
  border-radius: 0;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 5px;
  left: 8px;
  transform: translateY(-180%);
  padding: 4px 9px;
  border: var(--control-border);
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
}

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

.app-chrome {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  height: var(--chrome-height);
  padding: 0 12px;
  gap: 6px;
  border-bottom: var(--border);
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
  user-select: none;
}

.identity,
.menu-trigger {
  height: 27px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 27px;
}

.identity {
  display: flex;
  align-items: center;
  height: 27px;
  padding-left: 0;
  padding-right: 6px;
  gap: 5px;
  font-size: 20px;
  white-space: nowrap;
}

.identity:hover,
.identity:focus-visible,
.menu-trigger:hover,
.menu-trigger[aria-expanded="true"] {
  background: var(--accent);
  color: var(--background);
  outline: 0;
}

.identity-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  transform-origin: 50% 50%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 19px;
  line-height: 1;
  animation: identity-spin 4.5s linear infinite;
}

@keyframes identity-spin {
  to { transform: rotate(360deg); }
}

.menu-group {
  position: relative;
  height: 27px;
}

.menu-trigger {
  width: 48px;
  font-size: 18px;
  text-align: center;
}

.chrome-contact {
  display: grid;
  height: 27px;
  margin-left: auto;
  padding: 0 8px;
  place-items: center;
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 18px;
  line-height: 27px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chrome-contact:hover,
.chrome-contact:focus-visible {
  background: var(--accent);
  color: var(--background);
  outline: 0;
}

body[data-mode="one-page"] .chrome-contact {
  display: none;
}

.menu-popover {
  position: absolute;
  z-index: 1010;
  top: 32px;
  left: 0;
  width: 168px;
  padding: 4px 0;
  border: var(--border);
  background: var(--background);
  box-shadow: 2px 2px 0 var(--accent);
}

.menu-popover button {
  display: block;
  width: 100%;
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 18px;
  text-align: left;
  cursor: pointer;
}

.menu-popover button:hover,
.menu-popover button:focus-visible {
  background: var(--accent);
  color: var(--background);
  outline: 0;
}

.game-shell {
  position: fixed;
  inset: var(--chrome-height) 0 0;
  overflow: hidden;
  background: var(--background);
}

#world {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  touch-action: none;
}

#world:focus,
#world:focus-visible {
  outline: none;
}

.world-interactions {
  position: absolute;
  z-index: 20;
  inset: 0;
  pointer-events: none;
}

.entry-glyph {
  position: fixed;
  z-index: 24;
  top: 64%;
  left: 50%;
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 56px;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transform-origin: center;
  text-shadow: 5px 7px 0 rgba(0, 0, 0, .58);
}

.entry-glyph.dropping {
  animation: glyph-drop 1.4s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes glyph-drop {
  0% { transform: translate(-50%, -58vh) scale(3.8) rotate(-12deg); }
  62% { transform: translate(-50%, 8px) scale(1.22) rotate(5deg); }
  78% { transform: translate(-50%, -18px) scale(.94) rotate(-3deg); }
  90% { transform: translate(-50%, 4px) scale(1.04) rotate(1deg); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .entry-glyph.dropping {
    animation: none;
  }
}

.world-hotspot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  width: auto;
  height: auto;
  padding: 0;
  transform: translate(-50%, -100%);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  animation: hotspot-float .58s steps(2, end) infinite;
  filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .58));
}

.world-hotspot kbd,
.keycap {
  display: inline-block;
  min-width: 24px;
  padding: 2px 6px 1px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: #000;
  color: inherit;
  font: inherit;
  line-height: .9;
  text-align: center;
  box-shadow: 2px 2px 0 currentColor;
}

.world-hotspot::after {
  content: none;
}

.world-hotspot:hover,
.world-hotspot:focus-visible {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.world-hotspot:hover::after,
.world-hotspot:focus-visible::after {
  background: var(--accent);
}

.project-world-label {
  position: absolute;
  z-index: 18;
  max-width: 250px;
  padding: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  color: var(--accent);
  font-family: "VT323", monospace;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.ascii-mountain {
  margin: 0;
  overflow: auto;
  color: var(--accent);
  font-family: "VT323", monospace;
  font-size: clamp(15px, 2.1vw, 23px);
  line-height: 1;
  white-space: pre;
}

.interaction-prompt {
  display: none;
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  padding: 4px 9px;
  border: var(--control-border);
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.flappy-close {
  position: fixed;
  z-index: 90;
  top: calc(var(--chrome-height) + 12px);
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: var(--control-border);
  background: #000;
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 32px;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(var(--accent-rgb), .55);
  cursor: pointer;
}

.flappy-close:hover,
.flappy-close:focus-visible {
  background: var(--accent);
  color: #000;
  outline: 0;
}

.instrument-recorder {
  position: fixed;
  z-index: 75;
  top: calc(50px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px 6px;
  border: 2px solid var(--accent);
  background: #000;
  color: var(--accent);
  font: 22px/1 var(--chrome-font);
  letter-spacing: .03em;
  box-shadow: 5px 5px 0 var(--shadow);
  white-space: nowrap;
  pointer-events: none;
}

.instrument-recorder::before {
  content: "●";
  display: inline-block;
  margin-right: 8px;
  animation: recorder-blink .75s steps(1, end) infinite;
}

@keyframes recorder-blink {
  50% { opacity: .15; }
}

@keyframes hotspot-float {
  50% { transform: translate(-50%, calc(-100% - 4px)); }
}

.mobile-prompt {
  display: none;
}

.experience-overlay {
  position: fixed;
  z-index: 900;
  inset: var(--chrome-height) 0 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: transparent;
  backdrop-filter: none;
}

.game-shell {
  transition: filter 180ms ease;
}

body.choosing .game-shell {
  filter: grayscale(.58) saturate(.45) brightness(.82);
}

.controls-tutorial {
  position: fixed;
  z-index: 1200;
  inset: var(--chrome-height) 0 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(0, 0, 0, .76);
}

.controls-tutorial[hidden] {
  display: none;
}

.controls-tutorial-card {
  width: min(600px, calc(100vw - 32px));
  padding: 28px;
  border: var(--rpg-border);
  background: var(--background);
  color: var(--accent);
  font-family: var(--content-font);
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.2;
}

.controls-tutorial-card h2 {
  margin: 4px 0 24px;
  font-family: var(--chrome-font);
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 400;
  line-height: .9;
}

.controls-tutorial-card p {
  margin: 18px 0 0;
}

.tutorial-route {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 28px;
}

.tutorial-glyph {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: var(--control-border);
  background: var(--accent);
  color: var(--background);
  font-size: 30px;
}

.tutorial-key-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-family: var(--chrome-font);
  font-size: 19px;
}

.tutorial-movement {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tutorial-movement .keycap {
  min-width: 32px;
  padding-inline: 5px;
  text-align: center;
}

.tutorial-or {
  margin: 0 3px;
}

.tutorial-instruction > p {
  margin-top: 12px;
}

.tutorial-secret {
  padding-top: 18px;
  border-top: 1px solid currentColor;
  font-style: normal;
}

.tutorial-enter {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border: var(--control-border);
  background: var(--accent);
  color: var(--background);
  font-family: var(--chrome-font);
  font-size: 24px;
  cursor: pointer;
}

.tutorial-enter:hover,
.tutorial-enter:focus-visible {
  background: var(--background);
  color: var(--accent);
  outline: 0;
}

.tutorial-mobile {
  display: none;
}

.tutorial-glyph-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin: 0 4px;
  place-items: center;
  vertical-align: middle;
  border: var(--control-border);
  border-radius: 50%;
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 25px;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(var(--accent-rgb), .55);
}

.guestbook-modal {
  position: fixed;
  z-index: 1250;
  inset: var(--chrome-height) 0 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(0, 0, 0, .76);
}

.guestbook-modal[hidden] {
  display: none;
}

.guestbook-card {
  display: grid;
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - var(--chrome-height) - 48px);
  grid-template-rows: auto auto minmax(90px, 1fr) auto;
  border: var(--rpg-border);
  background: var(--background);
  color: var(--accent);
  font-family: var(--content-font);
  overflow: hidden;
}

.guestbook-card > header {
  display: grid;
  min-height: 48px;
  grid-template-columns: 1fr 48px;
  align-items: center;
  border-bottom: var(--control-border);
}

.guestbook-card h2 {
  margin: 0;
  padding: 8px 14px;
  font-family: var(--chrome-font);
  font-size: 30px;
  font-weight: 400;
}

.guestbook-card > header button {
  align-self: stretch;
  padding: 0;
  border: 0;
  border-left: var(--control-border);
  background: var(--background);
  color: var(--accent);
  font-size: 30px;
  cursor: pointer;
}

.guestbook-card > header button:hover,
.guestbook-card > header button:focus-visible {
  background: var(--accent);
  color: var(--background);
  outline: 0;
}

.guestbook-count {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid currentColor;
  font-size: 18px;
}

.guestbook-entries {
  margin: 0;
  padding: 12px 18px 12px 42px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 22px;
}

.guestbook-entries li + li {
  margin-top: 8px;
}

.guestbook-entries time {
  display: block;
  font-size: 15px;
  opacity: .7;
}

.guestbook-form {
  padding: 14px;
  border-top: var(--control-border);
}

.guestbook-form label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--chrome-font);
  font-size: 18px;
}

.guestbook-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.guestbook-form input,
.guestbook-form button {
  min-height: 44px;
  border: var(--control-border);
  background: var(--background);
  color: var(--accent);
  font: inherit;
}

.guestbook-form input {
  min-width: 0;
  padding: 7px 10px;
}

.guestbook-form button {
  min-width: 86px;
  padding: 5px 14px;
  font-family: var(--chrome-font);
  cursor: pointer;
}

.guestbook-form button:hover,
.guestbook-form button:focus-visible {
  background: var(--accent);
  color: var(--background);
  outline: 0;
}

.guestbook-status {
  min-height: 1.2em;
  margin: 7px 0 0;
  font-size: 16px;
}

.experience-card {
  width: min(440px, calc(100vw - 48px));
  padding: 22px;
  border: var(--rpg-border);
  background: var(--background);
  box-shadow: none;
}

.experience-card .eyebrow {
  margin: 0 0 4px;
  font-family: var(--chrome-font);
  font-size: 15px;
}

.experience-card h1 {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 400;
  line-height: .9;
  text-transform: none;
}

.experience-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.experience-option {
  position: relative;
  display: flex;
  min-height: 72px;
  padding: 10px;
  align-items: center;
  justify-content: center;
  border: var(--control-border);
  background: var(--background);
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.experience-option.recommended {
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: transparent;
  background: var(--accent);
  color: var(--background);
}

.experience-option:hover,
.experience-option:focus-visible {
  background: var(--accent);
  color: var(--background);
  box-shadow: none;
}

.option-name {
  align-self: center;
  font-family: var(--chrome-font);
  font-size: 24px;
  line-height: .85;
  text-transform: none;
}

.recommended-label {
  align-self: center;
  padding: 0;
  border: 0;
  font-family: var(--chrome-font);
  font-size: 24px;
  line-height: .85;
  text-transform: none;
}

.character-picker {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.character-picker legend {
  margin-bottom: 5px;
  padding: 0;
  font-family: var(--chrome-font);
  font-size: 15px;
  text-transform: none;
}

.glyph-options {
  display: flex;
  gap: 5px;
}

.glyph-options button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: var(--control-border);
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.glyph-options button:hover,
.glyph-options button.selected {
  background: var(--accent);
  color: var(--background);
}

.dialogue {
  position: fixed;
  z-index: 850;
  inset: var(--chrome-height) 0 0;
  pointer-events: none;
}

.dialogue.encounter {
  background: transparent;
  backdrop-filter: none;
}

.encounter-figure {
  position: absolute;
  z-index: 0;
  top: 10%;
  left: 50%;
  display: none !important;
  width: min(310px, 56vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  place-items: center;
}

.dialogue.encounter .encounter-figure {
  display: none !important;
  animation: none;
}

@keyframes encounter-arrive {
  from { opacity: 0; transform: translate(-50%, 35px) scale(.72); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.encounter-halo {
  position: absolute;
  inset: 4%;
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: none;
}

.encounter-halo::before,
.encounter-halo::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.encounter-halo::before {
  width: 140%;
  height: 1px;
}

.encounter-halo::after {
  width: 1px;
  height: 140%;
}

.encounter-glyph {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36%;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50% 50% 44% 44%;
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: clamp(64px, 12vw, 108px);
  line-height: 1;
}

.dialogue-box {
  position: absolute;
  z-index: 2;
  right: max(5vw, 18px);
  bottom: max(62px, calc(env(safe-area-inset-bottom) + 52px));
  left: max(5vw, 18px);
  min-height: 168px;
  padding: 17px 20px 19px;
  border: var(--rpg-border);
  background: var(--background);
  color: var(--accent);
  box-shadow: none;
  font-family: var(--content-font);
  pointer-events: auto;
}

.dialogue-speaker {
  position: absolute;
  top: -16px;
  left: 14px;
  padding: 2px 8px;
  border: var(--control-border);
  background: var(--background);
  font-family: var(--chrome-font);
  font-size: 18px;
  line-height: 1;
}

.dialogue-copy {
  max-width: 980px;
  min-height: 50px;
  font-size: clamp(22px, 2.3vw, 29px);
  line-height: 1.2;
}

.dialogue-copy p {
  margin: 0;
}

.dialogue-copy a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dialogue-copy a:hover {
  background: var(--accent);
  color: var(--background);
}

.dialogue-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px clamp(30px, 8vw, 110px);
  margin-top: 20px;
  padding: 2px clamp(4px, 3vw, 38px) 8px;
}

.dialogue-choices button {
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: clamp(19px, 2.1vw, 25px);
  text-align: left;
  text-decoration: none;
  text-underline-offset: 5px;
  pointer-events: auto;
}

.dialogue-choices button::before {
  content: ">";
  display: inline-block;
  width: 18px;
}

.dialogue-choices[data-has-choices="true"]::after {
  content: "X leave";
  grid-column: 2;
  justify-self: end;
  align-self: end;
  color: var(--accent);
  font-size: 16px;
  opacity: .72;
}

.dialogue-choices button:hover,
.dialogue-choices button:focus-visible,
.dialogue-choices button.selected {
  background: transparent;
  color: var(--accent);
  outline: 0;
  text-decoration: underline;
}

.dialogue-key {
  position: absolute;
  right: 12px;
  bottom: 7px;
  min-width: 70px;
  min-height: 28px;
  padding: 0 5px;
  border: var(--control-border);
  background: var(--background);
  color: var(--accent);
  font-family: var(--chrome-font);
  font-size: 15px;
  opacity: 1;
  cursor: pointer;
}

.dialogue-key:hover,
.dialogue-key:focus-visible {
  background: var(--accent);
  color: var(--background);
  opacity: 1;
}

.instrument-keyboard {
  display: none;
}

.option-window {
  position: fixed;
  z-index: 1300;
  top: 72px;
  left: 50%;
  width: min(330px, calc(100vw - 32px));
  border: var(--border);
  background: var(--background);
  color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  font-family: var(--chrome-font);
}

.option-window > header {
  display: grid;
  height: 28px;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  border-bottom: var(--border);
}

.option-window > header::before {
  content: "";
}

.option-window > header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  text-align: center;
}

.option-window > header button {
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-left: var(--border);
  background: var(--background);
  color: var(--accent);
  font-size: 25px;
  line-height: 24px;
  cursor: pointer;
}

.option-window > header button:hover {
  background: var(--accent);
  color: var(--background);
}

.window-content {
  padding: 14px;
}

.window-content > p {
  margin: 0 0 8px;
  font-size: 17px;
}

.swatches,
.font-options {
  display: grid;
  gap: 6px;
}

.swatches {
  grid-template-columns: 1fr 1fr;
}

.swatches button,
.font-options button {
  min-height: 40px;
  padding: 6px 9px;
  border: var(--control-border);
  background: var(--background);
  color: var(--accent);
  text-align: left;
  cursor: pointer;
}

.swatches button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--chrome-font);
}

.swatches button span {
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent);
  background: var(--swatch);
}

.swatches button:hover,
.font-options button:hover,
.swatches button.selected,
.font-options button.selected {
  background: var(--accent);
  color: var(--background);
}

.one-page {
  position: relative;
  display: grid;
  height: 100dvh;
  min-height: 0;
  padding: calc(var(--chrome-height) + 28px) clamp(20px, 4vw, 62px) 16px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 28%, rgba(var(--accent-rgb), .05), transparent 26%),
    var(--background);
  color: var(--accent);
  font-family: var(--content-font);
}

.one-page > *:not(.one-page-stars) {
  position: relative;
  z-index: 2;
}

.one-page-stars {
  position: fixed;
  z-index: 0;
  inset: var(--chrome-height) 0 0;
  pointer-events: none;
  opacity: .55;
}

.one-page-stars span {
  position: absolute;
  font-family: var(--chrome-font);
  animation: star-breathe 5s ease-in-out infinite alternate;
}

@keyframes star-breathe {
  from { opacity: .18; transform: scale(.8) rotate(-8deg); }
  to { opacity: .75; transform: scale(1.12) rotate(8deg); }
}

.page-heading {
  display: flex;
  width: min(1220px, 100%);
  margin: 0 auto 26px;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.page-heading h1,
.page-contact {
  margin: 0;
  font-family: var(--content-font);
  font-size: clamp(56px, min(9vw, 14vh), 126px);
  font-weight: 400;
  line-height: .78;
  white-space: nowrap;
}

.page-contact {
  display: block;
  color: var(--accent);
  text-align: right;
  text-decoration: underline;
  text-decoration-thickness: .04em;
  text-underline-offset: .09em;
  animation: contact-blink 1.5s step-end infinite;
}

.page-contact:hover,
.page-contact:focus-visible {
  text-decoration-thickness: .08em;
}

@keyframes contact-blink {
  0%, 66.666% { opacity: 1; }
  66.667%, 100% { opacity: 0; }
}

.page-columns {
  display: grid;
  width: min(1220px, 100%);
  min-height: 0;
  margin: 0 auto;
  grid-template-columns: minmax(270px, .78fr) minmax(440px, 1.22fr);
  gap: clamp(46px, 8vw, 124px);
  align-items: stretch;
}

.about-column,
.projects-column {
  min-height: 0;
}

.projects-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.page-columns h2 {
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: var(--border);
  font-size: 24px;
  font-weight: 400;
}

.about-column > p {
  margin: 0;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.2;
}

.about-column a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.about-column a:hover,
.about-column a:focus-visible {
  background: var(--accent);
  color: var(--background);
}

.page-section {
  margin-top: 14px;
}

.page-section h3 {
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: var(--border);
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
}

.page-section dl {
  margin: 0;
}

.page-section dl > div {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.page-section dt {
  font-size: 16px;
  text-transform: uppercase;
}

.page-section dd {
  margin: 0;
  font-size: 17px;
}

.contact-list {
  display: flex;
  margin: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 17px;
  line-height: 1.1;
}

.page-projects {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--accent) transparent;
  scrollbar-width: thin;
}

.page-project {
  display: grid;
  min-height: 82px;
  padding: 13px 8px;
  grid-template-columns: minmax(145px, .8fr) minmax(220px, 1.4fr) 18px;
  gap: 17px;
  align-items: start;
  border-bottom: var(--border);
  color: var(--accent);
  text-decoration: none;
}

.page-project:first-child {
  padding-top: 0;
}

.page-project:hover,
.page-project:focus-visible {
  background: var(--accent);
  color: var(--background);
  outline-offset: -3px;
}

.page-project-name {
  font-size: 22px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.page-project-description {
  font-size: 19px;
  line-height: 1.14;
}

.page-project-arrow {
  font-size: 23px;
  line-height: .8;
}

.touch-controls {
  display: none;
}

body.controls-tutorial-open .touch-controls,
body.guestbook-open .touch-controls {
  display: none !important;
}

.noscript {
  position: fixed;
  z-index: 3000;
  inset: 0;
  padding: 40px;
  background: #000;
  color: #ff8fc7;
  font-family: "VT323", monospace;
}

@media (max-width: 760px) {
  .app-chrome {
    padding-right: 8px;
    padding-left: 8px;
  }

  .identity {
    padding-right: 3px;
    font-size: 18px;
  }

  .identity-mark {
    width: 22px;
    height: 22px;
  }

  .chrome-contact {
    padding: 0 5px;
    font-size: 17px;
  }

  .experience-overlay {
    padding: 14px;
  }

  .experience-card {
    width: min(270px, calc(100vw - 28px));
    padding: 14px;
  }

  .controls-tutorial {
    padding: 14px;
  }

  .controls-tutorial-card {
    width: min(100%, 480px);
    max-height: calc(100dvh - var(--chrome-height) - 28px);
    padding: 20px;
    overflow-y: auto;
    font-size: 20px;
  }

  .controls-tutorial-card h2 {
    margin-bottom: 18px;
    font-size: 40px;
  }

  .controls-tutorial-card p {
    margin-top: 14px;
  }

  .tutorial-secret {
    padding-top: 14px;
  }

  .tutorial-desktop {
    display: none;
  }

  .tutorial-mobile {
    display: block;
  }

  .guestbook-modal {
    padding: 10px;
  }

  .guestbook-card {
    width: 100%;
    max-height: calc(100dvh - var(--chrome-height) - 20px);
  }

  .guestbook-card h2 {
    font-size: 26px;
  }

  .guestbook-entries {
    font-size: 20px;
  }

  .experience-card h1 {
    margin-bottom: 11px;
    font-size: 30px;
  }

  .experience-options {
    grid-template-columns: 1fr;
  }

  .experience-option {
    min-height: 45px;
    padding: 7px;
  }

  .option-name,
  .recommended-label {
    font-size: 22px;
  }

  .character-picker {
    margin-top: 10px;
  }

  .dialogue-box {
    right: 10px;
    bottom: max(55px, calc(env(safe-area-inset-bottom) + 48px));
    left: 10px;
    min-height: 176px;
    max-height: 47dvh;
    padding: 15px 15px 20px;
    overflow-y: auto;
  }

  .dialogue.encounter .dialogue-box {
    min-height: 198px;
  }

  .dialogue-copy {
    font-size: 22px;
  }

  .dialogue-speaker {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
    max-width: 100%;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
  }

  .dialogue-choices button {
    min-height: 44px;
    font-size: 18px;
  }

  .dialogue-key {
    min-width: 56px;
    min-height: 40px;
    font-size: 18px;
  }

  body.instrument-open .dialogue-box {
    bottom: max(12px, env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--chrome-height) - 24px);
  }

  body.instrument-open .dialogue-copy {
    min-height: 0;
  }

  body.instrument-open .dialogue-choices,
  body.instrument-open .dialogue-key {
    display: none;
  }

  .instrument-keyboard:not([hidden]) {
    display: grid;
    gap: 12px;
    margin-top: 14px;
  }

  .instrument-notes {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    min-height: 96px;
    border: 2px solid var(--accent);
    background: var(--accent);
    gap: 2px;
  }

  .instrument-notes button {
    display: flex;
    min-width: 0;
    padding: 8px 1px 5px;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: var(--background);
    color: var(--accent);
    font: 23px/1 var(--chrome-font);
    touch-action: manipulation;
  }

  .instrument-notes button small {
    font-size: 13px;
    opacity: .7;
  }

  .instrument-notes button:active,
  .instrument-notes button.playing {
    background: var(--accent);
    color: var(--background);
  }

  .instrument-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .instrument-mobile-actions button {
    min-height: 42px;
    border: var(--control-border);
    background: var(--background);
    color: var(--accent);
    font: 20px/1 var(--chrome-font);
  }

  .instrument-mobile-actions button:active {
    background: var(--accent);
    color: var(--background);
  }

  .encounter-figure {
    top: 5%;
    width: min(240px, 58vw);
  }

  .interaction-prompt {
    bottom: 64px;
  }

  .desktop-prompt {
    display: none;
  }

  .mobile-prompt {
    display: inline;
  }

  .world-hotspot kbd,
  .world-hotspot > span {
    display: none;
  }

  .world-hotspot::before {
    content: attr(data-interaction-glyph);
    display: block;
    color: var(--accent);
    font-size: 30px;
    line-height: 1;
    text-shadow: 2px 2px 0 #000;
  }

  .page-heading {
    margin-bottom: 14px;
    align-items: baseline;
    gap: 4px;
    text-align: left;
  }

  .page-heading h1,
  .page-contact {
    font-size: clamp(26px, 8.8vw, 44px);
  }

  .page-columns {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
  }

  .one-page {
    padding: calc(var(--chrome-height) + 18px) 18px 12px;
  }

  .about-column {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--accent) transparent;
    scrollbar-width: thin;
  }

  .page-columns h2 {
    margin-bottom: 8px;
  }

  .about-column > p {
    font-size: 17px;
  }

  .page-section {
    margin-top: 12px;
  }

  .page-project {
    min-height: 0;
    padding: 14px 6px;
    grid-template-columns: 1fr 20px;
    gap: 5px 12px;
  }

  .page-project:first-child {
    padding-top: 0;
  }

  .page-project-name {
    font-size: 23px;
  }

  .page-project-description {
    grid-column: 1;
  }

  .project-world-label {
    width: 184px;
    max-width: 184px;
    font-size: 17px;
    line-height: 1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .page-project-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .world-hotspot kbd,
  .world-hotspot > span {
    display: none;
  }

  .world-hotspot::before {
    content: attr(data-interaction-glyph);
    display: block;
    color: var(--accent);
    font-size: 30px;
    line-height: 1;
    text-shadow: 2px 2px 0 #000;
  }

  body[data-mode="fun"] .touch-controls {
    position: fixed;
    z-index: 70;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    left: max(16px, env(safe-area-inset-left));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    pointer-events: none;
  }

  body.flappy-open .touch-joystick {
    visibility: hidden;
  }

  .touch-joystick {
    position: relative;
    width: 112px;
    height: 112px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: rgba(0, 0, 0, .68);
    box-shadow: 3px 3px 0 rgba(var(--accent-rgb), .55);
    color: rgba(var(--accent-rgb), .5);
    touch-action: none;
    pointer-events: auto;
  }

  .touch-joystick-cross {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -54%);
    font-family: var(--chrome-font);
    font-size: 76px;
    line-height: 1;
    pointer-events: none;
  }

  .touch-joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: #000;
    box-shadow: inset 0 0 0 4px rgba(var(--accent-rgb), .24);
    pointer-events: none;
  }

  .touch-joystick.active .touch-joystick-knob {
    background: var(--accent);
  }

  .touch-talk {
    display: grid;
    width: 70px;
    height: 70px;
    padding: 0;
    place-items: center;
    border: var(--control-border);
    border-radius: 50%;
    background: var(--background);
    color: var(--accent);
    font-family: var(--chrome-font);
    font-size: 34px;
    line-height: 1;
    box-shadow: 3px 3px 0 rgba(var(--accent-rgb), .55);
    touch-action: none;
    pointer-events: auto;
  }

  .touch-talk:active,
  .touch-talk.active {
    background: var(--accent);
    color: var(--background);
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 rgba(var(--accent-rgb), .55);
  }

  body.dialogue-open .touch-controls {
    display: none;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .experience-card {
    display: grid;
    max-width: 760px;
    grid-template-columns: 1fr 1.15fr;
    gap: 0 20px;
    align-items: end;
    padding: 16px 20px;
  }

  .experience-card .eyebrow,
  .experience-card h1 {
    grid-column: 1;
  }

  .experience-card h1 {
    margin-bottom: 0;
  }

  .experience-options,
  .character-picker {
    grid-column: 2;
  }

  .experience-options {
    grid-row: 1 / span 2;
  }

  .experience-option {
    min-height: 66px;
  }

  .character-picker {
    margin-top: 10px;
  }

  .dialogue-box {
    min-height: 120px;
    max-height: 62dvh;
  }

  .encounter-figure {
    top: 2%;
    width: min(180px, 30vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .identity-mark {
    transform: none !important;
  }
}
