.spatial-page .scene-index {
  top: 50%;
  right: 20px;
  bottom: auto;
  display: grid;
  grid-template-rows: repeat(7, 44px);
  gap: 0;
  width: 56px;
  height: 308px;
  padding: 0;
  transform: translateY(-50%);
}

.spatial-page .scene-index::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 27px;
  width: 1px;
  background: rgba(218, 230, 247, 0.2);
}

.spatial-page .scene-index button {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 18px;
  align-items: center;
  width: 56px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.spatial-page .scene-index button span {
  grid-column: 2;
  justify-self: center;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(218, 230, 247, 0.52);
  border-radius: 50%;
  background: #05070d;
  transition: width 220ms ease, height 220ms ease, border-color 220ms ease, background 220ms ease;
}

.spatial-page .scene-index button small {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  margin-right: 2px;
  color: rgba(218, 230, 247, 0.44);
  font-size: 14px;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 220ms ease, transform 220ms ease, color 220ms ease;
}

.spatial-page .scene-index button:hover small,
.spatial-page .scene-index button:focus-visible small,
.spatial-page .scene-index button.is-active small {
  color: rgba(238, 243, 255, 0.88);
  opacity: 1;
  transform: translateX(0);
}

.spatial-page .scene-index button:hover span,
.spatial-page .scene-index button:focus-visible span,
.spatial-page .scene-index button.is-active span {
  width: 8px;
  height: 8px;
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(97, 230, 255, 0.62);
}

.spatial-page .scene-index__progress {
  position: absolute;
  z-index: 1;
  top: 22px;
  bottom: 22px;
  left: 27px;
  width: 1px;
  height: auto !important;
  background: transparent;
  pointer-events: none;
}

.spatial-page .scene-index__progress::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: var(--scene-position, 0%);
  background: linear-gradient(180deg, rgba(76, 125, 255, 0.58), var(--cyan));
  box-shadow: 0 0 8px rgba(97, 230, 255, 0.34);
  transition: height 720ms cubic-bezier(0.2, 0.78, 0.18, 1);
}

.spatial-page .scene-index__progress::after {
  content: "";
  position: absolute;
  top: var(--scene-position, 0%);
  left: 50%;
  width: 3px;
  height: 22px;
  border-radius: 3px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(97, 230, 255, 0.6);
  transform: translate(-50%, -50%);
  transition: top 720ms cubic-bezier(0.2, 0.78, 0.18, 1);
}

.spatial-page[data-scene="2"] .scroll-cue,
.spatial-page[data-scene="3"] .scroll-cue,
.spatial-page[data-scene="4"] .scroll-cue,
.spatial-page[data-scene="5"] .scroll-cue,
.spatial-page[data-scene="6"] .scroll-cue,
.spatial-page[data-scene="7"] .scroll-cue {
  opacity: 0;
  pointer-events: none;
}

.proposal-trigger {
  position: absolute;
  z-index: 18;
  bottom: 22px;
  left: calc(clamp(40px, 7.3vw, 140px) + 108px);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  min-width: 238px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(97, 230, 255, 0.36);
  background: rgba(5, 13, 22, 0.7);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: color 220ms ease, background 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.proposal-trigger:hover,
.proposal-trigger:focus-visible {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #05070d;
  transform: translateY(-2px);
}

.proposal-trigger:focus-visible,
.proposal-panel button:focus-visible,
.proposal-panel input:focus-visible,
.proposal-panel textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.proposal-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 140;
  width: min(48vw, 720px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--ink);
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.proposal-panel[open] {
  display: block;
}

.proposal-panel.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.proposal-panel::backdrop {
  background: rgba(2, 4, 8, 0.24);
  backdrop-filter: blur(2px);
}

.proposal-panel__surface {
  width: 100%;
  height: 100%;
  padding: 42px clamp(28px, 4vw, 58px) 48px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid rgba(97, 230, 255, 0.24);
  background: rgba(5, 10, 18, 0.88);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(20px) saturate(1.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(97, 230, 255, 0.38) transparent;
}

.proposal-panel__surface::-webkit-scrollbar {
  width: 5px;
}

.proposal-panel__surface::-webkit-scrollbar-thumb {
  background: rgba(97, 230, 255, 0.38);
}

.proposal-panel__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: start;
  gap: 28px;
  margin-bottom: 34px;
}

.proposal-panel__header p {
  margin: 0 0 6px;
  color: rgba(206, 218, 236, 0.56);
  font-size: 14px;
}

.proposal-panel__header strong {
  display: block;
  margin-bottom: 22px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: 500;
}

.proposal-panel__header h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.proposal-panel__header h2:focus {
  outline: none;
}

.proposal-panel__close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(218, 230, 247, 0.22);
  border-radius: 50%;
  background: rgba(5, 13, 22, 0.54);
  color: rgba(238, 243, 255, 0.82);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 220ms ease, background 220ms ease, color 220ms ease, transform 220ms ease;
}

.proposal-panel__close:hover {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #05070d;
  transform: rotate(4deg);
}

.proposal-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.proposal-form__progress {
  --proposal-progress: 33.333%;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(218, 230, 247, 0.15);
}

.proposal-form__progress > button {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 56px;
  padding: 0 8px 14px 0;
  border: 0;
  background: transparent;
  color: rgba(206, 218, 236, 0.45);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: color 220ms ease;
}

.proposal-form__progress > button span {
  color: rgba(97, 230, 255, 0.52);
  font-size: 14px;
  letter-spacing: 0.12em;
}

.proposal-form__progress > button.is-active,
.proposal-form__progress > button.is-complete {
  color: var(--ink);
}

.proposal-form__progress > button:disabled {
  cursor: default;
}

.proposal-form__progress > i {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: var(--proposal-progress);
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 10px rgba(97, 230, 255, 0.34);
  transition: width 220ms ease;
}

.proposal-form__steps {
  position: relative;
}

.proposal-form__step {
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

.proposal-form__step.is-active {
  max-height: 1400px;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.proposal-form__step > legend {
  width: 100%;
  margin: 0 0 26px;
  padding: 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
}

.proposal-fields {
  display: grid;
  gap: 22px;
}

.proposal-fields--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proposal-field--wide {
  grid-column: 1 / -1;
}

.proposal-fields label,
.proposal-message {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.proposal-fields label > span,
.proposal-message > span,
.proposal-choice > legend {
  color: rgba(218, 230, 247, 0.72);
  font-size: 14px;
  line-height: 1.45;
}

.proposal-fields b,
.proposal-message b,
.proposal-choice b {
  margin-left: 3px;
  color: var(--cyan);
  font-weight: 500;
}

.proposal-fields input,
.proposal-message textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(218, 230, 247, 0.22);
  border-radius: 0;
  background: rgba(5, 13, 22, 0.18);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.45;
  transition: border-color 220ms ease, background 220ms ease;
}

.proposal-fields input {
  height: 48px;
  padding: 8px 0;
}

.proposal-message textarea {
  min-height: 132px;
  padding: 12px;
  border: 1px solid rgba(218, 230, 247, 0.2);
  resize: vertical;
}

.proposal-fields input::placeholder,
.proposal-message textarea::placeholder {
  color: rgba(206, 218, 236, 0.36);
}

.proposal-fields input:focus,
.proposal-message textarea:focus {
  border-color: var(--cyan);
  background: rgba(7, 20, 33, 0.46);
}

.proposal-choice {
  margin: 30px 0 0;
  padding: 0;
  border: 0;
}

.proposal-choice > legend {
  margin-bottom: 10px;
  padding: 0;
}

.proposal-choice > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.proposal-choice label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid rgba(218, 230, 247, 0.13);
  color: rgba(218, 230, 247, 0.72);
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.proposal-choice input,
.proposal-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--cyan);
}

.proposal-message {
  margin-top: 28px;
}

.proposal-consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-top: 22px;
  color: rgba(206, 218, 236, 0.62);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.proposal-consent input {
  margin-top: 2px;
}

.proposal-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(218, 230, 247, 0.13);
}

.proposal-back,
.proposal-next,
.proposal-submit,
.proposal-success button {
  min-height: 50px;
  padding: 0 20px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: color 220ms ease, background 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.proposal-back {
  border: 0;
  background: transparent;
  color: rgba(218, 230, 247, 0.62);
}

.proposal-next,
.proposal-submit,
.proposal-success button {
  border: 1px solid rgba(97, 230, 255, 0.42);
  background: rgba(5, 13, 22, 0.44);
  color: var(--ink);
}

.proposal-next:hover,
.proposal-submit:hover,
.proposal-success button:hover {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #05070d;
  transform: translateY(-2px);
}

.proposal-submit:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.proposal-error {
  margin: 18px 0 0;
  color: #ff9a9a;
  font-size: 14px;
  line-height: 1.5;
}

.proposal-success {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.proposal-success.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.proposal-success > p:first-child {
  margin: 0 0 16px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
}

.proposal-success h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.12;
}

.proposal-success > div {
  display: grid;
  gap: 6px;
  margin: 30px 0;
  padding: 18px 0;
  border-top: 1px solid rgba(218, 230, 247, 0.15);
  border-bottom: 1px solid rgba(218, 230, 247, 0.15);
}

.proposal-success > div span,
.proposal-success > p {
  color: rgba(206, 218, 236, 0.62);
  font-size: 14px;
  line-height: 1.55;
}

.proposal-success > div strong {
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 500;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .spatial-page .scene-index {
    display: none;
  }

  .proposal-trigger {
    position: relative;
    bottom: auto;
    left: auto;
    align-self: flex-start;
    width: 100%;
    margin-top: 28px;
  }

  .proposal-panel {
    position: relative;
    inset: auto;
    z-index: 30;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 100svh;
    max-height: none;
    margin: 0;
    opacity: 0;
    transform: translateY(22px);
  }

  .proposal-panel.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .proposal-panel__surface {
    display: grid;
    align-content: center;
    min-height: 100svh;
    height: auto;
    padding: 72px 24px;
    overflow: visible;
    border-top: 1px solid rgba(97, 230, 255, 0.24);
    border-left: 0;
    background: rgba(5, 10, 18, 0.97);
    box-shadow: none;
    backdrop-filter: none;
  }

  .proposal-panel__header h2 {
    font-size: 34px;
  }

  .proposal-fields--two,
  .proposal-choice > div {
    grid-template-columns: 1fr;
  }

  .proposal-field--wide {
    grid-column: auto;
  }

  .proposal-form__actions {
    justify-content: stretch;
  }

  .proposal-back,
  .proposal-next,
  .proposal-submit {
    flex: 1 1 0;
  }
}

@media (max-width: 430px) {
  .proposal-panel__header {
    gap: 18px;
  }

  .proposal-form__progress > button {
    font-size: 14px;
  }

  .proposal-form__actions {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spatial-page .scene-index *,
  .proposal-trigger,
  .proposal-panel,
  .proposal-panel *,
  .proposal-success {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
