@font-face {
  font-family: "Stout Clone";
  src: url("https://sanrita.ca/_next/static/media/F37stout_black_compressed_webfont-s.p.80262b91.woff2")
    format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Centra Mono Clone";
  src: url("https://sanrita.ca/_next/static/media/centramono_book_webfont-s.p.6af6a507.woff2")
    format("woff2");
  font-display: swap;
}

:root {
  --paper: #dce4e7;
  --ink: #243026;
  --ink-soft: rgba(36, 48, 38, 0.68);
  --glow: #d9ffd0;
  --trail: #d5ffc6;
  --deep: #1e2a20;
  --panel: #273225;
  --line: rgba(31, 44, 36, 0.34);
  --mono: "Centra Mono Clone", "Courier New", monospace;
  --display: "Stout Clone", "Impact", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(180px, 260px) minmax(210px, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
  padding: clamp(28px, 7vw, 92px) clamp(28px, 15vw, 190px);
  background: var(--paper);
  color: rgba(36, 48, 38, 0.82);
  pointer-events: none;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader__title,
.preloader__meter {
  margin: 0 0 36px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
}

.preloader__title strong {
  margin-left: 12px;
  font-weight: 700;
}

.preloader ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.preloader__left > p:last-child {
  margin: 42px 0 0;
  font-size: 10px;
  text-transform: uppercase;
}

.preloader__right {
  text-align: right;
}

.preloader__trail svg {
  width: min(100%, 260px);
  overflow: visible;
}

.preloader__trail path {
  fill: none;
  stroke: var(--glow);
  stroke-width: 4;
  stroke-dasharray: 14 10;
  filter: drop-shadow(0 0 7px rgba(217, 255, 208, 0.85));
  animation: drawTrail 1.7s linear infinite;
}

.preloader__trail circle {
  fill: var(--ink);
  stroke: var(--glow);
  stroke-width: 2;
}

.shell {
  --sidebar-width: minmax(285px, 26vw);
  --sidebar-pad: 36px;
  --sidebar-content-width: 222px;
  --sidebar-slide: 0px;
  --chrome-bar: 40px;
  --map-side-pad: 55px;
  --chrome-opacity: 1;
  --footer-controls-opacity: 1;
  --float-controls-opacity: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.trail-menu {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  padding: var(--sidebar-pad);
  background: var(--paper);
  border-right: 0;
  overflow: hidden;
  opacity: var(--chrome-opacity);
}

.shell.is-map-expanded .trail-menu {
  pointer-events: none;
}

.trail-menu__top {
  display: flex;
  width: var(--sidebar-content-width);
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  transform: translateX(var(--sidebar-slide));
  will-change: transform;
}

.trail-menu h2 {
  align-self: flex-start;
  margin: 0 0 32px;
  max-width: 220px;
  font-size: 12px;
  line-height: 1.15;
  text-transform: uppercase;
  font-weight: 700;
}

.site-nav {
  display: grid;
  gap: 16px;
  width: max-content;
  margin: clamp(96px, 14vh, 150px) 0 0;
}

.site-nav a {
  display: inline-grid;
  grid-template-columns: 20px auto;
  align-items: center;
  gap: 12px;
  min-height: 20px;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.site-nav a span {
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, transform 160ms ease;
}

.site-nav a:hover span,
.site-nav a[aria-current="page"] span {
  border-color: currentColor;
}

.site-nav svg {
  display: block;
  width: 20px;
  max-height: 21px;
  fill: currentColor;
}

.legend {
  display: grid;
  gap: 14px;
  width: max-content;
  margin: 20px 0 0;
}

.legend p,
.language,
.copyright {
  margin: 0;
  font-size: 11px;
  line-height: 1;
}

.legend p {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend p span {
  display: block;
  width: 22px;
  height: 12px;
  flex: 0 0 22px;
  color: var(--ink);
}

.legend__road {
  border-top: 2px solid currentColor;
  transform: translateY(5px) rotate(2deg);
}

.legend__trail {
  border-top: 2px dashed currentColor;
  transform: translateY(5px);
}

.legend__spot {
  position: relative;
}

.legend__spot::before {
  content: "";
  position: absolute;
  inset: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 6px -4px 0 -3px currentColor, -6px 5px 0 -3px currentColor;
}

.legend__view {
  position: relative;
}

.legend__view::before,
.legend__view::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 10px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.legend__view::before {
  left: 1px;
}

.legend__view::after {
  right: 1px;
}

.language {
  display: flex;
  gap: 3px;
  margin: 22px 0 auto;
}

.trail-menu__bottom {
  width: var(--sidebar-content-width);
  min-width: 0;
  transform: translateX(var(--sidebar-slide));
  will-change: transform;
}

.trail-menu__bottom h1 {
  width: 210px;
  max-width: none;
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 0.86;
  text-transform: uppercase;
  font-weight: 900;
  transform: scaleX(0.66);
  transform-origin: left bottom;
}

.activity-wall {
  display: grid;
  width: 186px;
  gap: 6px;
  margin: 0 0 12px;
  color: rgba(36, 48, 38, 0.82);
}

.activity-wall:last-of-type {
  margin-bottom: 16px;
}

.github-wall__header,
.github-wall__footer,
.fitness-wall__header,
.fitness-wall__footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 8px;
  line-height: 1;
  text-transform: uppercase;
}

.github-wall__header strong,
.fitness-wall__header strong {
  font-size: inherit;
}

.github-wall__footer,
.fitness-wall__footer {
  color: var(--ink-soft);
}

.github-wall__grid,
.fitness-wall__grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 4px);
  grid-auto-columns: 4px;
  gap: 2px;
  width: fit-content;
}

.activity-wall__cell {
  display: block;
  width: 4px;
  height: 4px;
  background: rgba(36, 48, 38, 0.14);
}

.activity-wall--github .activity-wall__cell[data-level="1"] {
  background: rgba(36, 48, 38, 0.34);
}

.activity-wall--github .activity-wall__cell[data-level="2"] {
  background: rgba(69, 101, 63, 0.62);
}

.activity-wall--github .activity-wall__cell[data-level="3"] {
  background: rgba(116, 157, 83, 0.84);
}

.activity-wall--github .activity-wall__cell[data-level="4"] {
  background: var(--glow);
}

.activity-wall--fitness .activity-wall__cell[data-level="1"] {
  background: rgba(92, 76, 24, 0.34);
}

.activity-wall--fitness .activity-wall__cell[data-level="2"] {
  background: rgba(145, 114, 32, 0.62);
}

.activity-wall--fitness .activity-wall__cell[data-level="3"] {
  background: rgba(207, 169, 58, 0.84);
}

.activity-wall--fitness .activity-wall__cell[data-level="4"] {
  background: #fff0a3;
}

.activity-wall:hover .activity-wall__cell,
.activity-wall:focus-visible .activity-wall__cell {
  box-shadow: 0 0 0 1px rgba(36, 48, 38, 0.24);
}

.copyright {
  color: var(--ink-soft);
}

.map-panel {
  position: relative;
  display: grid;
  grid-template-rows: var(--chrome-bar) minmax(0, 1fr) var(--chrome-bar);
  min-width: 0;
  height: 100vh;
  min-height: 0;
  padding: 0 var(--map-side-pad);
  background: var(--paper);
}

.map-panel__hud,
.map-panel__footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  color: var(--ink-soft);
  font-size: 10px;
  text-transform: uppercase;
  min-height: 0;
}

.map-panel__hud {
  opacity: var(--chrome-opacity);
  overflow: hidden;
}

.trails-float {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 10;
  height: 36px;
  min-width: 150px;
  padding: 0 18px;
  border: 0;
  background: var(--glow);
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  opacity: var(--float-controls-opacity);
  pointer-events: none;
  transform: translateY(0);
  will-change: opacity, transform;
}

.shell.is-map-expanded .trails-float {
  pointer-events: auto;
}

.map-panel__hud time {
  justify-self: center;
}

.map-panel__hud span:nth-child(3) {
  justify-self: end;
}

.sun,
.compass {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  justify-self: center;
}

.sun::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 -8px 0 -3px currentColor, 0 8px 0 -3px currentColor,
    8px 0 0 -3px currentColor, -8px 0 0 -3px currentColor;
}

.compass::before,
.compass::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 1px;
  width: 1px;
  height: 24px;
  background: currentColor;
}

.compass::after {
  transform: rotate(90deg);
}

.edge-label {
  position: absolute;
  top: 50%;
  z-index: 3;
  color: rgba(36, 48, 38, 0.55);
  font-size: 10px;
  line-height: 1.4;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
  opacity: var(--chrome-opacity);
}

.edge-label--left {
  left: 14px;
  transform: translateY(-50%) rotate(180deg);
}

.edge-label--right {
  right: 14px;
  transform: translateY(-50%);
}

.map-frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(36, 48, 38, 0.18);
  background: #87946e;
  isolation: isolate;
}

.wall-frame {
  cursor: grab;
  background:
    radial-gradient(circle at 20% 12%, rgba(217, 255, 208, 0.16), transparent 26%),
    radial-gradient(circle at 80% 22%, rgba(236, 166, 105, 0.22), transparent 30%),
    linear-gradient(135deg, #798468, #a88a63 42%, #314e43);
}

.wall-frame:active {
  cursor: grabbing;
}

#terrainCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scale(var(--map-zoom, 1));
  transform-origin: 50% 50%;
  will-change: transform;
}

.map-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 87% 11%, rgba(219, 239, 234, 0.55), transparent 13%),
    linear-gradient(90deg, rgba(246, 185, 128, 0.24), rgba(27, 69, 52, 0.2)),
    linear-gradient(0deg, rgba(36, 48, 38, 0.16), transparent 55%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.wall-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(217, 255, 208, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 255, 208, 0.12) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.5;
  pointer-events: none;
}

.wall-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 1220px;
  height: 820px;
  transform: translate(
      calc(-50% + var(--wall-x, 0px)),
      calc(-50% + var(--wall-y, 0px))
    )
    scale(var(--wall-zoom, 1));
  transform-origin: 50% 50%;
  will-change: transform;
}

.work-card {
  position: absolute;
  display: block;
  padding: 0;
  border: 1px solid rgba(217, 255, 208, 0.36);
  background: rgba(35, 47, 36, 0.88);
  color: var(--glow);
  cursor: pointer;
  overflow: hidden;
  transform: rotate(var(--card-rotate, 0deg));
  transform-origin: center;
  box-shadow: 0 18px 44px rgba(21, 29, 23, 0.32);
  animation: cardIn 520ms ease both;
  animation-delay: var(--card-delay, 0ms);
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27, 38, 29, 0.03), rgba(27, 38, 29, 0.62)),
    linear-gradient(90deg, rgba(217, 255, 208, 0.08), transparent 45%);
  pointer-events: none;
}

.work-card:hover,
.work-card:focus-visible {
  outline: 0;
  z-index: 20;
  box-shadow: 0 26px 70px rgba(21, 29, 23, 0.46);
  transform: rotate(var(--card-rotate, 0deg)) scale(1.025);
}

.work-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.04);
}

.work-card__number,
.work-card__meta,
.work-card strong {
  position: absolute;
  z-index: 2;
  text-transform: uppercase;
}

.work-card__number {
  top: 12px;
  left: 12px;
  font-size: 10px;
  color: rgba(217, 255, 208, 0.7);
}

.work-card__meta {
  right: 12px;
  bottom: 12px;
  max-width: 58%;
  font-size: 9px;
  line-height: 1.35;
  text-align: right;
  color: rgba(217, 255, 208, 0.78);
}

.work-card strong {
  left: 12px;
  bottom: 12px;
  max-width: 68%;
  font-family: var(--display);
  font-size: clamp(25px, 3.3vw, 54px);
  line-height: 0.82;
  text-align: left;
}

.work-card__resize {
  display: none;
}

.map-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image:
    linear-gradient(rgba(36, 48, 38, 0.44) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 48, 38, 0.44) 1px, transparent 1px);
  background-size: 25% 33.333%;
  opacity: 0.65;
  pointer-events: none;
  transform: scale(var(--map-zoom, 1));
  transform-origin: 50% 50%;
  will-change: transform;
}

.brand-mark {
  position: absolute;
  top: 34px;
  left: 32px;
  z-index: 5;
  margin: 0;
  color: var(--glow);
  font-family: var(--display);
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.8;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(28, 36, 29, 0.3);
  transform: rotate(-3deg);
}

.trail-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: scale(var(--map-zoom, 1));
  transform-origin: 50% 50%;
  transition: opacity 180ms ease;
  will-change: transform;
}

.trail-overlay.is-muted {
  opacity: 0.18;
}

.trail-path {
  fill: none;
  stroke: var(--trail);
  stroke-width: 5;
  stroke-dasharray: 13 12;
  filter: drop-shadow(0 0 3px rgba(217, 255, 208, 0.9));
}

.trail-path--secondary {
  stroke-width: 3;
  opacity: 0.85;
}

.road-path {
  fill: none;
  stroke: rgba(34, 42, 34, 0.54);
  stroke-width: 6;
  stroke-linecap: round;
}

.node {
  fill: var(--ink);
  stroke: var(--trail);
  stroke-width: 4;
}

.node--large {
  stroke-width: 5;
}

.viewpoint {
  fill: none;
  stroke: var(--trail);
  stroke-width: 3;
  stroke-dasharray: 2 5;
}

.scroll-prompt {
  display: none;
}

.map-copy {
  position: absolute;
  z-index: 5;
  color: rgba(36, 48, 38, 0.64);
  font-size: 10px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 6px;
  opacity: var(--chrome-opacity);
  pointer-events: none;
}

.map-copy p {
  margin: 0;
}

.map-copy--left {
  display: none;
}

.hotspot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 7;
  width: min(205px, 31%);
  min-width: 170px;
  overflow: hidden;
  background: rgba(35, 47, 36, 0.92);
  color: var(--glow);
  box-shadow: 0 0 0 1px rgba(217, 255, 208, 0.2);
}

.hotspot__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(217, 255, 208, 0.28);
  font-size: 9px;
  text-transform: uppercase;
}

.hotspot__body {
  padding: 15px 10px 10px;
}

.hotspot p {
  margin: 0 0 8px;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.hotspot h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(29px, 4vw, 46px);
  line-height: 0.78;
  text-align: center;
  text-transform: uppercase;
}

.hotspot img {
  display: block;
  width: 100%;
  aspect-ratio: 1.65;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.08);
}

.hotspot span {
  display: block;
  margin-top: 8px;
  color: rgba(217, 255, 208, 0.72);
  font-size: 8px;
  line-height: 1.25;
  text-transform: uppercase;
}

.zoom-tools {
  position: absolute;
  right: 16px;
  top: 50%;
  z-index: 8;
  display: grid;
  overflow: hidden;
  background: rgba(35, 47, 36, 0.82);
}

.zoom-tools button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(217, 255, 208, 0.18);
  background: transparent;
  color: var(--glow);
  cursor: pointer;
}

.zoom-tools button:last-child {
  border-bottom: 0;
}

.map-panel__footer {
  grid-template-columns: minmax(70px, 1fr) auto auto auto minmax(70px, 1fr);
  column-gap: clamp(18px, 3vw, 54px);
}

.map-panel__footer span {
  opacity: var(--chrome-opacity);
}

.map-panel__footer .footer-copy {
  color: rgba(36, 48, 38, 0.64);
  line-height: 1.15;
  text-align: center;
  letter-spacing: 6px;
}

.map-panel__footer span:last-child {
  justify-self: end;
}

.map-panel__footer button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 10px;
  text-transform: uppercase;
  opacity: var(--footer-controls-opacity);
}

.work-dialog {
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 1px solid rgba(217, 255, 208, 0.34);
  background: var(--panel);
  color: var(--glow);
  overflow: hidden;
}

.work-dialog::backdrop {
  background: rgba(12, 18, 14, 0.72);
  backdrop-filter: blur(6px);
}

.work-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.work-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(217, 255, 208, 0.28);
  background: rgba(35, 47, 36, 0.82);
  color: var(--glow);
  cursor: pointer;
  font-size: 10px;
  text-transform: uppercase;
}

.work-dialog__media {
  min-height: 520px;
  background: #172018;
}

.work-dialog__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-dialog__content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 54px 32px 32px;
}

.work-dialog__eyebrow {
  margin: 0;
  color: rgba(217, 255, 208, 0.68);
  font-size: 10px;
  text-transform: uppercase;
}

.work-dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 86px);
  line-height: 0.84;
  text-transform: uppercase;
}

.work-dialog p {
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
}

.work-dialog__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-dialog__tags span,
.work-dialog a {
  border: 1px solid rgba(217, 255, 208, 0.34);
  color: var(--glow);
  font-size: 10px;
  text-transform: uppercase;
}

.work-dialog__tags span {
  padding: 7px 9px;
}

.work-dialog a {
  display: inline-flex;
  width: fit-content;
  margin-top: auto;
  padding: 10px 12px;
}

.work-card.is-selected {
  z-index: 24;
  box-shadow:
    0 0 0 2px var(--glow),
    0 26px 70px rgba(21, 29, 23, 0.48);
}

body.is-editor-mode .work-card {
  cursor: move;
  overflow: visible;
}

body.is-editor-mode .work-card:hover,
body.is-editor-mode .work-card:focus-visible {
  transform: rotate(var(--card-rotate, 0deg));
}

body.is-editor-mode .work-card::before {
  content: "EDIT";
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 3px 6px;
  background: var(--glow);
  color: var(--ink);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

body.is-editor-mode .work-card__resize {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 6;
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(35, 47, 36, 0.78);
  background: var(--glow);
  box-shadow: 0 8px 20px rgba(18, 26, 20, 0.28);
  cursor: nesw-resize;
  pointer-events: auto;
  touch-action: none;
}

body.is-editor-mode .work-card__resize::before,
body.is-editor-mode .work-card__resize::after {
  content: "";
  position: absolute;
  background: rgba(35, 47, 36, 0.72);
}

body.is-editor-mode .work-card__resize::before {
  left: 4px;
  right: 4px;
  bottom: 6px;
  height: 1px;
}

body.is-editor-mode .work-card__resize::after {
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 1px;
}

body.is-editor-mode .work-card__resize:hover {
  transform: scale(1.08);
}

.editor-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  display: grid;
  gap: 12px;
  width: min(370px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 14px;
  overflow: auto;
  background: rgba(35, 47, 36, 0.96);
  color: var(--glow);
  box-shadow: 0 24px 80px rgba(18, 26, 20, 0.42);
}

.editor-panel[hidden] {
  display: none;
}

.editor-tools[hidden] {
  display: none;
}

.editor-auth[hidden] {
  display: none;
}

.editor-panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(217, 255, 208, 0.24);
}

.editor-panel__header p,
.editor-panel__header strong {
  display: block;
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
}

.editor-panel__header strong {
  margin-top: 4px;
  color: rgba(217, 255, 208, 0.72);
  font-weight: 400;
}

.editor-auth,
.editor-tools {
  display: grid;
  gap: 12px;
}

.editor-auth p {
  margin: 0;
  color: rgba(217, 255, 208, 0.72);
  font-size: 10px;
  line-height: 1.45;
  text-transform: uppercase;
}

.editor-panel button,
.editor-panel input,
.editor-panel textarea,
.editor-panel select {
  border: 1px solid rgba(217, 255, 208, 0.28);
  background: rgba(18, 26, 20, 0.62);
  color: var(--glow);
  font: inherit;
}

.editor-panel button {
  min-height: 32px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.editor-panel button:hover,
.editor-panel button:focus-visible {
  background: var(--glow);
  color: var(--ink);
}

.editor-panel label {
  display: grid;
  gap: 6px;
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
}

.editor-panel input,
.editor-panel textarea,
.editor-panel select {
  width: 100%;
  min-height: 32px;
  padding: 8px;
  font-size: 11px;
  line-height: 1.35;
}

.editor-panel textarea {
  resize: vertical;
}

.editor-panel__controls,
.editor-form,
.editor-form__row,
.editor-form__grid {
  display: grid;
  gap: 10px;
}

.editor-form__row {
  grid-template-columns: 0.9fr 1.1fr;
}

.editor-form__grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.editor-panel__actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.editor-upload input {
  padding: 7px;
}

.editor-preview {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border: 1px solid rgba(217, 255, 208, 0.22);
  background: rgba(18, 26, 20, 0.62);
}

.editor-save {
  background: var(--glow);
  color: var(--ink);
}

.editor-export {
  width: 100%;
  border: 1px solid rgba(217, 255, 208, 0.28);
  background: rgba(18, 26, 20, 0.82);
  color: var(--glow);
  font: 10px/1.45 var(--mono);
}

.mobile-story {
  display: none;
}

@keyframes drawTrail {
  to {
    stroke-dashoffset: -48;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) rotate(var(--card-rotate, 0deg)) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-rotate, 0deg)) scale(1);
  }
}

@media (max-width: 980px) {
  .shell {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    --sidebar-width: 100%;
    --sidebar-pad: 28px 20px 30px;
    --chrome-bar: 34px;
    --map-side-pad: 20px;
  }

  .shell.is-map-expanded .trail-menu {
    display: none;
  }

  .trail-menu {
    order: 2;
    min-height: auto;
    padding: 28px 20px 30px;
    border-right: 0;
    border-top: 1px solid rgba(36, 48, 38, 0.18);
  }

  .trail-menu__top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
  }

  .trail-menu h2 {
    margin-bottom: 0;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    gap: 14px 18px;
  }

  .site-nav a {
    min-width: 0;
  }

  .legend {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 8px 0 0;
  }

  .language {
    margin: 0;
    justify-self: end;
  }

  .trail-menu__bottom {
    margin-top: 34px;
  }

  .trail-menu__bottom h1 {
    max-width: 690px;
    width: auto;
    font-size: clamp(34px, 10vw, 68px);
    transform: none;
  }

  .map-panel {
    order: 1;
    grid-template-rows: 34px minmax(440px, 72vh) 34px;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 20px;
    overflow: hidden;
  }

  .edge-label {
    display: none;
  }

  .map-copy {
    display: none;
  }

  .map-frame {
    min-height: 440px;
  }

  .wall-stage {
    width: 1040px;
    height: 760px;
  }

  .brand-mark {
    top: 24px;
    left: 24px;
  }

  .scroll-prompt {
    left: 18%;
    top: 42%;
    width: 68%;
  }

  .hotspot {
    width: 210px;
  }

  .mobile-story {
    display: block;
    padding: 48px 20px;
    border-top: 1px solid rgba(36, 48, 38, 0.18);
  }

  .mobile-story .kicker {
    margin: 0 0 16px;
    font-size: 11px;
    text-transform: uppercase;
  }

  .mobile-story h2 {
    max-width: 720px;
    margin: 0 0 18px;
    font-family: var(--display);
    font-size: clamp(40px, 11vw, 82px);
    line-height: 0.9;
    text-transform: uppercase;
  }

  .mobile-story p,
  .mobile-story a {
    max-width: 620px;
    font-size: 13px;
    line-height: 1.6;
  }

  .work-dialog[open] {
    grid-template-columns: 1fr;
  }

  .work-dialog__media {
    min-height: 310px;
  }

  .work-dialog__content {
    padding: 46px 22px 24px;
  }
}

@media (max-width: 620px) {
  .preloader {
    grid-template-columns: 1fr;
    align-content: center;
    padding: 28px;
  }

  .preloader__right {
    display: none;
  }

  .preloader__trail {
    order: -1;
    justify-self: center;
  }

  .map-panel {
    min-width: 0;
    padding: 12px;
    grid-template-rows: 32px minmax(430px, 66vh) 32px;
  }

  .trails-float {
    top: 8px;
    right: 8px;
    height: 28px;
    min-width: 108px;
    padding: 0 10px;
    font-size: 8px;
  }

  .map-frame,
  .map-panel__hud,
  .map-panel__footer {
    width: calc(100vw - 24px);
    max-width: 100%;
  }

  .map-panel__footer {
    grid-template-columns: auto auto;
    justify-content: space-between;
    column-gap: 10px;
    min-width: 0;
    font-size: 8px;
  }

  .map-panel__footer .footer-copy {
    display: none;
  }

  .map-panel__footer span {
    min-width: 0;
    white-space: nowrap;
  }

  .map-panel__footer span:last-child {
    display: none;
  }

  .map-panel__hud {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .map-panel__hud span:nth-child(3) {
    justify-self: center;
  }

  .compass {
    display: none;
  }

  .map-frame {
    min-height: 430px;
  }

  .brand-mark {
    font-size: 38px;
  }

  .scroll-prompt {
    top: 38%;
    left: 8%;
    width: 58%;
    font-size: clamp(34px, 12vw, 50px);
    text-align: left;
  }

  .map-copy {
    display: none;
  }

  .hotspot {
    right: auto;
    left: min(210px, calc(100% - 146px));
    bottom: 8px;
    width: 138px;
    min-width: 0;
  }

  .hotspot h3 {
    font-size: 24px;
  }

  .hotspot__body {
    padding: 10px 7px 7px;
  }

  .hotspot__top {
    min-height: 25px;
    padding: 0 7px;
  }

  .hotspot p,
  .hotspot span {
    font-size: 7px;
  }

  .zoom-tools {
    right: 10px;
    top: 42%;
  }

  .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .trail-menu__bottom h1 {
    font-size: clamp(32px, 12vw, 48px);
  }
}
