:root {
  color-scheme: dark;
  --ink: #f4fbff;
  --muted: rgba(226, 240, 248, 0.72);
  --line: rgba(255, 255, 255, 0.18);
  --glass: rgba(4, 16, 25, 0.58);
  --cyan: #75e6ef;
  --cyan-bright: #b9fbff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #061019;
  font-family: Pretendard, "Noto Sans KR", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.vr-shell,
.panorama {
  position: relative;
  width: 100%;
  height: 100%;
}

.panorama {
  position: absolute;
  inset: 0;
  background: #0a1720;
}

.scene-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 10, 17, 0.62) 0%, transparent 26%, transparent 67%, rgba(2, 10, 17, 0.45) 100%),
    linear-gradient(90deg, rgba(2, 10, 17, 0.35), transparent 34%, transparent 70%, rgba(2, 10, 17, 0.12));
}

.brand-bar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: max(24px, env(safe-area-inset-top)) clamp(22px, 4vw, 68px) 0;
  pointer-events: none;
}

.global-nav {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 42px);
  transform: translateX(-50%);
  pointer-events: auto;
  transition: opacity 220ms ease;
}

.nav-link {
  position: relative;
  padding: 11px 1px;
  border: 0;
  background: transparent;
  color: rgba(240, 249, 252, 0.62);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  content: "";
  transition: transform 220ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  outline: none;
  color: #fff;
}

.nav-link.is-active::after,
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  transition: opacity 220ms ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
  pointer-events: auto;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(185, 251, 255, 0.72);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  position: absolute;
  width: 18px;
  height: 8px;
  border: 1.5px solid var(--cyan-bright);
  border-radius: 50%;
  content: "";
}

.brand-mark::before {
  transform: rotate(60deg);
}

.brand-mark::after {
  transform: rotate(-60deg);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.2em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.21em;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 17, 25, 0.34);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  backdrop-filter: blur(14px);
}

.live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(117, 230, 239, 0.13), 0 0 12px var(--cyan);
}

.menu-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 17, 25, 0.34);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: background 180ms ease, transform 300ms ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle span {
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: transform 260ms ease;
}

.menu-toggle.is-open span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle.is-open span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.intro {
  position: absolute;
  top: 50%;
  left: clamp(24px, 7vw, 118px);
  z-index: 4;
  width: min(520px, calc(100% - 48px));
  transform: translateY(-45%);
  color: var(--ink);
  pointer-events: none;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--cyan-bright);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.27em;
}

.eyebrow::before {
  width: 42px;
  height: 1px;
  background: var(--cyan);
  content: "";
}

.intro h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 72px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.intro-copy {
  max-width: 410px;
  margin: 24px 0 0;
  color: rgba(240, 249, 252, 0.82);
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.8;
  word-break: keep-all;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-height: 48px;
  margin-top: 30px;
  padding: 0 20px;
  border: 1px solid rgba(185, 251, 255, 0.4);
  border-radius: 2px;
  background: rgba(6, 20, 29, 0.33);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  pointer-events: auto;
  cursor: pointer;
  backdrop-filter: blur(9px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  outline: none;
  border-color: var(--cyan-bright);
  background: rgba(26, 84, 98, 0.38);
  transform: translateY(-2px);
}

.primary-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--cyan-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.section-indicator {
  position: absolute;
  bottom: clamp(28px, 4vw, 55px);
  left: clamp(24px, 4vw, 68px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(255, 255, 255, 0.66);
  pointer-events: none;
}

.section-indicator span {
  color: var(--cyan-bright);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.section-indicator i {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), rgba(117, 230, 239, 0.1));
}

.section-indicator p {
  margin: 0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.info-panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 12;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(520px, 46vw);
  height: 100%;
  padding: clamp(28px, 4vw, 58px);
  border-left: 1px solid rgba(185, 251, 255, 0.16);
  background: linear-gradient(145deg, rgba(5, 19, 29, 0.92), rgba(3, 12, 19, 0.97));
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.25);
  color: #fff;
  transform: translateX(104%);
  visibility: hidden;
  overflow: hidden;
  backdrop-filter: blur(24px);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), visibility 520ms;
}

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

.panel-glow {
  position: absolute;
  top: 12%;
  right: -140px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(61, 218, 230, 0.1);
  filter: blur(40px);
  pointer-events: none;
}

.panel-head,
.panel-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-head p {
  margin: 0;
  color: var(--cyan-bright);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.panel-head button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.panel-head svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.5;
}

.panel-content {
  position: relative;
  z-index: 1;
  align-self: center;
}

.panel-number {
  margin: 0 0 17px;
  color: rgba(117, 230, 239, 0.38);
  font: 300 clamp(34px, 4vw, 58px)/1 Inter, sans-serif;
}

.panel-content h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 46px);
  font-weight: 550;
  line-height: 1.16;
  letter-spacing: -0.055em;
  word-break: keep-all;
}

.panel-summary {
  margin: 24px 0 32px;
  color: rgba(232, 244, 249, 0.7);
  font-size: 14px;
  line-height: 1.85;
  word-break: keep-all;
}

.panel-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.panel-points li {
  position: relative;
  padding: 17px 8px 17px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(245, 251, 253, 0.9);
  font-size: 12px;
}

.panel-points li::before {
  position: absolute;
  top: 22px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
  content: "";
}

.panel-foot {
  gap: 14px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.panel-progress {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.panel-progress i {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 350ms ease;
}

.panel-foot button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  cursor: pointer;
}

.panel-foot button span {
  margin-left: 7px;
  color: var(--cyan);
}

.menu-drawer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  grid-template-rows: 1fr auto;
  gap: 50px;
  padding: clamp(110px, 13vh, 160px) clamp(28px, 8vw, 130px) clamp(32px, 6vh, 64px);
  background: rgba(3, 13, 21, 0.95);
  color: #fff;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(28px);
  transition: opacity 350ms ease, visibility 350ms;
}

.menu-drawer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.menu-open .brand-bar {
  z-index: 15;
}

.panel-open .control-panel,
.panel-open .scroll-hint,
.panel-open .global-nav,
.panel-open .header-actions {
  opacity: 0;
  pointer-events: none;
}

.menu-drawer-grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(117, 230, 239, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 230, 239, 0.09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
  pointer-events: none;
}

.menu-drawer-copy,
.drawer-nav,
.menu-drawer footer {
  position: relative;
  z-index: 1;
}

.menu-drawer-copy {
  align-self: center;
}

.menu-drawer-copy p {
  margin: 0 0 19px;
  color: var(--cyan-bright);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.menu-drawer-copy h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 70px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.06em;
}

.drawer-nav {
  align-self: center;
  border-top: 1px solid var(--line);
}

.drawer-nav button {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  width: 100%;
  padding: 20px 5px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: padding 200ms ease, background 200ms ease;
}

.drawer-nav button:hover,
.drawer-nav button:focus-visible {
  outline: none;
  padding-inline: 15px;
  background: rgba(117, 230, 239, 0.06);
}

.drawer-nav span,
.drawer-nav small {
  color: rgba(185, 251, 255, 0.5);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.drawer-nav strong {
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.menu-drawer footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ecogen-hotspot {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(185, 251, 255, 0.86);
  border-radius: 50%;
  background: rgba(8, 35, 45, 0.36);
  box-shadow: 0 0 0 7px rgba(117, 230, 239, 0.09), 0 0 28px rgba(117, 230, 239, 0.4);
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.ecogen-hotspot::before,
.ecogen-hotspot::after {
  position: absolute;
  content: "";
}

.ecogen-hotspot::before {
  inset: 9px;
  border-radius: 50%;
  background: var(--cyan-bright);
  box-shadow: 0 0 9px var(--cyan);
}

.ecogen-hotspot::after {
  inset: -8px;
  border: 1px solid rgba(117, 230, 239, 0.24);
  border-radius: 50%;
  animation: hotspotPulse 2s ease-out infinite;
}

.hotspot-label {
  position: absolute;
  top: 50%;
  left: 43px;
  display: grid;
  min-width: 136px;
  padding: 10px 13px;
  border-left: 1px solid var(--cyan);
  background: linear-gradient(90deg, rgba(5, 20, 29, 0.78), rgba(5, 20, 29, 0.08));
  color: #fff;
  transform: translateY(-50%);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.hotspot-label strong {
  font-size: 11px;
  font-weight: 600;
}

.hotspot-label small {
  margin-top: 3px;
  color: rgba(185, 251, 255, 0.63);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

@keyframes hotspotPulse {
  0% { opacity: 0.8; transform: scale(0.75); }
  75%, 100% { opacity: 0; transform: scale(1.45); }
}

.control-panel {
  position: absolute;
  right: clamp(18px, 3vw, 48px);
  bottom: clamp(22px, 4vw, 52px);
  z-index: 6;
  display: flex;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
}

.control-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(240, 249, 252, 0.76);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.control-button:hover,
.control-button:focus-visible,
.control-button.is-active {
  outline: none;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.control-button:active {
  transform: scale(0.96);
}

.control-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.drag-guide {
  position: absolute;
  bottom: clamp(30px, 5vw, 65px);
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms ease;
}

.drag-guide.is-hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.drag-guide svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1;
  animation: breathe 2.2s ease-in-out infinite;
}

.scroll-hint {
  position: absolute;
  top: 50%;
  right: max(10px, env(safe-area-inset-right));
  z-index: 4;
  margin: 0;
  transform: translateY(-50%) rotate(90deg);
  color: rgba(255, 255, 255, 0.54);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  pointer-events: none;
}

.loading,
.viewer-error {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  background: #07131c;
  color: var(--ink);
  text-align: center;
  transition: opacity 600ms ease, visibility 600ms ease;
}

.loading.is-done {
  visibility: hidden;
  opacity: 0;
}

.loading p,
.viewer-error span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.loading-ring {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(117, 230, 239, 0.15);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.viewer-error strong {
  font-size: 18px;
}

.viewer-error[hidden] {
  display: none;
}

.pnlm-container {
  background: #07131c;
}

.pnlm-controls-container,
.pnlm-load-button,
.pnlm-about-msg {
  display: none !important;
}

.pnlm-grab {
  cursor: grab;
}

.pnlm-grabbing {
  cursor: grabbing;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (max-width: 680px) {
  .brand-bar {
    padding-inline: 20px;
  }

  .brand-copy small,
  .live-badge,
  .global-nav {
    display: none;
  }

  .intro {
    top: auto;
    bottom: 116px;
    left: 22px;
    transform: none;
  }

  .intro h1 {
    font-size: clamp(32px, 10vw, 48px);
  }

  .intro-copy {
    max-width: 290px;
    margin-top: 15px;
  }

  .primary-action {
    margin-top: 18px;
  }

  .section-indicator {
    display: none;
  }

  .control-panel {
    right: 18px;
    bottom: max(18px, env(safe-area-inset-bottom));
  }

  .control-button span,
  .scroll-hint {
    display: none;
  }

  .control-button {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .drag-guide {
    bottom: 37px;
    left: 22px;
    transform: none;
  }

  .drag-guide.is-hidden {
    transform: translateY(8px);
  }

  .info-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(74vh, 650px);
    padding: 25px 24px max(26px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(185, 251, 255, 0.16);
    border-left: 0;
    transform: translateY(104%);
  }

  .panel-content h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .panel-summary {
    margin-block: 17px 21px;
    font-size: 13px;
  }

  .panel-points li {
    padding-block: 13px;
  }

  .panel-points li::before {
    top: 18px;
  }

  .menu-drawer {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 28px;
    padding: 106px 24px 28px;
  }

  .menu-drawer-copy h2 {
    font-size: 38px;
  }

  .drawer-nav button {
    grid-template-columns: 38px 1fr;
    padding-block: 15px;
  }

  .drawer-nav small {
    display: none;
  }

  .menu-drawer footer span:last-child {
    display: none;
  }

  .hotspot-label {
    display: none;
  }
}

@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;
  }
}
