:root {
  color-scheme: dark;
  --ink: #f5f1ea;
  --muted: rgba(245, 241, 234, 0.68);
  --line: rgba(245, 241, 234, 0.18);
  --panel: rgba(12, 13, 15, 0.58);
  --accent: #f0b35a;
  --accent-2: #6ad3c6;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  touch-action: manipulation;
}

body {
  color: var(--ink);
}

#ambientScene,
#memoryBackdrop,
#deepFlares,
#ambientPoster,
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#ambientScene,
#memoryBackdrop,
#deepFlares,
#ambientPoster {
  z-index: 0;
}

#ambientScene {
  z-index: 0;
}

.memory-backdrop {
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  filter: brightness(0.7);
  background:
    radial-gradient(circle at 30% 48%, rgba(240, 179, 90, 0.18), transparent 38%),
    radial-gradient(circle at 72% 58%, rgba(106, 211, 198, 0.16), transparent 42%),
    url("./assets/memory-smoke-01.png") center / cover no-repeat;
  mix-blend-mode: normal;
  animation: memoryBaseDrift 27s ease-in-out infinite alternate;
}

.memory-backdrop::before,
.memory-backdrop::after {
  content: "";
  position: absolute;
  inset: -16%;
  background: url("./assets/memory-smoke-01.png") center / cover no-repeat;
  opacity: 1;
  mix-blend-mode: screen;
  transform: scale(1.08) translate3d(0, 0, 0);
  animation: memoryDrift 18s ease-in-out infinite alternate;
  will-change: transform, opacity;
  z-index: 0;
}

body.is-intro-active #ambientScene,
body.is-intro-active #memoryBackdrop,
body.is-intro-active #deepFlares,
body.is-intro-active #scene {
  opacity: 0.08;
  transition: opacity 5200ms ease;
}

body.is-intro-active #memoryBackdrop {
  opacity: 0.04;
}

body.is-intro-active #deepFlares {
  opacity: 0;
}

body.is-intro-active.is-intro-traveling #ambientScene,
body.is-intro-active.is-intro-traveling #memoryBackdrop,
body.is-intro-active.is-intro-traveling #deepFlares,
body.is-intro-active.is-intro-traveling #scene,
body.is-intro-complete #ambientScene,
body.is-intro-complete #memoryBackdrop,
body.is-intro-complete #deepFlares,
body.is-intro-complete #scene {
  opacity: 1;
}

.memory-backdrop::after {
  opacity: 0.94;
  transform: scale(1.18) rotate(180deg);
  animation-duration: 31s;
  animation-direction: alternate-reverse;
}

.nebula-flash {
  position: absolute;
  z-index: 2;
  display: block;
  width: 32vw;
  height: 26vw;
  min-width: 260px;
  min-height: 210px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  filter: blur(18px);
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse at center, rgba(255, 224, 166, 0.78) 0%, rgba(255, 151, 72, 0.36) 24%, rgba(255, 112, 54, 0.12) 48%, transparent 76%);
  transform: translate3d(0, 0, 0) scale(0.84);
  animation: nebulaFlash 23s ease-in-out infinite;
  will-change: opacity, transform;
}

.nebula-flash:nth-child(1) {
  left: 12%;
  top: 20%;
  animation-delay: -3s;
}

.nebula-flash:nth-child(2) {
  right: 8%;
  top: 34%;
  width: 28vw;
  height: 22vw;
  background:
    radial-gradient(ellipse at center, rgba(172, 204, 255, 0.66) 0%, rgba(112, 164, 255, 0.28) 28%, rgba(72, 210, 214, 0.1) 50%, transparent 76%);
  animation-duration: 28s;
  animation-delay: -11s;
}

.nebula-flash:nth-child(3) {
  left: 46%;
  bottom: 12%;
  width: 24vw;
  height: 20vw;
  background:
    radial-gradient(ellipse at center, rgba(255, 242, 210, 0.58) 0%, rgba(240, 179, 90, 0.24) 28%, rgba(255, 106, 56, 0.08) 52%, transparent 76%);
  animation-duration: 34s;
  animation-delay: -17s;
}

.nebula-flash:nth-child(4) {
  left: 24%;
  bottom: 20%;
  width: 22vw;
  height: 18vw;
  background:
    radial-gradient(ellipse at center, rgba(198, 174, 255, 0.5) 0%, rgba(166, 132, 255, 0.2) 32%, rgba(255, 89, 74, 0.08) 54%, transparent 78%);
  animation-duration: 38s;
  animation-delay: -7s;
}

.deep-flares {
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.deep-flare {
  position: absolute;
  left: var(--flare-x);
  top: var(--flare-y);
  width: var(--flare-size);
  height: var(--flare-size);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.25);
  mix-blend-mode: screen;
  filter: saturate(1.2);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 1) 0%, rgba(255, 238, 184, 0.92) 5%, rgba(255, 178, 75, 0.42) 15%, rgba(90, 168, 255, 0.2) 32%, transparent 66%);
  animation: deepFlareBloom 4.8s cubic-bezier(0.12, 0.82, 0.18, 1) forwards;
}

.deep-flare::before,
.deep-flare::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scaleX(0.2);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), rgba(255, 218, 134, 0.78), transparent);
  animation: deepFlareStreak 4.8s cubic-bezier(0.12, 0.82, 0.18, 1) forwards;
}

.deep-flare::before {
  width: calc(var(--flare-size) * 1.95);
  height: 2px;
}

.deep-flare::after {
  width: calc(var(--flare-size) * 1.18);
  height: 1px;
  transform: translate(-50%, -50%) rotate(90deg) scaleX(0.2);
  animation-name: deepFlareStreakVertical;
}

@keyframes deepFlareBloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  5% {
    opacity: 0.2;
  }

  8% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.58);
    filter: brightness(2.2) saturate(1.25);
  }

  13% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1.04);
  }

  38% {
    opacity: 0.22;
    transform: translate(-50%, -50%) scale(1.32);
    filter: brightness(1.2) saturate(1.08);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.7);
    filter: brightness(0.8) saturate(0.9);
  }
}

@keyframes deepFlareStreak {
  0%,
  4% {
    opacity: 0;
  }

  8% {
    opacity: 1;
    transform: translate(-50%, -50%) scaleX(1);
  }

  16% {
    opacity: 0.38;
  }

  100% {
    opacity: 0;
  }
}

@keyframes deepFlareStreakVertical {
  0%,
  4% {
    opacity: 0;
  }

  8% {
    opacity: 0.74;
    transform: translate(-50%, -50%) rotate(90deg) scaleX(1);
  }

  16% {
    opacity: 0.24;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scaleX(1);
  }
}

@keyframes memoryBaseDrift {
  0% {
    background-position:
      28% 48%,
      72% 58%,
      48% 50%;
    filter: brightness(0.86) saturate(1.04);
  }

  100% {
    background-position:
      32% 46%,
      68% 60%,
      52% 48%;
    filter: brightness(0.94) saturate(1.12);
  }
}

@keyframes memoryDrift {
  0% {
    opacity: 0.3;
    transform: scale(1.1) translate3d(-6%, 3.2%, 0) rotate(-1.8deg);
  }

  50% {
    opacity: 0.52;
  }

  100% {
    opacity: 0.36;
    transform: scale(1.2) translate3d(6.3%, -4.3%, 0) rotate(2.4deg);
  }
}

@keyframes nebulaFlash {
  0%,
  18%,
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.84);
  }

  27% {
    opacity: 0.08;
  }

  36% {
    opacity: 0.5;
    transform: translate3d(1.8%, -1.2%, 0) scale(1.1);
  }

  45% {
    opacity: 0.16;
  }

  62% {
    opacity: 0;
    transform: translate3d(-1%, 1.4%, 0) scale(1.18);
  }
}

.ambient-poster {
  z-index: 1;
  background-position: center;
  background-size: cover;
  opacity: 0;
  filter: saturate(0.96) contrast(1.14) brightness(0.78);
  transform: scale(1.03);
  transition:
    opacity 900ms ease,
    transform 9000ms ease;
}

.ambient-poster.is-active {
  opacity: 0.68;
  transform: scale(1.08);
}

#scene {
  z-index: 2;
  background: transparent;
  touch-action: none;
}

.orientation-hint {
  position: fixed;
  left: 50%;
  top: max(18px, env(safe-area-inset-top));
  z-index: 10;
  width: min(360px, calc(100vw - 32px));
  display: none;
  gap: 10px;
  justify-items: center;
  padding: 16px 18px 18px;
  border: 1px solid rgba(245, 241, 234, 0.16);
  background:
    radial-gradient(circle at 50% 0%, rgba(247, 184, 62, 0.14), transparent 60%),
    rgba(3, 5, 9, 0.62);
  color: rgba(245, 241, 234, 0.78);
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.52);
  pointer-events: none;
}

.orientation-phone {
  width: 32px;
  height: 50px;
  border: 2px solid rgba(247, 184, 62, 0.72);
  border-radius: 7px;
  box-shadow:
    0 0 18px rgba(247, 184, 62, 0.24),
    inset 0 0 14px rgba(106, 211, 198, 0.14);
  animation: phoneRotateHint 2800ms ease-in-out infinite;
}

.orientation-kicker {
  margin: 0;
  color: var(--accent-2);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.orientation-hint strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.orientation-hint span {
  max-width: 29ch;
  font-size: 12px;
  line-height: 1.45;
}

.fullscreen-prompt {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: max(48px, calc(env(safe-area-inset-top) + 48px));
  z-index: 7;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(247, 184, 62, 0.42);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(240, 179, 90, 0.14), transparent 62%),
    rgba(3, 5, 9, 0.36);
  color: rgba(245, 241, 234, 0.84);
  text-align: center;
  backdrop-filter: blur(14px);
  box-shadow:
    0 0 24px rgba(247, 184, 62, 0.1),
    0 16px 42px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 0.7;
  transition:
    background 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    opacity 260ms ease,
    transform 260ms ease;
}

.fullscreen-prompt:not([hidden]) {
  display: grid;
}

.fullscreen-prompt span {
  color: rgba(245, 241, 234, 0.86);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fullscreen-prompt:hover,
.fullscreen-prompt:focus-visible {
  border-color: rgba(247, 184, 62, 0.72);
  background: rgba(240, 179, 90, 0.16);
  box-shadow:
    0 0 26px rgba(247, 184, 62, 0.2),
    0 0 54px rgba(255, 106, 56, 0.1),
    0 16px 42px rgba(0, 0, 0, 0.34);
  opacity: 1;
  transform: translateY(-2px);
  outline: none;
}

.fullscreen-prompt[hidden] {
  display: none;
}

@keyframes phoneRotateHint {
  0%,
  18% {
    transform: rotate(0deg);
  }

  42%,
  70% {
    transform: rotate(90deg) scale(0.92);
  }

  100% {
    transform: rotate(0deg);
  }
}

body.is-over-flow-node #scene {
  cursor: pointer;
}

.intro-panel {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  align-items: center;
  overflow-y: auto;
  padding: clamp(24px, 6vw, 76px);
  background:
    radial-gradient(circle at 68% 46%, rgba(247, 184, 62, 0.12), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.26));
  opacity: 1;
  pointer-events: auto;
  transition:
    opacity 1300ms ease,
    filter 1300ms ease;
}

.intro-panel[hidden],
.intro-panel.is-hidden {
  display: none !important;
}

.intro-panel.is-leaving {
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
}

.intro-copy,
.intro-journey {
  width: min(660px, calc(100vw - 48px));
  transform: translate3d(0, 0, 0);
  transition:
    opacity 1200ms ease,
    transform 1400ms cubic-bezier(0.18, 0.76, 0.2, 1);
}

.intro-panel.is-leaving .intro-copy {
  opacity: 0;
  transform: translate3d(4vw, -3vh, 0) scale(0.98);
}

.intro-panel.is-leaving .intro-journey {
  opacity: 0;
  transform: translate3d(0, 0, 0);
}

.intro-panel.is-choosing-journey .intro-copy {
  opacity: 0;
  transform: translate3d(0, 0, 0);
}

.intro-journey {
  opacity: 1;
}

.intro-journey[hidden] {
  display: none;
}

.intro-journey h2 {
  max-width: 13ch;
  margin: 0 0 clamp(18px, 3vh, 28px);
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 0.98;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.72);
}

.intro-journey p {
  max-width: 56ch;
  margin: 0 0 13px;
  color: rgba(245, 241, 234, 0.72);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.5;
}

.intro-kicker {
  margin: 0 0 14px;
  color: var(--accent-2);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  animation: introLineIn 1200ms ease forwards;
}

.intro-panel h1 {
  max-width: 12ch;
  font-size: clamp(30px, 4.4vw, 48px);
  opacity: 0;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.72);
  animation: introLineIn 1300ms ease 120ms forwards;
}

.intro-story {
  margin-top: clamp(18px, 4vh, 34px);
  display: grid;
  gap: 12px;
  color: rgba(245, 241, 234, 0.72);
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.46;
}

.intro-story p {
  max-width: 56ch;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  animation: introLineIn 1300ms ease var(--intro-delay) forwards;
}

.intro-guide {
  width: min(620px, 100%);
  margin-top: clamp(20px, 3.4vh, 32px);
  padding: 16px 18px;
  border: 1px solid rgba(245, 241, 234, 0.12);
  background:
    linear-gradient(135deg, rgba(4, 5, 7, 0.46), rgba(4, 5, 7, 0.22)),
    radial-gradient(circle at 12% 0%, rgba(247, 184, 62, 0.1), transparent 48%);
  color: rgba(245, 241, 234, 0.66);
  opacity: 0;
  transform: translateY(12px);
  animation: introLineIn 1200ms ease 260ms forwards;
}

.intro-guide-title {
  margin: 0 0 10px;
  color: rgba(245, 241, 234, 0.82);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-guide ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
  font-size: clamp(12px, 1.25vw, 14px);
  line-height: 1.45;
}

.intro-guide li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  border-radius: 50%;
  background: rgba(247, 184, 62, 0.72);
  vertical-align: 0.12em;
  box-shadow: 0 0 14px rgba(247, 184, 62, 0.36);
}

.resume-consent {
  width: min(620px, 100%);
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 1px solid rgba(106, 211, 198, 0.42);
  background:
    linear-gradient(135deg, rgba(106, 211, 198, 0.08), transparent 52%),
    rgba(4, 5, 7, 0.22);
  color: rgba(245, 241, 234, 0.62);
  opacity: 0;
  transform: translateY(12px);
  animation: introLineIn 1200ms ease 520ms forwards;
}

.resume-consent-title {
  margin: 0 0 6px;
  color: rgba(245, 241, 234, 0.82);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.resume-consent p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.resume-consent-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-consent button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(245, 241, 234, 0.12);
  color: rgba(245, 241, 234, 0.68);
  background: rgba(4, 5, 7, 0.16);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease;
}

.resume-consent button:hover,
.resume-consent.is-accepted #resumeAllow,
.resume-consent.is-declined #resumeDecline {
  border-color: rgba(247, 184, 62, 0.62);
  color: rgba(245, 241, 234, 0.92);
  background: rgba(240, 179, 90, 0.14);
}

.resume-continue {
  border-color: rgba(106, 211, 198, 0.4);
  background: rgba(106, 211, 198, 0.1);
}

.resume-continue[hidden] {
  display: none;
}

.resume-notice {
  width: min(620px, 100%);
  margin: 12px 0 0;
  color: rgba(245, 241, 234, 0.68);
  font-size: 12px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  animation: introLineIn 700ms ease forwards;
}

.resume-notice[hidden] {
  display: none;
}

.intro-language {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: rgba(245, 241, 234, 0.52);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-language-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intro-language button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(245, 241, 234, 0.12);
  color: rgba(245, 241, 234, 0.62);
  background: rgba(4, 5, 7, 0.16);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease;
}

.intro-language button:hover,
.intro-language button.is-active {
  border-color: rgba(247, 184, 62, 0.62);
  color: rgba(245, 241, 234, 0.92);
  background: rgba(240, 179, 90, 0.14);
}

.intro-actions {
  margin-top: clamp(22px, 4vh, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: introLineIn 1200ms ease 920ms forwards;
}

.intro-start {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(247, 184, 62, 0.44);
  color: var(--ink);
  background: rgba(240, 179, 90, 0.12);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 240ms ease,
    background 240ms ease,
    box-shadow 240ms ease,
    transform 240ms ease;
}

.intro-start:hover {
  border-color: rgba(247, 184, 62, 0.9);
  background: rgba(240, 179, 90, 0.22);
  box-shadow: 0 0 34px rgba(247, 184, 62, 0.18);
  transform: translateY(-2px);
}

.intro-journey > .intro-start {
  margin-top: clamp(22px, 4vh, 36px);
}

.intro-links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: rgba(245, 241, 234, 0.38);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  animation: introLineIn 1200ms ease 1120ms forwards;
}

.intro-links button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.intro-links button:hover {
  color: rgba(245, 241, 234, 0.82);
}

body.is-intro-active .hud,
body.is-intro-active .brand,
body.is-intro-active .controls,
body.is-intro-active .legal-trigger,
body.is-intro-active .contact-trigger,
body.is-intro-active .meta-links {
  opacity: 0;
  pointer-events: none;
}

body.is-ending-prelude .hud,
body.is-ending-prelude .brand,
body.is-ending-prelude .controls,
body.is-ending-prelude .legal-trigger,
body.is-ending-prelude .contact-trigger,
body.is-ending-prelude .meta-links {
  opacity: 0;
  pointer-events: none;
}

@keyframes introLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hud {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr auto;
  padding: clamp(18px, 4vw, 42px);
  opacity: 0.64;
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

body.is-viewing .hud {
  opacity: 0.36;
  transform: translateY(-8px);
}

.brand {
  --logo-hover-scale: 1;
  --logo-info-gap: 24px;
  position: fixed;
  left: clamp(18px, 4vw, 42px);
  top: clamp(18px, 4vw, 42px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  opacity: 0.6;
  pointer-events: auto;
  cursor: default;
  animation: logoDrift 8s ease-in-out infinite;
  transition:
    opacity 320ms ease,
    filter 320ms ease;
}

.brand:hover {
  --logo-hover-scale: 1.69;
  opacity: 1;
  filter: saturate(1.06) contrast(1.04);
}

@keyframes logoDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-0.3deg);
  }

  50% {
    transform: translate3d(8px, 6px, 0) rotate(0.4deg);
  }
}

.brand-logo {
  display: block;
  width: auto;
  max-width: min(330px, 50vw);
  max-height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.34));
  transform: scale(var(--logo-hover-scale));
  transform-origin: top left;
  transition: transform 720ms ease;
}

.brand-logo[hidden] {
  display: none;
}

.brand-info {
  position: absolute;
  left: 260px;
  top: 20px;
  width: min(720px, calc(100vw - 310px));
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  border-left: 1px solid rgba(247, 184, 62, 0.48);
  background: rgba(4, 5, 9, 0.34);
  backdrop-filter: blur(12px);
  color: rgba(245, 241, 234, 0.88);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-18px, 8px, 0);
  transition:
    opacity 980ms ease,
    transform 980ms cubic-bezier(0.18, 0.76, 0.2, 1);
}

.brand.is-info-open .brand-info {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.brand-info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 241, 234, 0.22);
  border-radius: 50%;
  background: rgba(3, 4, 8, 0.24);
  color: rgba(245, 241, 234, 0.76);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    transform 220ms ease;
}

.brand-info-close:hover,
.brand-info-close:focus-visible {
  border-color: rgba(247, 184, 62, 0.72);
  background: rgba(247, 184, 62, 0.12);
  color: var(--ink);
  transform: scale(1.06);
  outline: none;
}

.brand-portrait {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(0.92) contrast(1.08);
}

.brand-name {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-text {
  margin: 0;
  color: rgba(245, 241, 234, 0.68);
  font-size: 19px;
  line-height: 1.55;
}

.thought-panel {
  --thought-drift-x: 16px;
  --thought-drift-y: 12px;
  position: fixed;
  left: clamp(22px, 8vw, 118px);
  top: clamp(106px, 18vh, 190px);
  z-index: 8;
  width: min(680px, calc(100vw - 44px));
  padding: 28px 32px 30px;
  border-left: 1px solid rgba(247, 184, 62, 0.48);
  background:
    radial-gradient(circle at 14% 8%, rgba(247, 184, 62, 0.16), transparent 34%),
    rgba(4, 5, 9, 0.42);
  backdrop-filter: blur(14px);
  color: rgba(245, 241, 234, 0.88);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-18px, 10px, 0);
  transition:
    opacity 760ms ease,
    transform 860ms cubic-bezier(0.18, 0.76, 0.2, 1);
}

.thought-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  animation: thoughtPanelDrift 8s ease-in-out infinite;
}

.resume-empty-panel {
  top: clamp(118px, 22vh, 220px);
  background:
    radial-gradient(circle at 16% 10%, rgba(247, 184, 62, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(106, 211, 198, 0.08), transparent 58%),
    rgba(4, 5, 9, 0.5);
}

.resume-empty-restart {
  margin-top: 24px;
}

body.is-resume-empty-open .controls,
body.is-resume-empty-open .category-nav {
  opacity: 0.14;
  pointer-events: none;
}

@keyframes thoughtPanelDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-0.3deg);
  }

  50% {
    transform: translate3d(var(--thought-drift-x), var(--thought-drift-y), 0) rotate(0.4deg);
  }
}

.thought-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 241, 234, 0.22);
  border-radius: 50%;
  background: rgba(3, 4, 8, 0.24);
  color: rgba(245, 241, 234, 0.76);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition:
    color 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    transform 220ms ease;
}

.thought-close:hover,
.thought-close:focus-visible {
  border-color: rgba(247, 184, 62, 0.72);
  background: rgba(247, 184, 62, 0.12);
  color: var(--ink);
  transform: scale(1.06);
  outline: none;
}

.thought-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.thought-panel h2 {
  margin: 0 38px 18px 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 300;
}

.thought-text {
  margin: 0;
  color: rgba(245, 241, 234, 0.8);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.58;
}

.thought-author {
  margin: 22px 0 0;
  color: rgba(247, 184, 62, 0.72);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.is-author-info-open .hud,
body.is-author-info-open .category-nav,
body.is-author-info-open .controls,
body.is-author-info-open .sound-credit,
body.is-author-info-open .legal-trigger,
body.is-author-info-open .legal-panel,
body.is-author-info-open .route-status,
body.is-author-info-open .orientation-hint,
body.is-author-info-open .loading-state,
body.is-author-info-open .lightbox,
body.is-author-info-open .floating-photo,
body.is-author-info-open .thought-panel,
body.is-author-info-open .endtime-panel {
  opacity: 0;
  pointer-events: none;
}

.is-author-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.is-author-info-open .brand {
  opacity: 1;
}

@media (max-width: 1180px) {
  .brand {
    --logo-info-gap: 18px;
  }

  .brand-info {
    left: 230px;
    width: min(560px, calc(100vw - 270px));
    grid-template-columns: 140px 1fr;
    gap: 20px;
    padding: 20px 22px;
  }

  .brand-portrait {
    width: 140px;
    height: 140px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-text {
    font-size: 16px;
  }
}

.route-status {
  position: fixed;
  left: clamp(18px, 4vw, 42px);
  bottom: clamp(58px, 8vh, 92px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(280px, 42vw);
  padding: 4px 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.5;
  pointer-events: auto;
  text-transform: uppercase;
  cursor: default;
  isolation: isolate;
  transition:
    color 360ms ease,
    opacity 360ms ease,
    filter 360ms ease,
    transform 360ms cubic-bezier(0.18, 0.76, 0.2, 1);
}

.route-status::before {
  content: "";
  position: absolute;
  inset: -13px -18px;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 50%, rgba(247, 184, 62, 0.22), transparent 34%),
    radial-gradient(circle at 78% 50%, rgba(101, 195, 210, 0.12), transparent 42%),
    linear-gradient(90deg, rgba(255, 106, 56, 0.08), rgba(247, 184, 62, 0.1), rgba(101, 195, 210, 0.07));
  box-shadow:
    0 0 18px rgba(247, 184, 62, 0),
    0 0 46px rgba(255, 106, 56, 0);
  opacity: 0;
  transform: scaleX(0.72);
  transform-origin: left center;
  transition:
    opacity 420ms ease,
    transform 520ms cubic-bezier(0.18, 0.76, 0.2, 1),
    box-shadow 520ms ease;
}

.route-status:hover,
.route-status:focus-within,
.route-status.is-pulsing {
  color: rgba(245, 241, 234, 0.92);
  opacity: 1;
  filter:
    drop-shadow(0 0 10px rgba(247, 184, 62, 0.28))
    drop-shadow(0 0 18px rgba(255, 106, 56, 0.16));
  transform: translateY(-2px);
}

.route-status:hover::before,
.route-status:focus-within::before,
.route-status.is-pulsing::before {
  opacity: 1;
  transform: scaleX(1);
  box-shadow:
    0 0 20px rgba(247, 184, 62, 0.16),
    0 0 58px rgba(255, 106, 56, 0.12);
}

.route-line {
  position: relative;
  flex: 1;
  height: 2px;
  overflow: hidden;
  background: rgba(245, 241, 234, 0.12);
  box-shadow: 0 0 12px rgba(245, 241, 234, 0.03);
  transition:
    background 360ms ease,
    box-shadow 360ms ease,
    height 360ms ease;
}

.route-line span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow:
    0 0 10px rgba(247, 184, 62, 0.2),
    0 0 18px rgba(101, 195, 210, 0.12);
  transition:
    width 700ms ease,
    box-shadow 360ms ease,
    filter 360ms ease;
}

.route-status:hover .route-line,
.route-status:focus-within .route-line,
.route-status.is-pulsing .route-line {
  height: 3px;
  background: rgba(245, 241, 234, 0.2);
  box-shadow:
    0 0 16px rgba(247, 184, 62, 0.12),
    0 0 26px rgba(101, 195, 210, 0.08);
}

.route-status:hover .route-line span,
.route-status:focus-within .route-line span,
.route-status.is-pulsing .route-line span {
  filter: saturate(1.25) brightness(1.25);
  box-shadow:
    0 0 14px rgba(247, 184, 62, 0.42),
    0 0 28px rgba(255, 106, 56, 0.24),
    0 0 36px rgba(101, 195, 210, 0.16);
}

.route-status.is-pulsing {
  animation: routeStatusPulse 1900ms cubic-bezier(0.18, 0.76, 0.2, 1) both;
}

.route-status.is-pulsing::before {
  animation: routeStatusHaloPulse 1900ms cubic-bezier(0.18, 0.76, 0.2, 1) both;
}

.route-status.is-pulsing .route-line {
  animation: routeLinePulse 1900ms cubic-bezier(0.18, 0.76, 0.2, 1) both;
}

.route-status.is-pulsing .route-line span {
  animation: routeLineSparkPulse 1900ms cubic-bezier(0.18, 0.76, 0.2, 1) both;
}

@keyframes routeStatusPulse {
  0%,
  100% {
    opacity: 0.5;
    filter: drop-shadow(0 0 0 rgba(247, 184, 62, 0));
    transform: translateY(0) scale(1);
  }

  18% {
    opacity: 1;
    color: rgba(255, 247, 226, 0.98);
    filter:
      drop-shadow(0 0 14px rgba(247, 184, 62, 0.5))
      drop-shadow(0 0 26px rgba(255, 106, 56, 0.28));
    transform: translateY(-3px) scale(1.035);
  }

  58% {
    opacity: 0.88;
    transform: translateY(-1px) scale(1.012);
  }
}

@keyframes routeStatusHaloPulse {
  0%,
  100% {
    opacity: 0;
    transform: scaleX(0.72);
    box-shadow:
      0 0 18px rgba(247, 184, 62, 0),
      0 0 46px rgba(255, 106, 56, 0);
  }

  20% {
    opacity: 1;
    transform: scaleX(1.08);
    box-shadow:
      0 0 28px rgba(247, 184, 62, 0.28),
      0 0 72px rgba(255, 106, 56, 0.2),
      0 0 94px rgba(101, 195, 210, 0.1);
  }

  62% {
    opacity: 0.42;
    transform: scaleX(1);
  }
}

@keyframes routeLinePulse {
  0%,
  100% {
    height: 2px;
    background: rgba(245, 241, 234, 0.12);
  }

  18% {
    height: 4px;
    background: rgba(245, 241, 234, 0.28);
    box-shadow:
      0 0 18px rgba(247, 184, 62, 0.24),
      0 0 32px rgba(101, 195, 210, 0.14);
  }
}

@keyframes routeLineSparkPulse {
  0%,
  100% {
    filter: saturate(1) brightness(1);
  }

  18% {
    filter: saturate(1.48) brightness(1.48);
    box-shadow:
      0 0 18px rgba(247, 184, 62, 0.62),
      0 0 34px rgba(255, 106, 56, 0.34),
      0 0 44px rgba(101, 195, 210, 0.22);
  }
}

.category-nav {
  position: fixed;
  left: 50%;
  bottom: clamp(24px, 5vh, 54px);
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: min(820px, calc(100vw - 36px));
  opacity: 0.26;
  pointer-events: auto;
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.category-nav:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.chip,
.controls button {
  border: 1px solid rgba(245, 241, 234, 0.12);
  color: var(--ink);
  background: rgba(4, 5, 7, 0.14);
  min-height: 40px;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.chip {
  flex: 0 0 auto;
  padding: 0 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(8, 9, 11, 0.12);
  backdrop-filter: blur(10px);
}

.chip:hover,
.chip.is-active {
  border-color: rgba(240, 179, 90, 0.76);
  background: rgba(240, 179, 90, 0.2);
}

.category-nav:hover .chip {
  border-color: rgba(245, 241, 234, 0.34);
  background: rgba(4, 5, 7, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.category-nav:hover .chip:hover,
.category-nav:hover .chip.is-active {
  border-color: rgba(240, 179, 90, 0.92);
  background: rgba(240, 179, 90, 0.28);
}

.focus-card {
  display: none;
  grid-row: 2;
  grid-column: 1 / -1;
  align-self: center;
  justify-self: start;
  width: min(380px, calc(100vw - 36px));
  padding: 0 0 0 14px;
  border-left: 1px solid rgba(240, 179, 90, 0.58);
  background: transparent;
  backdrop-filter: none;
  pointer-events: auto;
  transform: translateY(-4vh);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.82);
}

body.is-viewing .hud:has(.focus-card:hover) {
  opacity: 0.82;
  transform: translateY(0);
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4.8vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.focus-card p:last-child {
  margin: 14px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.narrative {
  margin: 14px 0 0;
  max-width: 34rem;
  color: var(--ink);
  color: rgba(245, 241, 234, 0.82);
  font-size: 14px;
  line-height: 1.48;
}

.controls {
  position: fixed;
  z-index: 4;
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(92px, 14vh, 140px);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0.42;
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

body.is-viewing .controls {
  opacity: 0.22;
  transform: translateY(10px);
}

body.is-viewing .controls:hover {
  opacity: 1;
  transform: translateY(0);
}

.controls button {
  pointer-events: auto;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  font-size: 24px;
  line-height: 1;
  background: rgba(8, 9, 11, 0.12);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}

.controls button#soundToggle {
  width: auto;
  min-width: 96px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sound-control {
  display: grid;
  justify-items: stretch;
  gap: 8px;
  pointer-events: auto;
}

.sound-buttons {
  display: flex;
  gap: 8px;
}

.controls button.sound-next {
  min-width: 42px;
  padding: 0;
  font-size: 20px;
}

.sound-credit {
  width: 100%;
  padding: 9px 11px;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  color: rgba(245, 241, 234, 0.62);
  text-decoration: none;
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
  opacity: 0.58;
  transform: translateY(-4px);
  transition:
    opacity 420ms ease,
    background 420ms ease,
    transform 420ms ease;
}

.sound-credit:hover {
  opacity: 1;
  transform: translateY(0);
  background: transparent;
}

.sound-credit span,
.sound-credit strong {
  display: block;
  overflow-wrap: anywhere;
}

.sound-credit strong {
  margin-top: 2px;
  color: rgba(245, 241, 234, 0.86);
  font-weight: 500;
}

.sound-credit[hidden] {
  display: none;
}

.meta-links {
  position: fixed;
  left: clamp(18px, 4vw, 42px);
  bottom: clamp(24px, 5vh, 54px);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  opacity: 0.58;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.wallpaper-trigger,
.legal-trigger,
.contact-trigger {
  border: 0;
  padding: 0;
  color: rgba(245, 241, 234, 0.42);
  background: transparent;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 260ms ease,
    opacity 260ms ease,
    transform 260ms ease;
}

.wallpaper-trigger:hover,
.legal-trigger:hover,
.contact-trigger:hover {
  color: rgba(245, 241, 234, 0.86);
  transform: translateY(-2px);
}

.meta-links:hover {
  opacity: 1;
}

.wallpaper-panel,
.legal-panel,
.contact-panel {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 520ms ease;
}

.wallpaper-panel.is-open,
.legal-panel.is-open,
.contact-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wallpaper-panel[hidden],
.legal-panel[hidden],
.contact-panel[hidden] {
  display: none;
}

.wallpaper-panel-inner,
.legal-panel-inner,
.contact-panel-inner {
  position: relative;
  width: min(760px, calc(100vw - 36px));
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: clamp(24px, 4vw, 42px);
  border-left: 1px solid rgba(240, 179, 90, 0.54);
  background: rgba(4, 5, 9, 0.44);
  color: rgba(245, 241, 234, 0.78);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.wallpaper-panel h2,
.wallpaper-panel h3,
.wallpaper-panel p,
.legal-panel h2,
.legal-panel h3,
.legal-panel p,
.contact-panel h2,
.contact-panel p {
  margin: 0;
}

.wallpaper-panel h2,
.legal-panel h2,
.contact-panel h2 {
  color: var(--ink);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.wallpaper-panel-inner {
  width: min(980px, calc(100vw - 36px));
}

.wallpaper-lead {
  max-width: 58ch;
  margin: 16px 0 24px;
  color: rgba(245, 241, 234, 0.62);
  font-size: 15px;
  line-height: 1.58;
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wallpaper-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.wallpaper-card img {
  width: 100%;
  height: clamp(170px, 22vw, 260px);
  object-fit: cover;
  border: 1px solid rgba(247, 184, 62, 0.18);
  background: rgba(4, 5, 9, 0.3);
  box-shadow:
    0 0 28px rgba(247, 184, 62, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.32);
}

.wallpaper-card:nth-child(2) img {
  object-fit: cover;
  object-position: center;
}

.wallpaper-card h3 {
  color: rgba(245, 241, 234, 0.9);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wallpaper-card p {
  margin-top: 7px;
  color: rgba(245, 241, 234, 0.56);
  font-size: 14px;
  line-height: 1.5;
}

.wallpaper-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 12px;
  padding: 0 14px;
  border: 1px solid rgba(247, 184, 62, 0.46);
  color: rgba(245, 241, 234, 0.86);
  background:
    linear-gradient(135deg, rgba(240, 179, 90, 0.12), transparent 62%),
    rgba(3, 5, 9, 0.32);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    transform 220ms ease;
}

.wallpaper-card a:hover,
.wallpaper-card a:focus-visible {
  border-color: rgba(247, 184, 62, 0.72);
  background: rgba(240, 179, 90, 0.16);
  transform: translateY(-2px);
  outline: none;
}

.legal-section {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.legal-section h3 {
  color: rgba(245, 241, 234, 0.9);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-section p {
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.58;
}

#legalBody {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

#legalBody h3 {
  margin-top: 16px;
}

#legalBody h3:first-child {
  margin-top: 0;
}

#legalBody p,
#legalBody li {
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.58;
}

#legalBody ul,
#legalBody ol {
  margin: 0;
  padding-left: 1.2rem;
}

.legal-local-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 241, 234, 0.1);
}

.legal-local-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(106, 211, 198, 0.28);
  color: rgba(245, 241, 234, 0.76);
  background:
    linear-gradient(135deg, rgba(106, 211, 198, 0.08), transparent 60%),
    rgba(4, 5, 7, 0.22);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease;
}

.legal-local-actions button:hover {
  border-color: rgba(247, 184, 62, 0.62);
  color: rgba(245, 241, 234, 0.95);
  background: rgba(240, 179, 90, 0.14);
}

.legal-local-actions p {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: rgba(106, 211, 198, 0.74);
  font-size: 12px;
}

.wallpaper-close,
.legal-close,
.contact-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(245, 241, 234, 0.14);
  color: var(--ink);
  background: rgba(245, 241, 234, 0.06);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.wallpaper-close:hover,
.legal-close:hover,
.contact-close:hover {
  border-color: rgba(240, 179, 90, 0.72);
  background: rgba(240, 179, 90, 0.16);
}

.contact-lead {
  max-width: 58ch;
  margin: 16px 0 24px;
  color: rgba(245, 241, 234, 0.64);
  font-size: 15px;
  line-height: 1.58;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.contact-form label {
  display: grid;
  gap: 7px;
}

.contact-form label:nth-of-type(3),
.contact-privacy,
.contact-form button,
.contact-message {
  grid-column: 1 / -1;
}

.contact-form span {
  color: rgba(245, 241, 234, 0.56);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(245, 241, 234, 0.2);
  border-radius: 6px;
  color: rgba(245, 241, 234, 0.88);
  background:
    linear-gradient(135deg, rgba(247, 184, 62, 0.055), transparent 46%),
    rgba(4, 5, 7, 0.24);
  backdrop-filter: blur(12px);
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.018),
    0 18px 52px rgba(0, 0, 0, 0.16);
}

.contact-form input {
  min-height: 38px;
  padding: 0 12px;
}

.contact-form textarea {
  min-height: 180px;
  padding: 16px 17px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.58;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(247, 184, 62, 0.58);
  box-shadow: 0 0 28px rgba(247, 184, 62, 0.08);
}

.contact-privacy {
  margin: -2px 0 2px;
  color: rgba(245, 241, 234, 0.52);
  font-size: 12px;
  line-height: 1.48;
}

.contact-website {
  position: fixed !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px;
  height: 1px;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%);
}

.contact-message {
  min-height: 1.2em;
  margin: -4px 0 0;
  color: rgba(247, 184, 62, 0.82);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.contact-message.is-error {
  color: rgba(255, 176, 166, 0.88);
}

.finale-kicker {
  margin: 0 0 14px;
  color: rgba(106, 211, 198, 0.78);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.finale-actions {
  margin-top: clamp(24px, 4vh, 38px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.finale-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(247, 184, 62, 0.48);
  color: rgba(245, 241, 234, 0.9);
  background: rgba(240, 179, 90, 0.12);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    border-color 240ms ease,
    background 240ms ease,
    box-shadow 240ms ease,
    transform 240ms ease;
}

.finale-button:hover {
  border-color: rgba(247, 184, 62, 0.9);
  background: rgba(240, 179, 90, 0.2);
  box-shadow: 0 0 34px rgba(247, 184, 62, 0.16);
  transform: translateY(-2px);
}

.finale-button-secondary {
  border-color: rgba(245, 241, 234, 0.18);
  color: rgba(245, 241, 234, 0.68);
  background: rgba(4, 5, 7, 0.2);
}

.finale-button-secondary:hover {
  border-color: rgba(106, 211, 198, 0.56);
  background: rgba(106, 211, 198, 0.1);
}

.endtime-panel {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(18px, 4vw, 58px);
  background:
    radial-gradient(circle at 50% 50%, rgba(241, 177, 83, 0.09), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(94, 182, 226, 0.08), transparent 56%),
    #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1600ms ease;
}

.endtime-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.endtime-panel.is-fading {
  opacity: 0;
  transition: opacity 1300ms ease;
}

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

.endtime-thanks {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100vw - 44px));
  max-height: min(86vh, 820px);
  overflow: auto;
  padding: clamp(28px, 5vw, 54px);
  color: rgba(245, 241, 234, 0.88);
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 1300ms ease,
    transform 1500ms cubic-bezier(0.18, 0.76, 0.2, 1);
}

.endtime-thanks[hidden] {
  display: none;
}

.endtime-thanks.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.endtime-thanks h2 {
  margin: 0 0 clamp(24px, 4vh, 36px);
  color: var(--ink);
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.98;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.72);
}

.guestbook {
  margin: 0 auto clamp(22px, 4vh, 34px);
  max-width: 680px;
  text-align: left;
}

.guestbook-kicker {
  margin: 0 0 8px;
  color: rgba(106, 211, 198, 0.72);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.guestbook h3 {
  margin: 0 0 10px;
  color: rgba(245, 241, 234, 0.94);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.08;
}

.guestbook-lead p {
  margin: 0 0 18px;
  color: rgba(245, 241, 234, 0.64);
  font-size: 14px;
  line-height: 1.55;
}

.guestbook-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.guestbook-form label {
  display: grid;
  gap: 7px;
}

.guestbook-form label:nth-of-type(2),
.guestbook-consent,
.guestbook-form button,
.guestbook-message {
  grid-column: 1 / -1;
}

.guestbook-form span {
  color: rgba(245, 241, 234, 0.56);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  border: 1px solid rgba(245, 241, 234, 0.2);
  border-radius: 6px;
  color: rgba(245, 241, 234, 0.88);
  background:
    linear-gradient(135deg, rgba(247, 184, 62, 0.055), transparent 46%),
    rgba(4, 5, 7, 0.24);
  backdrop-filter: blur(12px);
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.018),
    0 18px 52px rgba(0, 0, 0, 0.16);
}

.guestbook-form input {
  min-height: 38px;
  padding: 0 12px;
}

.guestbook-form textarea {
  min-height: 154px;
  padding: 16px 17px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.58;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: rgba(247, 184, 62, 0.58);
  box-shadow: 0 0 28px rgba(247, 184, 62, 0.08);
}

.guestbook-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid rgba(245, 241, 234, 0.14);
  border-radius: 6px;
  background: rgba(245, 241, 234, 0.035);
}

.guestbook-consent input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 1px 0 0;
  accent-color: #f7b83e;
}

.guestbook-form .guestbook-consent span {
  color: rgba(245, 241, 234, 0.66);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.guestbook-website {
  position: fixed !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px;
  height: 1px;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%);
}

.guestbook-message {
  min-height: 1.2em;
  margin: -4px 0 0;
  color: rgba(247, 184, 62, 0.82);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.guestbook-message.is-error {
  color: rgba(255, 176, 166, 0.88);
}

.controls button.is-active {
  border-color: rgba(240, 179, 90, 0.76);
  background: rgba(240, 179, 90, 0.18);
}

.controls button:hover {
  transform: translateY(-2px);
  border-color: rgba(247, 184, 62, 0.78);
  background: rgba(8, 9, 11, 0.68);
  box-shadow: 0 0 22px rgba(247, 184, 62, 0.18);
}

.loading-state {
  position: fixed;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.56);
  backdrop-filter: blur(18px);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loading-state[hidden] {
  display: none;
}

.transition-flash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(245, 241, 234, 0.2), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 45%, rgba(0, 0, 0, 0.18));
  transition: opacity 620ms ease;
}

.transition-flash.is-active {
  opacity: 1;
  transition: opacity 140ms ease;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  background: rgba(4, 5, 7, 0.78);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 420ms ease;
}

.lightbox.is-open {
  opacity: 1;
}

body.is-discovering .hud,
body.is-discovering .controls,
body.is-discovering .brand {
  opacity: 0.16;
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  position: fixed;
  left: var(--lightbox-image-left, 50%);
  top: var(--lightbox-image-top, 50%);
  width: var(--lightbox-image-width, min(92vw, 1180px));
  height: auto;
  margin: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
}

.lightbox img {
  width: var(--lightbox-image-width, 100%);
  height: var(--lightbox-image-height, auto);
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 420ms ease 220ms,
    transform 520ms ease 220ms;
}

.lightbox.is-open img {
  opacity: 1;
  transform: scale(1);
}

.lightbox.is-closing {
  opacity: 0;
  transition: opacity 1320ms ease;
}

.lightbox.is-closing img {
  opacity: 0;
  filter: blur(8px) brightness(1.22) saturate(1.12);
  transform: scale(0.982);
  transition:
    opacity 1180ms ease,
    filter 1320ms ease,
    transform 1320ms cubic-bezier(0.2, 0.72, 0.22, 1);
}

.lightbox figcaption {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.lightbox.is-caption-visible figcaption {
  opacity: 1;
  transform: translateY(0);
}

.lightbox.is-closing figcaption {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 260ms ease,
    transform 360ms ease;
}

.lightbox figcaption span {
  color: var(--muted);
}

.lightbox-voice {
  position: static;
  justify-self: start;
  min-height: 34px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid rgba(245, 241, 234, 0.14);
  color: rgba(245, 241, 234, 0.72);
  background: rgba(4, 5, 7, 0.18);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 520ms ease 260ms,
    transform 620ms ease 260ms,
    border-color 220ms ease,
    background 220ms ease,
    color 220ms ease;
}

.lightbox.is-caption-visible .lightbox-voice {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lightbox-voice:hover,
.lightbox-voice.is-active {
  border-color: rgba(247, 184, 62, 0.62);
  color: rgba(245, 241, 234, 0.94);
  background: rgba(240, 179, 90, 0.14);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(245, 241, 234, 0.08);
  font-size: 30px;
  cursor: pointer;
}

.floating-photo {
  position: fixed;
  z-index: 9;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  object-fit: contain;
  opacity: 0;
  contain: layout paint;
  filter:
    drop-shadow(0 0 34px rgba(247, 184, 62, 0.58))
    drop-shadow(0 0 74px rgba(255, 106, 56, 0.22))
    drop-shadow(0 28px 60px rgba(0, 0, 0, 0.42));
  transform-origin: center center;
  will-change: transform, opacity;
  transition:
    opacity 920ms ease,
    filter 1100ms ease,
    left 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    top 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    width 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    height 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    transform 920ms cubic-bezier(0.18, 0.78, 0.2, 1);
}

.floating-photo.is-active {
  opacity: 1;
  transition:
    opacity 260ms ease,
    filter 1100ms ease,
    left 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    top 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    width 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    height 920ms cubic-bezier(0.18, 0.78, 0.2, 1),
    transform 920ms cubic-bezier(0.18, 0.78, 0.2, 1);
}

.floating-photo.is-flying {
  opacity: 1;
}

.floating-photo.is-settling {
  opacity: 0;
  filter:
    drop-shadow(0 0 14px rgba(247, 184, 62, 0.12))
    drop-shadow(0 0 26px rgba(255, 106, 56, 0.06))
    drop-shadow(0 16px 34px rgba(0, 0, 0, 0.18));
  transition:
    opacity 980ms ease,
    filter 1100ms ease,
    left 980ms cubic-bezier(0.18, 0.76, 0.2, 1),
    top 980ms cubic-bezier(0.18, 0.76, 0.2, 1),
    width 980ms cubic-bezier(0.18, 0.76, 0.2, 1),
    height 980ms cubic-bezier(0.18, 0.76, 0.2, 1),
    transform 980ms cubic-bezier(0.18, 0.76, 0.2, 1);
}

@media (max-width: 720px) {
  .memory-backdrop {
    opacity: 0.42;
  }

  .intro-panel {
    align-items: end;
    padding: 16px 18px max(24px, env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 64% 30%, rgba(247, 184, 62, 0.12), transparent 42%),
      linear-gradient(180deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.88));
  }

  .intro-copy {
    width: 100%;
  }

  .intro-story {
    margin-top: 16px;
    gap: 9px;
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.36;
  }

  .intro-guide {
    margin-top: 14px;
    padding: 13px 14px;
  }

  .resume-consent {
    padding: 13px 14px;
  }

  .intro-guide ul {
    gap: 6px;
    font-size: 12px;
  }

  .intro-language {
    align-items: flex-start;
    gap: 8px;
  }

  .intro-language button {
    min-height: 40px;
    padding: 0 13px;
  }

  .intro-panel h1 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .intro-actions {
    margin-top: 18px;
  }

  .intro-start {
    min-height: 42px;
  }

  .intro-links {
    margin-top: 12px;
    gap: 8px 14px;
    font-size: 10px;
  }

  .thought-panel {
    --thought-drift-x: 8px;
    --thought-drift-y: 6px;
    left: 16px;
    top: 76px;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 128px);
    overflow: auto;
    padding: 22px 22px 24px;
  }

  .resume-empty-panel {
    top: 86px;
  }

  .thought-panel h2 {
    font-size: 22px;
  }

  .thought-text {
    font-size: 17px;
  }

  .hud {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 10px;
    opacity: 0.72;
  }

  .route-status {
    left: 16px;
    bottom: max(142px, calc(env(safe-area-inset-bottom) + 142px));
    width: min(260px, calc(100vw - 32px));
    padding: 4px 0;
  }

  .brand-info {
    left: 0;
    top: 96px;
    width: min(520px, calc(100vw - 28px));
    max-height: calc(100vh - 120px - env(safe-area-inset-bottom));
    grid-template-columns: 108px 1fr;
    gap: 16px;
    align-items: start;
    overflow-y: auto;
    padding: 16px 18px;
    -webkit-overflow-scrolling: touch;
  }

  .brand-portrait {
    width: 108px;
    height: 108px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-text {
    font-size: 15px;
    line-height: 1.45;
  }

  .focus-card {
    align-self: end;
    width: min(92vw, 420px);
    margin-bottom: 96px;
    padding: 0 0 0 12px;
  }

  .kicker {
    font-size: 11px;
    margin-bottom: 8px;
  }

  h1 {
    font-size: clamp(28px, 10vw, 44px);
  }

  .narrative {
    font-size: 14px;
    line-height: 1.42;
  }

  .focus-card p:last-child {
    display: none;
  }

  .controls {
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px max(8px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
    opacity: 0.74;
  }

  .sound-control {
    position: static;
    gap: 6px;
    justify-items: center;
  }

  .category-nav {
    left: 16px;
    right: 16px;
    bottom: max(86px, calc(env(safe-area-inset-bottom) + 86px));
    transform: none;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    width: auto;
    max-width: none;
    padding-bottom: 4px;
    opacity: 0.82;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .category-nav::-webkit-scrollbar {
    display: none;
  }

  .chip {
    min-height: 44px;
    background: rgba(4, 5, 7, 0.5);
    border-color: rgba(245, 241, 234, 0.24);
  }

  .category-nav:hover {
    transform: none;
  }

  body.is-viewing .controls {
    opacity: 0.82;
    transform: none;
  }

  .controls button {
    min-width: 50px;
    height: 50px;
    font-size: 26px;
  }

  .controls button#soundToggle {
    min-width: 118px;
    font-size: 12px;
  }

  .controls button.sound-next {
    min-width: 50px;
  }

  .sound-credit {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(61px, calc(env(safe-area-inset-bottom) + 61px));
    width: auto;
    padding: 4px 8px;
    font-size: 10px;
    line-height: 1.2;
    opacity: 0.68;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    pointer-events: none;
  }

  .sound-credit span,
  .sound-credit strong {
    display: inline;
  }

  .sound-credit strong::before {
    content: " - ";
  }

  .meta-links {
    left: clamp(136px, 38vw, 188px);
    top: max(28px, calc(env(safe-area-inset-top) + 28px));
    bottom: auto;
    gap: 12px;
    font-size: 10px;
    opacity: 0.46;
  }

  .wallpaper-panel-inner,
  .legal-panel-inner,
  .contact-panel-inner {
    max-height: 82vh;
    padding: 26px 20px;
  }

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

  .wallpaper-card img {
    height: min(42vh, 300px);
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .endtime-thanks {
    width: calc(100vw - 28px);
    max-height: 88vh;
    padding: 24px 20px;
  }

  .guestbook-form {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox figure {
    width: var(--lightbox-image-width, 94vw);
    height: auto;
  }

  .lightbox figcaption {
    max-height: 28vh;
    overflow-y: auto;
    padding-right: 4px;
    font-size: 13px;
    -webkit-overflow-scrolling: touch;
  }

  .lightbox-voice {
    min-height: 42px;
    padding: 0 14px;
  }

  .lightbox-close {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 860px) and (orientation: portrait) and (pointer: coarse) {
  body.is-intro-complete .orientation-hint {
    display: grid;
  }
}

@media (max-height: 540px) and (orientation: landscape) and (pointer: coarse) {
  .hud {
    padding: 12px 16px;
    opacity: 0.62;
  }

  .focus-card {
    width: min(330px, 38vw);
    margin-bottom: 0;
    transform: translateY(0);
  }

  .focus-card h1,
  .focus-card .narrative {
    display: none;
  }

  .route-status {
    left: auto;
    right: max(14px, env(safe-area-inset-right));
    top: max(18px, calc(env(safe-area-inset-top) + 18px));
    bottom: auto;
    width: min(230px, 34vw);
    font-size: 10px;
    opacity: 0.48;
  }

  .category-nav {
    left: 50%;
    right: auto;
    top: max(8px, env(safe-area-inset-top));
    bottom: auto;
    width: min(560px, calc(100vw - 132px));
    max-width: none;
    transform: translateX(-50%);
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 0 4px;
    opacity: 0.42;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .category-nav::-webkit-scrollbar {
    display: none;
  }

  .category-nav:hover {
    opacity: 0.9;
    transform: translateX(-50%);
  }

  .chip {
    min-height: 34px;
    padding: 0 11px;
    font-size: 10px;
    background: rgba(4, 5, 7, 0.42);
    border-color: rgba(245, 241, 234, 0.18);
  }

  .controls {
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 56px minmax(140px, 220px) 56px;
    justify-content: space-between;
    align-items: end;
    gap: 10px;
    padding: 6px max(14px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.46));
    opacity: 0.56;
    z-index: 6;
  }

  body.is-viewing .controls,
  .controls:hover {
    opacity: 0.82;
    transform: none;
  }

  .controls button {
    min-width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 999px;
    background: rgba(4, 5, 7, 0.42);
    border-color: rgba(245, 241, 234, 0.18);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  }

  .sound-control {
    align-self: end;
    justify-self: center;
    gap: 4px;
  }

  .sound-buttons {
    justify-content: center;
  }

  .controls button#soundToggle {
    min-width: 96px;
    height: 42px;
    padding: 0 12px;
    font-size: 11px;
  }

  .controls button.sound-next {
    min-width: 42px;
    height: 42px;
  }

  .sound-credit {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(52px, calc(env(safe-area-inset-bottom) + 52px));
    width: min(320px, 46vw);
    padding: 3px 8px;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateX(-50%);
    opacity: 0.58;
    background: rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 5;
  }

  .sound-credit:hover {
    opacity: 0.9;
    transform: translateX(-50%);
  }

  .sound-credit span,
  .sound-credit strong {
    display: inline;
  }

  .sound-credit strong::before {
    content: " - ";
  }

  .lightbox {
    place-items: stretch;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .lightbox figure {
    display: block;
    left: var(--lightbox-image-left, 38vw);
    top: var(--lightbox-image-top, 50%);
    width: var(--lightbox-image-width, 58vw);
    height: var(--lightbox-image-height, auto);
    transform: none;
  }

  .lightbox img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }

  .lightbox figcaption {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    top: calc(50% - 32px);
    width: min(292px, 32vw);
    max-height: calc(100vh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 14px 12px 14px 0;
    font-size: 12px;
    line-height: 1.42;
    transform: translateY(calc(-50% + 8px));
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .lightbox.is-caption-visible figcaption {
    transform: translateY(-50%);
  }

  .lightbox.is-closing figcaption {
    transform: translateY(calc(-50% + 10px));
  }

  .lightbox figcaption strong {
    font-size: 14px;
    line-height: 1.2;
  }

  .lightbox-voice {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    top: calc(50% + min(50vh - 56px - env(safe-area-inset-bottom), 186px));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    width: max-content;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
    line-height: 1;
    white-space: nowrap;
    overflow: visible;
    z-index: 11;
    transform: none;
  }

  .lightbox.is-closing .lightbox-voice {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition:
      opacity 220ms ease,
      transform 300ms ease;
  }

  .lightbox-close {
    z-index: 12;
    background: rgba(4, 5, 7, 0.62);
    backdrop-filter: blur(10px);
  }

  .endtime-thanks {
    width: min(620px, calc(100vw - 36px));
    max-height: calc(100vh - 32px);
    padding: 22px 24px;
  }

  .thought-panel {
    --thought-drift-x: 7px;
    --thought-drift-y: 5px;
    left: max(14px, env(safe-area-inset-left));
    top: max(52px, calc(env(safe-area-inset-top) + 52px));
    width: min(520px, calc(100vw - 28px));
    max-height: calc(100vh - 74px - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 18px 20px 20px;
    -webkit-overflow-scrolling: touch;
  }

  .resume-empty-panel {
    top: max(58px, calc(env(safe-area-inset-top) + 58px));
  }

  .thought-panel h2 {
    margin-bottom: 10px;
    font-size: 20px;
  }

  .thought-text {
    font-size: 15px;
    line-height: 1.48;
  }

  .thought-author {
    margin-top: 14px;
  }

  .brand-info {
    left: max(14px, env(safe-area-inset-left));
    top: max(54px, calc(env(safe-area-inset-top) + 54px));
    width: min(680px, calc(100vw - 28px));
    max-height: calc(100vh - 76px - env(safe-area-inset-bottom));
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    overflow-y: auto;
    padding: 16px 18px 18px;
    -webkit-overflow-scrolling: touch;
  }

  .brand-portrait {
    width: 92px;
    height: 92px;
  }

  .brand-name {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .brand-text {
    font-size: 14px;
    line-height: 1.42;
  }

  .brand {
    left: max(12px, env(safe-area-inset-left));
    top: max(8px, env(safe-area-inset-top));
    opacity: 0.58;
  }

  .brand-logo {
    width: min(154px, 22vw);
  }

  .brand:hover {
    opacity: 1;
  }

  .meta-links {
    left: clamp(128px, 24vw, 186px);
    right: auto;
    top: max(18px, calc(env(safe-area-inset-top) + 18px));
    bottom: auto;
    gap: 12px;
    font-size: 10px;
    opacity: 0.46;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox figcaption {
    max-height: 24vh;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.34;
  }

  .lightbox-close {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 920px) and (max-height: 540px) and (orientation: landscape) {
  .route-status {
    left: auto;
    right: max(14px, env(safe-area-inset-right));
    top: max(18px, calc(env(safe-area-inset-top) + 18px));
    bottom: auto;
    width: min(230px, 34vw);
    font-size: 10px;
    opacity: 0.48;
  }

  .meta-links {
    left: clamp(128px, 24vw, 186px);
    right: auto;
    top: max(18px, calc(env(safe-area-inset-top) + 18px));
    bottom: auto;
    gap: 12px;
    font-size: 10px;
    opacity: 0.46;
  }
}

@media (max-width: 420px) {
  .brand {
    left: 14px;
    top: 14px;
  }

  .route-status {
    font-size: 11px;
  }

  .controls button#soundToggle {
    min-width: 104px;
  }
}

body.is-author-info-open .hud,
body.is-author-info-open .category-nav,
body.is-author-info-open .controls,
body.is-author-info-open .sound-credit,
body.is-author-info-open .wallpaper-trigger,
body.is-author-info-open .legal-trigger,
body.is-author-info-open .contact-trigger,
body.is-author-info-open .meta-links,
body.is-author-info-open .wallpaper-panel,
body.is-author-info-open .legal-panel,
body.is-author-info-open .contact-panel,
body.is-author-info-open .route-status,
body.is-author-info-open .orientation-hint,
body.is-author-info-open .fullscreen-prompt,
body.is-author-info-open .loading-state,
body.is-author-info-open .lightbox,
body.is-author-info-open .floating-photo,
body.is-author-info-open .thought-panel,
body.is-author-info-open .endtime-panel {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.is-author-info-open .brand {
  opacity: 1 !important;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .transition-flash,
  .floating-photo.is-active,
  .lightbox,
  .lightbox img,
  .hud,
  .brand,
  .controls {
    transition-duration: 1ms;
  }

  .brand,
  .thought-panel.is-open {
    animation: none;
  }

}
