:root {
  color-scheme: dark;
  --cpg-navy: #002451;
  --cpg-blue: #174e86;
  --cpg-mid: #6a94b2;
  --cpg-light: #c8d6e5;
  --cpg-gray: #a8b2bd;
  --cpg-white: #ffffff;
  --glass: rgb(0 20 46 / 78%);
  --line: rgb(200 214 229 / 28%);
  --font: Aptos, Calibri, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-family: var(--font);
}

* {
  box-sizing: border-box;
}

html,
body,
#tour-shell,
#krpano-viewer {
  width: 100%;
  height: 100%;
  margin: 0;
}

html {
  background: var(--cpg-navy);
}

body {
  overflow: hidden;
  background: var(--cpg-navy);
  color: var(--cpg-white);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cpg-light);
  outline-offset: 3px;
}

#tour-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

#krpano-viewer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #03182f;
}

.viewer-shade {
  position: absolute;
  z-index: 1;
  left: 0;
  width: 100%;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.viewer-shade--top {
  top: 0;
  height: min(36vh, 22rem);
  background: linear-gradient(180deg, rgb(0 20 46 / 82%) 0%, rgb(0 20 46 / 25%) 55%, transparent 100%);
}

.viewer-shade--bottom {
  bottom: 0;
  height: min(46vh, 29rem);
  background: linear-gradient(0deg, rgb(0 15 34 / 94%) 0%, rgb(0 20 46 / 40%) 54%, transparent 100%);
}

.tour-ui {
  z-index: 3;
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    visibility 260ms;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  min-height: 5.9rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: max(1.1rem, env(safe-area-inset-top)) max(1.6rem, env(safe-area-inset-right)) 1rem max(1.6rem, env(safe-area-inset-left));
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.95rem;
  color: inherit;
  text-decoration: none;
}

.brand__mark {
  width: 3.05rem;
  height: 3.05rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand__rule {
  width: 1px;
  height: 2.85rem;
  background: var(--line);
}

.brand__wordmark {
  display: grid;
  gap: 0.12rem;
  line-height: 1;
}

.brand__name {
  color: var(--cpg-white);
  font-size: 1.03rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.brand__group {
  color: var(--cpg-light);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.boundary-editor-launch[hidden],
.boundary-editor[hidden] {
  display: none;
}

.boundary-editor-launch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.boundary-editor {
  position: absolute;
  z-index: 5;
  top: 6.6rem;
  right: max(1.6rem, env(safe-area-inset-right));
  width: min(31rem, calc(100vw - 3.2rem));
  border: 1px solid rgb(245 189 42 / 55%);
  border-radius: 0.75rem;
  padding: 1rem;
  background: rgb(0 20 46 / 94%);
  box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 42%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.boundary-editor.is-drawing {
  width: auto;
  max-width: calc(100vw - 3.2rem);
  padding: 0.55rem;
}

.boundary-editor.is-drawing .boundary-editor__heading,
.boundary-editor.is-drawing .boundary-editor__status,
.boundary-editor.is-drawing .boundary-editor__view,
.boundary-editor.is-drawing .boundary-editor__footer {
  display: none;
}

.boundary-editor__heading,
.boundary-editor__view,
.boundary-editor__actions,
.boundary-editor__footer {
  display: flex;
  align-items: center;
}

.boundary-editor__heading {
  justify-content: space-between;
  gap: 1rem;
}

.boundary-editor__heading h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 520;
}

.boundary-editor__close {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--cpg-white);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.boundary-editor__status {
  margin: 0.75rem 0;
  color: rgb(255 255 255 / 78%);
  font-size: 0.83rem;
  line-height: 1.45;
}

.boundary-editor__view {
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  border: 1px solid rgb(245 189 42 / 28%);
  border-radius: 0.55rem;
  padding: 0.55rem;
  background: rgb(0 36 81 / 58%);
}

#boundary-view-status {
  color: rgb(255 255 255 / 70%);
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: right;
}

.boundary-editor__actions {
  flex-wrap: wrap;
  gap: 0.45rem;
}

.boundary-editor__actions button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgb(23 78 134 / 62%);
  color: var(--cpg-white);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.boundary-editor__actions button:hover:not(:disabled) {
  border-color: rgb(245 189 42 / 75%);
}

.boundary-editor__actions button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.boundary-editor .boundary-editor__primary {
  border-color: rgb(245 189 42 / 76%);
  background: #f5bd2a;
  color: #08131f;
}

.boundary-editor .boundary-editor__primary[aria-pressed="true"] {
  background: #ffffff;
}

.boundary-editor__footer {
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
  color: rgb(255 255 255 / 58%);
  font-size: 0.69rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#boundary-point-count {
  color: #f5bd2a;
  font-weight: 700;
}

.boundary-editor__output {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

#krpano-viewer.is-boundary-drawing,
#krpano-viewer.is-boundary-drawing canvas {
  cursor: crosshair !important;
}

.icon-button,
.scene-arrow,
.ui-restore,
.property-panel__close {
  display: inline-flex;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  background: var(--glass);
  color: var(--cpg-white);
  cursor: pointer;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.icon-button {
  min-height: 2.75rem;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.58rem 0.86rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button:hover,
.scene-arrow:hover,
.ui-restore:hover,
.property-panel__close:hover {
  border-color: rgb(200 214 229 / 60%);
  background: rgb(23 78 134 / 88%);
}

.icon-button svg,
.ui-restore svg {
  width: 1.18rem;
  height: 1.18rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.icon-button--compact {
  width: 2.75rem;
  padding: 0;
}

.fullscreen-exit {
  display: none;
}

:fullscreen .fullscreen-enter {
  display: none;
}

:fullscreen .fullscreen-exit {
  display: block;
}

.property-heading {
  position: absolute;
  top: 7.15rem;
  left: max(1.65rem, env(safe-area-inset-left));
  max-width: 34rem;
  text-shadow: 0 2px 18px rgb(0 0 0 / 40%);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--cpg-light);
  font-size: 0.67rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.property-heading h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.property-heading > p:last-child {
  margin: 0.55rem 0 0;
  color: rgb(255 255 255 / 80%);
  font-size: clamp(0.83rem, 1.35vw, 1.05rem);
  letter-spacing: 0.08em;
}

.scene-arrow {
  position: absolute;
  top: 50%;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  transform: translateY(-50%);
}

.scene-arrow svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.scene-arrow--previous {
  left: max(1.25rem, env(safe-area-inset-left));
}

.scene-arrow--next {
  right: max(1.25rem, env(safe-area-inset-right));
}

.scene-dock {
  position: absolute;
  right: max(1.5rem, env(safe-area-inset-right));
  bottom: max(1.35rem, env(safe-area-inset-bottom));
  left: max(1.5rem, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: minmax(11rem, 0.6fr) minmax(36rem, 2.4fr);
  gap: 1.45rem;
  align-items: end;
}

.scene-dock__intro {
  min-width: 0;
  padding-bottom: 0.35rem;
}

.scene-dock__instruction {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 0.45rem;
  color: rgb(255 255 255 / 76%);
  font-size: 0.78rem;
}

.scene-dock__instruction svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: var(--cpg-light);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.scene-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.scene-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  padding: 0;
  background: rgb(0 20 46 / 70%);
  color: var(--cpg-white);
  cursor: pointer;
  text-align: left;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.scene-card:hover {
  border-color: rgb(200 214 229 / 65%);
  background: rgb(0 36 81 / 88%);
  transform: translateY(-2px);
}

.scene-card.is-active {
  border-color: var(--cpg-light);
  background: rgb(23 78 134 / 90%);
  box-shadow: 0 0 0 1px rgb(200 214 229 / 18%);
}

.scene-card__image {
  position: relative;
  display: block;
  min-height: 4.75rem;
  overflow: hidden;
  background: var(--cpg-blue);
}

.scene-card__image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 35%, rgb(0 36 81 / 42%));
  content: "";
}

.scene-card__image img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.03);
}

.scene-card__number {
  position: absolute;
  z-index: 1;
  bottom: 0.45rem;
  left: 0.5rem;
  color: var(--cpg-white);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.scene-card__copy {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 0.16rem;
  padding: 0.65rem 0.7rem;
}

.scene-card__copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.79rem;
  font-weight: 600;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scene-card__copy span {
  overflow: hidden;
  color: rgb(255 255 255 / 65%);
  font-size: 0.65rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-panel {
  position: absolute;
  z-index: 6;
  top: 0;
  right: 0;
  width: min(30rem, 100%);
  height: 100%;
  overflow: hidden auto;
  background:
    linear-gradient(160deg, rgb(23 78 134 / 24%), transparent 35%),
    var(--cpg-navy);
  box-shadow: -1.5rem 0 4rem rgb(0 0 0 / 30%);
  transform: translateX(103%);
  visibility: hidden;
  transition:
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 360ms;
}

.property-panel.is-open {
  transform: translateX(0);
  visibility: visible;
}

.property-panel__content {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: max(2rem, env(safe-area-inset-top)) max(2.2rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) 2.2rem;
}

.property-panel__close {
  position: absolute;
  z-index: 1;
  top: max(1.2rem, env(safe-area-inset-top));
  right: max(1.2rem, env(safe-area-inset-right));
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
}

.property-panel__close svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.property-panel__mark {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 3.25rem;
  object-fit: contain;
}

.property-panel h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 350;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.property-panel__lede {
  max-width: 24rem;
  margin: 1.35rem 0 2rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.97rem;
  line-height: 1.55;
}

.feature-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.feature-list li {
  display: grid;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 2rem 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.82rem 0;
  color: rgb(255 255 255 / 86%);
  font-size: 0.84rem;
}

.feature-list span {
  color: var(--cpg-mid);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.property-panel__footer {
  display: grid;
  margin-top: auto;
  gap: 0.65rem;
  padding-top: 2.5rem;
}

.property-panel__footer strong {
  color: var(--cpg-light);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
}

.property-panel__credit {
  color: rgb(255 255 255 / 62%);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  line-height: 1.55;
}

.property-panel__footer b {
  color: var(--cpg-mid);
}

.property-panel__footer a {
  width: fit-content;
  color: var(--cpg-white);
  font-size: 0.83rem;
  text-decoration-color: rgb(200 214 229 / 42%);
  text-underline-offset: 0.25rem;
}

.ui-restore {
  position: absolute;
  z-index: 5;
  top: max(1.25rem, env(safe-area-inset-top));
  right: max(1.25rem, env(safe-area-inset-right));
  display: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
}

#tour-shell.ui-hidden .tour-ui,
#tour-shell.ui-hidden .viewer-shade {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#tour-shell.ui-hidden .topbar,
#tour-shell.ui-hidden .property-heading {
  transform: translateY(-1rem);
}

#tour-shell.ui-hidden .scene-dock {
  transform: translateY(1rem);
}

#tour-shell.ui-hidden .ui-restore {
  display: inline-flex;
}

#load-status {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  min-width: 15rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.8rem 1rem;
  background: rgb(0 20 46 / 90%);
  color: var(--cpg-light);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: center;
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

#load-status[data-state="ready"] {
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease 250ms;
}

#load-status[data-state="error"] {
  border-color: #d98b8b;
  color: #ffe1e1;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

#tour-shell.is-embedded .topbar {
  min-height: 4.6rem;
  justify-content: flex-end;
}

#tour-shell.is-embedded .topbar .brand,
#tour-shell.is-embedded .property-heading,
#tour-shell.is-embedded #info-toggle,
#tour-shell.is-embedded .scene-dock__intro {
  display: none;
}

#tour-shell.is-embedded .scene-dock {
  grid-template-columns: 1fr;
}

#tour-shell.is-embedded .viewer-shade--top {
  height: 9rem;
}

@media (max-width: 1040px) {
  .scene-dock {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .scene-dock__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .scene-dock__intro .eyebrow {
    margin: 0;
  }

  .scene-card {
    grid-template-columns: 4.4rem minmax(0, 1fr);
  }

  .scene-card__copy span {
    display: none;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 4.7rem;
    gap: 0.75rem;
    padding-right: max(0.85rem, env(safe-area-inset-right));
    padding-left: max(0.85rem, env(safe-area-inset-left));
  }

  .brand {
    gap: 0.6rem;
  }

  .brand__mark {
    width: 2.3rem;
    height: 2.3rem;
  }

  .brand__rule {
    height: 2.15rem;
  }

  .brand__name {
    font-size: 0.83rem;
  }

  .brand__group {
    font-size: 0.49rem;
    letter-spacing: 0.23em;
  }

  .icon-button {
    width: 2.55rem;
    min-height: 2.55rem;
    padding: 0;
  }

  .icon-button span:not(.sr-only) {
    display: none;
  }

  .icon-button--compact {
    display: none;
  }

  .property-heading {
    top: 5.8rem;
    left: max(1rem, env(safe-area-inset-left));
  }

  .property-heading h1 {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .scene-arrow {
    width: 2.8rem;
    height: 2.8rem;
  }

  .scene-arrow--previous {
    left: max(0.65rem, env(safe-area-inset-left));
  }

  .scene-arrow--next {
    right: max(0.65rem, env(safe-area-inset-right));
  }

  .scene-dock {
    right: 0;
    bottom: max(0.7rem, env(safe-area-inset-bottom));
    left: 0;
    gap: 0.55rem;
  }

  .scene-dock__intro {
    padding: 0 1rem;
  }

  .scene-dock__instruction {
    font-size: 0.7rem;
  }

  .scene-list {
    display: flex;
    overflow-x: auto;
    gap: 0.55rem;
    padding: 0 1rem 0.3rem;
    scroll-padding-inline: 1rem;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }

  .scene-list::-webkit-scrollbar {
    display: none;
  }

  .scene-card {
    min-width: min(72vw, 16.5rem);
    flex: 0 0 auto;
    grid-template-columns: 4.6rem minmax(0, 1fr);
    scroll-snap-align: start;
  }

  .scene-card__copy span {
    display: block;
  }

  .property-panel__content {
    padding-right: max(1.45rem, env(safe-area-inset-right));
    padding-left: max(1.45rem, env(safe-area-inset-left));
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .property-heading {
    top: 5.3rem;
  }

  .property-heading .eyebrow,
  .property-heading > p:last-child,
  .scene-dock__intro {
    display: none;
  }

  .property-heading h1 {
    font-size: 2.4rem;
  }

  .scene-dock {
    grid-template-columns: 1fr;
  }

  .scene-card {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .scene-card__image {
    min-height: 3.6rem;
  }
}

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