:root {
  color-scheme: dark;
  --ink: #eef8ff;
  --muted: #89a2b5;
  --faint: #587083;
  --line: rgba(150, 205, 238, 0.18);
  --cyan: #62ddff;
  --blue: #4f8cff;
  --deep: #071019;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--deep);
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 68% 32%, rgba(25, 94, 128, 0.18), transparent 31rem),
    linear-gradient(145deg, #071019 0%, #08131e 48%, #050b12 100%);
  color: var(--ink);
  font-family: "Sora", "Avenir Next", sans-serif;
  overflow-x: clip;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

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

.desktop-gate {
  display: none;
}

.beta-app {
  min-height: 100vh;
}

.beta-header {
  position: fixed;
  z-index: 500;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(151, 204, 235, 0.12);
  background: linear-gradient(180deg, rgba(5, 12, 19, 0.86), rgba(5, 12, 19, 0.28));
  backdrop-filter: blur(18px);
}

.brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 0 28px rgba(79, 140, 255, 0.22);
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.beta-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a8c0d1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.signal {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.signal::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(98, 221, 255, 0.32);
  border-radius: 50%;
  animation: breathe 2.4s var(--ease) infinite;
}

.header-actions {
  position: relative;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 11px;
}

.session-state {
  color: var(--faint);
}

.header-actions a,
.vault-menu-toggle {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 18, 27, 0.34);
  color: #cde1ee;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.header-actions a:hover,
.vault-menu-toggle:hover,
.vault-menu-toggle[aria-expanded="true"] {
  border-color: rgba(98, 221, 255, 0.48);
  background: rgba(98, 221, 255, 0.06);
}

.vault-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vault-menu-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.vault-menu-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 226px;
  padding: 8px;
  border: 1px solid rgba(142, 198, 226, 0.2);
  border-radius: 12px;
  background: rgba(6, 17, 25, 0.96);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(22px);
}

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

.vault-menu-panel [hidden] {
  display: none !important;
}

.vault-menu-panel a,
.vault-menu-panel button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b9d0dd;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.01em;
  text-align: left;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.vault-menu-panel a:hover,
.vault-menu-panel button:hover {
  background: rgba(98, 221, 255, 0.08);
  color: #f0fbff;
}

.vault-menu-panel .admin-link {
  color: var(--cyan);
}

.vault-menu-divider {
  height: 1px;
  margin: 6px 8px;
  background: rgba(142, 198, 226, 0.12);
}

.vault-login {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(2, 8, 13, 0.74);
  backdrop-filter: blur(14px);
}

.vault-login[hidden] {
  display: none;
}

.vault-login-card {
  width: min(400px, 100%);
  margin: auto 0;
  padding: 28px;
  border: 1px solid rgba(142, 198, 226, 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(98, 221, 255, 0.1), transparent 42%),
    #091722;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.58);
}

.vault-login-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.vault-login-card > p {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.vault-login-card > .vault-modal-kicker {
  margin: 0 0 9px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

body.login-open {
  overflow: hidden;
}

.vault-login-card label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #9ab3c2;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vault-login-card input[type="text"],
.vault-login-card input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(142, 198, 226, 0.2);
  border-radius: 8px;
  outline: 0;
  background: rgba(4, 12, 18, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.vault-login-card input:focus {
  border-color: rgba(98, 221, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(98, 221, 255, 0.08);
}

.remember-choice {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  color: #809cad !important;
  cursor: pointer;
  font-size: 10px !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
}

.remember-choice input {
  accent-color: var(--cyan);
}

.vault-login-error {
  min-height: 17px;
  margin-top: 14px;
  color: #ff9f9f;
  font-size: 11px;
}

.vault-login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 10px;
}

.vault-login-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(142, 198, 226, 0.2);
  border-radius: 8px;
  background: rgba(8, 25, 36, 0.78);
  color: #bed5e2;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.vault-login-actions .login-primary {
  border-color: rgba(98, 221, 255, 0.54);
  background: rgba(32, 110, 144, 0.34);
  color: #effbff;
}

.scroll-shell {
  position: relative;
  min-height: 100vh;
  touch-action: pan-y;
}

.scene {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.scene::before {
  content: "";
  position: absolute;
  z-index: -5;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 19, 0.94) 0%, rgba(5, 12, 19, 0.68) 36%, transparent 58%),
    radial-gradient(circle at calc(72% + var(--drift-x, 0px)) calc(48% + var(--drift-y, 0px)), rgba(51, 132, 176, 0.2), transparent 34%),
    linear-gradient(145deg, #071019 0%, #08131e 45%, #050b12 100%);
}

.star-field {
  position: absolute;
  z-index: -4;
  inset: 0;
  opacity: 0.5;
  background-image:
    radial-gradient(circle, rgba(210, 242, 255, 0.62) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(98, 221, 255, 0.42) 0 1px, transparent 1.5px);
  background-position: 0 0, 41px 67px;
  background-size: 157px 157px, 211px 211px;
  transform: translate3d(0, var(--star-shift, 0px), 0);
  mask-image: linear-gradient(90deg, transparent 20%, #000 60%);
}

.aurora {
  position: absolute;
  z-index: -3;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.11;
  pointer-events: none;
}

.aurora-one {
  right: 1vw;
  top: -22vw;
  background: #43c7ff;
}

.aurora-two {
  right: 18vw;
  bottom: -34vw;
  background: #3b6fff;
}

.depth-grid {
  position: absolute;
  z-index: -2;
  left: 39%;
  right: -12%;
  bottom: -38%;
  height: 74%;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(101, 185, 224, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 185, 224, 0.22) 1px, transparent 1px);
  background-size: 68px 68px;
  transform: perspective(600px) rotateX(67deg) translateY(var(--grid-shift, 0px));
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, transparent 92%);
}

.intro-copy {
  position: absolute;
  z-index: 120;
  left: clamp(40px, 5.2vw, 100px);
  top: 50%;
  width: min(31vw, 510px);
  transform: translateY(-46%);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  color: #88aabe;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 9px rgba(98, 221, 255, 0.72);
}

.eyebrow em {
  font-style: normal;
}

.active-number {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #bed1dd;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.active-number i {
  width: 30px;
  height: 1px;
  background: rgba(190, 209, 221, 0.3);
}

.active-number span:last-child {
  color: var(--faint);
}

.intro-copy h1 {
  max-width: 12ch;
  min-height: 2.1em;
  margin: 0;
  font-size: clamp(42px, 4.6vw, 78px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.active-description {
  max-width: 43ch;
  min-height: 3.2em;
  margin: 24px 0 0;
  color: #8da8b9;
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.65;
}

.project-meta {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.project-meta span {
  padding: 6px 9px;
  border: 1px solid rgba(137, 183, 210, 0.16);
  border-radius: 5px;
  background: rgba(15, 31, 43, 0.45);
  color: #7190a4;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.open-project {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  margin-top: 34px;
  padding: 13px 16px 13px 18px;
  border: 1px solid rgba(98, 221, 255, 0.36);
  border-radius: 6px;
  background: rgba(10, 30, 43, 0.66);
  color: #e9f9ff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: transform 180ms var(--ease), border-color 180ms ease, background 180ms ease;
}

.open-project svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  transition: transform 180ms var(--ease);
}

.open-project:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: rgba(16, 48, 65, 0.82);
}

.open-project:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.open-project:disabled {
  cursor: wait;
  opacity: 0.42;
}

.stage-wrap {
  position: absolute;
  z-index: 50;
  top: 80px;
  right: 0;
  bottom: 0;
  width: 81.25%;
  perspective: 1875px;
  perspective-origin: 58% 49%;
  pointer-events: none;
}

.stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.vault-card {
  --card-glow: 98, 221, 255;
  position: absolute;
  top: 50%;
  left: 60.8%;
  width: clamp(412.5px, 32.5vw, 780px);
  aspect-ratio: 1.55;
  overflow: hidden;
  border: 1px solid rgba(164, 210, 234, 0.18);
  border-radius: 18px;
  background: #0c1721;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.4),
    inset 0 1px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  opacity: 0;
  pointer-events: auto;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform, opacity, filter;
  touch-action: pan-y;
}

.vault-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 22%),
    linear-gradient(180deg, transparent 45%, rgba(3, 9, 14, 0.88) 100%);
  pointer-events: none;
}

.vault-card::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  border: 1px solid rgba(var(--card-glow), 0);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0);
  pointer-events: none;
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.vault-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 500ms var(--ease), filter 300ms ease;
}

.vault-card .card-wash {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 18, 0.2), transparent 60%),
    radial-gradient(circle at 80% 15%, rgba(var(--card-glow), 0.16), transparent 36%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.vault-card .card-index {
  position: absolute;
  z-index: 6;
  top: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(232, 249, 255, 0.72);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.vault-card .card-index::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--cyan);
}

.vault-card .card-caption {
  position: absolute;
  z-index: 6;
  right: 20px;
  bottom: 17px;
  left: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.vault-card .card-caption strong {
  max-width: 80%;
  overflow: hidden;
  color: #f3fbff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.vault-card .card-caption span {
  width: 31px;
  height: 31px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(232, 249, 255, 0.28);
  border-radius: 50%;
  background: rgba(6, 15, 22, 0.44);
  backdrop-filter: blur(8px);
}

.vault-card .card-caption svg {
  width: 13px;
  fill: none;
  stroke: #dff7ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.vault-card.is-active {
  border-color: rgba(var(--card-glow), 0.58);
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.58),
    0 0 62px rgba(var(--card-glow), 0.12),
    inset 0 1px rgba(255, 255, 255, 0.11);
}

.vault-card.is-active::after {
  border-color: rgba(var(--card-glow), 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.vault-card:hover img {
  transform: scale(1.055);
}

.vault-card.is-active:hover::after {
  border-color: rgba(var(--card-glow), 0.72);
}

.scroll-hint {
  position: absolute;
  z-index: 130;
  bottom: 38px;
  left: clamp(40px, 5.2vw, 100px);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-hint i {
  position: relative;
  width: 34px;
  height: 1px;
  overflow: hidden;
  background: rgba(119, 155, 178, 0.2);
}

.scroll-hint b {
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform: translateX(-100%);
  animation: sweep 2s var(--ease) infinite;
}

.progress-dock {
  position: absolute;
  z-index: 130;
  right: 40px;
  bottom: 34px;
  width: min(26vw, 360px);
}

.progress-track {
  height: 1px;
  overflow: hidden;
  background: rgba(133, 178, 203, 0.18);
}

.progress-track span {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #4f8cff, #62ddff);
  box-shadow: 0 0 10px rgba(98, 221, 255, 0.5);
  transform: scaleX(0);
  transform-origin: left center;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-copy span:first-child {
  max-width: 75%;
  overflow: hidden;
  color: #8ea9ba;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-rail {
  display: none;
}

.key-hint {
  position: absolute;
  z-index: 130;
  top: 105px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4f6879;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.key-hint kbd {
  min-width: 22px;
  padding: 4px 6px;
  border: 1px solid rgba(137, 183, 210, 0.16);
  border-radius: 4px;
  background: rgba(8, 20, 29, 0.7);
  color: #8eaabc;
  font: inherit;
  text-align: center;
}

.key-hint span + kbd {
  margin-left: 7px;
}

.toast {
  position: fixed;
  z-index: 700;
  left: 50%;
  bottom: 36px;
  max-width: min(430px, 88vw);
  padding: 12px 16px;
  border: 1px solid rgba(255, 93, 106, 0.9);
  border-radius: 8px;
  background: rgba(112, 15, 27, 0.97);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.44),
    0 0 24px rgba(255, 50, 70, 0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 200ms ease, transform 300ms var(--ease);
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes breathe {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 0.8; transform: scale(1.15); }
}

@keyframes sweep {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}

@media (max-width: 1320px) {
  .intro-copy {
    left: 40px;
    width: 33vw;
  }

  .stage-wrap {
    width: 80%;
  }

  .vault-card {
    left: 59%;
    width: clamp(387.5px, 33.75vw, 487.5px);
  }
}

@media (min-width: 1100px) and (max-height: 720px) {
  .beta-header {
    height: 72px;
  }

  .stage-wrap {
    top: 72px;
  }

  .intro-copy {
    top: 51%;
  }

  .eyebrow {
    margin-bottom: 18px;
  }

  .active-number {
    margin-bottom: 12px;
  }

  .intro-copy h1 {
    font-size: clamp(36px, 4vw, 58px);
  }

  .active-description {
    margin-top: 18px;
  }

  .project-meta {
    margin-top: 14px;
  }

  .open-project {
    margin-top: 20px;
  }

  .key-hint {
    top: 92px;
  }

  .scroll-hint,
  .progress-dock {
    bottom: 18px;
  }
}

@media (max-width: 1099px) {
  body {
    min-height: 100vh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.mobile-mode {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
  }

  .beta-app {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
  }

  .scroll-shell {
    height: 100vh !important;
    height: 100svh !important;
    min-height: 100svh;
    touch-action: none;
  }

  .beta-header {
    height: calc(64px + env(safe-area-inset-top));
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: env(safe-area-inset-top) 18px 0;
    background: linear-gradient(180deg, rgba(5, 12, 19, 0.94), rgba(5, 12, 19, 0.34));
  }

  .brand {
    gap: 9px;
  }

  .brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .brand strong {
    font-size: 12px;
  }

  .brand small {
    font-size: 8px;
  }

  .beta-label,
  .session-state {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .header-actions a,
  .vault-menu-toggle {
    padding: 8px 12px;
    font-size: 10px;
  }

  .vault-menu-toggle span {
    display: none;
  }

  .vault-menu-panel {
    top: calc(100% + 10px);
    width: min(226px, calc(100vw - 36px));
  }

  .scene {
    height: 100vh;
    height: 100svh;
    touch-action: none;
  }

  .scene::before {
    background:
      linear-gradient(180deg, rgba(5, 12, 19, 0.1) 0%, rgba(5, 12, 19, 0.1) 42%, rgba(5, 12, 19, 0.92) 72%),
      radial-gradient(circle at calc(50% + var(--drift-x, 0px)) calc(26% + var(--drift-y, 0px)), rgba(51, 132, 176, 0.24), transparent 42%),
      linear-gradient(145deg, #071019 0%, #08131e 45%, #050b12 100%);
  }

  .star-field {
    opacity: 0.42;
    mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 90%);
  }

  .aurora {
    width: 78vw;
    height: 78vw;
    filter: blur(70px);
  }

  .aurora-one {
    right: -26vw;
    top: -30vw;
  }

  .aurora-two {
    right: 35vw;
    bottom: -24vw;
  }

  .depth-grid {
    left: -25%;
    right: -25%;
    bottom: 24%;
    height: 46%;
    opacity: 0.16;
    background-size: 48px 48px;
  }

  .stage-wrap {
    top: calc(64px + env(safe-area-inset-top));
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 45svh;
    perspective: 940px;
    perspective-origin: 50% 48%;
  }

  .vault-card {
    top: 50%;
    left: 50%;
    width: min(calc(100vw - 44px), 430px);
    border-radius: 14px;
    box-shadow:
      0 22px 64px rgba(0, 0, 0, 0.48),
      inset 0 1px rgba(255, 255, 255, 0.06);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout paint style;
    isolation: isolate;
    transform-style: flat;
    touch-action: none;
  }

  .vault-card img {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .vault-card .card-wash {
    mix-blend-mode: normal;
  }

  .vault-card .card-caption span {
    backdrop-filter: none;
  }

  .vault-card.is-active {
    box-shadow:
      0 28px 84px rgba(0, 0, 0, 0.62),
      0 0 44px rgba(var(--card-glow), 0.11),
      inset 0 1px rgba(255, 255, 255, 0.1);
  }

  .vault-card .card-index {
    top: 14px;
    left: 15px;
  }

  .vault-card .card-caption {
    right: 15px;
    bottom: 13px;
    left: 15px;
  }

  .vault-card .card-caption strong {
    font-size: 15px;
  }

  .vault-card .card-caption span {
    width: 28px;
    height: 28px;
  }

  .intro-copy {
    top: 51%;
    right: 22px;
    left: 22px;
    width: auto;
    transform: none;
  }

  .intro-copy::before {
    display: none;
  }

  .intro-copy .eyebrow {
    margin-bottom: 10px;
    font-size: 8px;
    letter-spacing: 0.17em;
  }

  .intro-copy .eyebrow span {
    width: 20px;
  }

  .active-number {
    margin-bottom: 9px;
    font-size: 9px;
  }

  .intro-copy h1 {
    max-width: 15ch;
    min-height: 1.9em;
    font-size: clamp(30px, 8.7vw, 45px);
    line-height: 1;
    letter-spacing: -0.055em;
  }

  .active-description {
    max-width: 46ch;
    min-height: 3em;
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
  }

  .project-meta {
    flex-wrap: wrap;
    margin-top: 12px;
  }

  .project-meta span {
    padding: 5px 7px;
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .open-project {
    gap: 22px;
    min-height: 42px;
    margin-top: 15px;
    padding: 10px 13px 10px 15px;
    font-size: 10px;
  }

  .scroll-hint,
  .progress-dock {
    display: none;
  }

  .mobile-rail:not([hidden]) {
    --rail-progress: 0%;
    position: absolute;
    z-index: 220;
    right: 22px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 22px;
    display: block;
    padding: 10px 12px 8px;
    border: 1px solid rgba(117, 196, 231, 0.15);
    border-radius: 12px;
    background:
      linear-gradient(180deg, rgba(14, 34, 47, 0.82), rgba(6, 17, 25, 0.9)),
      radial-gradient(circle at var(--rail-progress) 100%, rgba(98, 221, 255, 0.12), transparent 34%);
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.38),
      inset 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
  }

  .mobile-rail-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #648195;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .mobile-rail-copy > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }

  .mobile-rail-copy i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(98, 221, 255, 0.8);
  }

  .mobile-rail-copy b {
    color: #d8f3ff;
    font-weight: 600;
  }

  .mobile-rail-control {
    position: relative;
    height: 34px;
    margin-top: 5px;
    background:
      radial-gradient(circle at left center, rgba(98, 221, 255, 0.7) 0 2px, transparent 3px),
      radial-gradient(circle at right center, rgba(98, 221, 255, 0.28) 0 2px, transparent 3px);
  }

  .mobile-rail-control::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 2px;
    left: 2px;
    height: 2px;
    border-radius: 2px;
    background: rgba(113, 169, 198, 0.2);
    transform: translateY(-50%);
  }

  .mobile-rail-fill {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 2px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #4f8cff, #62ddff);
    box-shadow: 0 0 12px rgba(98, 221, 255, 0.62);
    transform: translateY(-50%);
    pointer-events: none;
  }

  #mobileRailInput {
    position: absolute;
    z-index: 2;
    inset: 0;
    width: 100%;
    height: 34px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    cursor: grab;
    touch-action: none;
  }

  #mobileRailInput:active {
    cursor: grabbing;
  }

  #mobileRailInput:focus-visible {
    border-radius: 8px;
    outline: 2px solid rgba(98, 221, 255, 0.72);
    outline-offset: 3px;
  }

  #mobileRailInput::-webkit-slider-runnable-track {
    height: 34px;
    border: 0;
    background: transparent;
  }

  #mobileRailInput::-webkit-slider-thumb {
    width: 54px;
    height: 30px;
    margin-top: 2px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(98, 221, 255, 0.62);
    border-radius: 999px;
    background:
      linear-gradient(
        90deg,
        transparent 17px,
        rgba(98, 221, 255, 0.62) 17px 19px,
        transparent 19px 25px,
        rgba(98, 221, 255, 0.62) 25px 27px,
        transparent 27px 33px,
        rgba(98, 221, 255, 0.62) 33px 35px,
        transparent 35px
      ),
      linear-gradient(180deg, #17384a, #081720);
    box-shadow:
      0 0 0 4px rgba(98, 221, 255, 0.05),
      0 5px 18px rgba(0, 0, 0, 0.42),
      inset 0 1px rgba(255, 255, 255, 0.12);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease);
  }

  #mobileRailInput::-moz-range-track {
    height: 34px;
    border: 0;
    background: transparent;
  }

  #mobileRailInput::-moz-range-thumb {
    width: 54px;
    height: 30px;
    border: 1px solid rgba(98, 221, 255, 0.62);
    border-radius: 999px;
    background: linear-gradient(180deg, #17384a, #081720);
    box-shadow:
      0 0 0 4px rgba(98, 221, 255, 0.05),
      0 5px 18px rgba(0, 0, 0, 0.42);
  }

  .mobile-rail.is-dragging #mobileRailInput::-webkit-slider-thumb {
    border-color: var(--cyan);
    box-shadow:
      0 0 0 7px rgba(98, 221, 255, 0.09),
      0 0 28px rgba(98, 221, 255, 0.28),
      0 7px 20px rgba(0, 0, 0, 0.48),
      inset 0 1px rgba(255, 255, 255, 0.16);
    transform: scale(1.06);
  }

  .key-hint {
    display: none;
  }

  .toast {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 1099px) and (max-height: 740px) and (orientation: portrait) {
  .stage-wrap {
    height: 42svh;
  }

  .vault-card {
    width: min(calc(100vw - 70px), 340px);
  }

  .intro-copy {
    top: 47%;
  }

  .intro-copy .eyebrow {
    margin-bottom: 7px;
  }

  .active-number {
    margin-bottom: 6px;
  }

  .intro-copy h1 {
    min-height: 1.75em;
    font-size: clamp(27px, 7.8vw, 36px);
  }

  .active-description {
    max-height: 3.1em;
    min-height: 3.1em;
    margin-top: 8px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.45;
  }

  .project-meta {
    margin-top: 8px;
  }

  .open-project {
    min-height: 38px;
    margin-top: 10px;
    padding-block: 8px;
  }
}

@media (max-width: 1099px) and (orientation: landscape) {
  .beta-header {
    height: calc(56px + env(safe-area-inset-top));
    padding-right: calc(18px + env(safe-area-inset-right));
    padding-left: calc(18px + env(safe-area-inset-left));
  }

  .brand small {
    display: none;
  }

  .stage-wrap {
    top: calc(56px + env(safe-area-inset-top));
    right: 0;
    bottom: 0;
    left: auto;
    width: 58%;
    height: auto;
    perspective: 850px;
  }

  .vault-card {
    width: min(44vw, 310px);
  }

  .intro-copy {
    top: 50%;
    right: auto;
    left: calc(22px + env(safe-area-inset-left));
    width: 38%;
    transform: translateY(-44%);
  }

  .intro-copy h1 {
    min-height: 1.8em;
    font-size: clamp(26px, 4.4vw, 38px);
  }

  .active-description {
    max-height: 3.1em;
    min-height: 3.1em;
    overflow: hidden;
    font-size: 10px;
  }

  .project-meta {
    margin-top: 8px;
  }

  .open-project {
    min-height: 36px;
    margin-top: 10px;
    padding-block: 7px;
  }

  .mobile-rail:not([hidden]) {
    left: 44%;
    right: calc(18px + env(safe-area-inset-right));
    bottom: calc(8px + env(safe-area-inset-bottom));
    padding: 7px 10px 5px;
  }

  .mobile-rail-copy {
    font-size: 6px;
  }

  .mobile-rail-control {
    height: 30px;
    margin-top: 2px;
  }

  #mobileRailInput {
    height: 30px;
  }

  #mobileRailInput::-webkit-slider-runnable-track {
    height: 30px;
  }

  #mobileRailInput::-webkit-slider-thumb {
    height: 26px;
  }
}

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