@font-face {
  font-family: Platinum;
  src: url("assets/journey/message.woff2") format("woff2");
  font-display: swap;
}
:root {
  --pixel: Platinum, monospace;
  --screen: 100svh;
  color-scheme: light;
  scroll-behavior: smooth;
  scrollbar-color: #8da99b #172e28;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #172e28;
  color: white;
  font: 24px/1.3 var(--pixel);
  letter-spacing: 0;
}
button,
a {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
}
a {
  text-underline-offset: 5px;
}
button svg,
a svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link {
  position: fixed;
  top: -200px;
  left: 16px;
  z-index: 100;
  background: white;
  color: #24342c;
  padding: 16px;
}
.skip-link:focus {
  top: 16px;
}
#journey {
  position: relative;
  height: 450svh;
}
.stage {
  height: var(--screen);
  position: sticky;
  top: 0;
  overflow: hidden;
  isolation: isolate;
}
.anchor {
  position: absolute;
  top: calc(var(--stop) * 100svh);
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.world,
.forest {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.world img,
.world video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.world video {
  opacity: 0;
}
.world.playing video {
  opacity: 1;
}
.battle-world {
  background: #101714;
}
.battle-pair {
  position: absolute;
  inset: 0;
  background: #101714;
}
.battle-peer, .battle-screen-open { display: none; }
.battle-world img,
.battle-world video {
  object-fit: contain;
}
.forest {
  object-fit: cover;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 3;
}
.forest.left {
  transform-origin: left bottom;
}
.forest.right {
  transform-origin: right bottom;
}
.forest-portrait {
  position: absolute;
  top: 0;
  left: 50%;
  height: 150%;
  width: auto;
  max-width: none;
  pointer-events: none;
  z-index: 3;
  image-rendering: pixelated;
}
.battle-shutter {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #101714;
  transform: scaleY(0);
  pointer-events: none;
}
.travel-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #101714;
  opacity: 0;
  pointer-events: none;
}
.opening-title {
  position: absolute;
  z-index: 2;
  left: 6%;
  top: 9%;
  width: 480px;
  max-width: 43%;
}
.opening-title h1 {
  margin: 0 0 28px;
}
.opening-title img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.trailer-open {
  font-size: 24px;
  text-decoration: none;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  border-bottom: 2px solid #fff;
  padding: 10px 0;
  text-shadow: 2px 2px #193844;
}
.opening-actions {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  flex-wrap: wrap;
}
.opening-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 24px;
  text-decoration: none;
  text-shadow: 2px 2px #193844;
}
.opening-discord:hover { text-decoration: underline; }
/* The big PLAY button (Kai, 5 November 2026: "its missing a call to action"): drawn in the logo's own
   pixel letters by scripts/make_play_button.py; one sheet of three states (normal, hover, pressed),
   always shown at a whole-number scale so every pixel stays square. */
.opening-play {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0 0 24px;
  text-decoration: none;
  text-shadow: 2px 2px #193844;
  --scale: 5;
}
.opening-play-button {
  display: block;
  width: calc(69px * var(--scale));
  height: calc(27px * var(--scale));
  background: url("assets/journey/play-button.png") 0 0 / calc(69px * var(--scale)) calc(81px * var(--scale)) no-repeat;
  image-rendering: pixelated;
}
.opening-play:hover .opening-play-button,
.opening-play:focus-visible .opening-play-button {
  background-position: 0 calc(-27px * var(--scale));
}
.opening-play:active .opening-play-button {
  background-position: 0 calc(-54px * var(--scale));
}
.opening-play-note {
  font-size: 22px;
  text-shadow: 2px 0 #193844, -2px 0 #193844, 0 2px #193844, 0 -2px #193844, 2px 2px #193844;
}
@media (max-width: 700px) {
  .opening-play { --scale: 4; margin-bottom: 16px; }
  .opening-play-note { font-size: 19px; }
}
.scene-bottom {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 20px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.location-name {
  font-size: 22px;
  text-shadow: 2px 2px #17382e;
}
.next-scene {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}
.next-scene svg {
  transition: transform 160ms ease-out;
}
.next-scene:hover svg {
  transform: translateY(4px);
}
.scene-controls {
  position: absolute;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  padding: 4px;
  border: 3px solid #657985;
  box-shadow: inset 0 0 0 2px #b3ddda;
  background: #fff;
  color: #404848;
  max-width: calc(100% - 32px);
}
.scene-controls button {
  position: relative;
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 8px 16px 8px 30px;
  white-space: nowrap;
  font-size: 22px;
}
.scene-controls button[aria-pressed="true"] {
  background: #eef5f3;
}
.scene-controls button[aria-pressed]::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 12px;
  height: 16px;
  transform: translateY(-50%);
  background: url("assets/journey/menu-arrow.png") center / contain no-repeat;
  image-rendering: pixelated;
  visibility: hidden;
}
.scene-controls button[aria-pressed="true"]::before,
.scene-controls button[aria-pressed]:hover::before {
  visibility: visible;
}
.scene-controls .icon-button {
  padding: 10px;
}
.trade-controls .trade-open {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}
.scene-controls button:focus-visible {
  outline-color: #244f62;
  outline-offset: -3px;
}
.join-content {
  position: absolute;
  z-index: 4;
  left: 6%;
  top: 14%;
  max-width: 42%;
  text-shadow: 2px 2px #193844;
}
.discord-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 34px;
  text-decoration: none;
  border-bottom: 3px solid white;
  padding: 10px 0;
}
.join-content p {
  font-size: 22px;
  line-height: 1.6;
  margin: 20px 0;
}
.legal-link {
  font-size: 18px;
}
.trailer-dialog {
  position: fixed;
  inset: 0;
  height: fit-content;
  margin: auto;
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border: 4px solid #97b8bd;
  background: #14241e;
  color: #fff;
  overflow: auto;
}
.trailer-dialog::backdrop {
  background: #07100cda;
}
.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.dialog-bar h2 {
  font-size: 24px;
  font-weight: 400;
  margin: 0;
}
.trailer-dialog video {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 180px);
  background: #000;
}
.film-file {
  display: inline-block;
  margin-top: 14px;
  font-size: 20px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.fallback-links {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 20px;
  padding: 16px;
  flex-wrap: wrap;
  background: #18382c;
  z-index: 10;
}
@media (max-width: 700px) and (orientation: portrait) {
  .battle-pair {
    display: grid;
    align-content: center;
    gap: 46px;
    padding: 100px 0 80px;
  }
  .battle-pair > .world.battle-world,
  .battle-peer {
    position: relative;
    inset: auto;
    width: min(100%, calc((100svh - 226px) * 8 / 9));
    justify-self: center;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .battle-peer { display: block; }
  .battle-peer img, .battle-peer video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .battle-peer video { opacity: 0; }
  .battle-peer.playing video { opacity: 1; }
  .battle-screen-open {
    position: absolute;
    left: 16px;
    right: 16px;
    top: -38px;
    height: 38px;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: 0;
    color: #fff;
    font-size: 20px;
  }
  .battle-controls { display: none; }
}
@media (max-width: 700px) {
  .opening-title {
    top: max(76px, 7%);
    left: 8%;
    max-width: 84%;
    width: 340px;
  }
  .trailer-open {
    font-size: 20px;
  }
  .opening-actions { gap: 8px 20px; }
  .opening-discord { font-size: 20px; }
  .world img,
  .world video {
    object-position: 56% 50%;
  }
  .battle-world img,
  .battle-world video {
    object-position: center;
  }
  .scene-bottom {
    left: 20px;
    right: 20px;
  }
  .location-name {
    font-size: 18px;
  }
  .explore-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 280px;
    bottom: 80px;
  }
  .scene-controls button {
    font-size: 20px;
    padding: 8px 12px 8px 28px;
  }
  .join-content {
    top: max(76px, 7%);
    left: 7%;
    max-width: 86%;
  }
  .discord-link {
    font-size: 28px;
  }
  .join-content p {
    font-size: 19px;
    margin: 12px 0;
  }
  .legal-link {
    font-size: 16px;
  }
  .trailer-dialog {
    padding: 10px;
  }
  .dialog-bar h2 {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .next-scene svg { transition: none; }
  .forest,
  .forest-portrait,
  .battle-shutter {
    display: none !important;
  }
}
html.motion-paused { scroll-behavior: auto; }
.site-header {
  z-index: 20;
  display: flex;
  align-items: center;
}
.world.battle-world {
  height: calc(100% - 150px);
}
html:not(.js) #journey {
  height: 100svh;
}
html:not(.js) .anchor,
html:not(.js) .skip-link,
html:not(.js) .next-scene,
html:not(.js) .forest,
html:not(.js) .forest-portrait {
  display: none;
}
