/* ==========================================================================
   360 Official krpano Virtual Tour Demo — Luxury Dark Glass UI
   ========================================================================== */
:root {
  --bg: #050811;
  --glass: rgba(9, 13, 22, 0.74);
  --glass-strong: rgba(9, 13, 22, 0.88);
  --border: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(125, 211, 252, 0.45);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-bright: #38bdf8;
  --gold: #fbbf24;
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Fullscreen App Container */
.vt-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

.vt-pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.vt-noscript {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #cbd5e1;
}

/* Subtle Vignettes */
.vt-vignette {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 2;
}

.vt-vignette--top {
  top: 0;
  height: 130px;
  background: linear-gradient(180deg, rgba(5, 8, 17, 0.72) 0%, rgba(5, 8, 17, 0) 100%);
}

.vt-vignette--bottom {
  bottom: 0;
  height: 160px;
  background: linear-gradient(0deg, rgba(5, 8, 17, 0.78) 0%, rgba(5, 8, 17, 0) 100%);
}

/* Intro Overlay */
.vt-intro {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(15, 23, 42, 0.86) 0%, rgba(5, 8, 17, 0.96) 100%);
  backdrop-filter: blur(10px);
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}

.vt-intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vt-intro__inner {
  text-align: center;
  padding: 24px;
}

.vt-intro__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent-bright);
  margin-bottom: 12px;
}

.vt-intro__title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.vt-intro__sub {
  margin: 0 0 22px;
  font-size: 13px;
  color: #cbd5e1;
  letter-spacing: 0.04em;
}

.vt-intro__bar {
  width: 160px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.vt-intro__bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transform-origin: left center;
  animation: introLoad 1s var(--ease) forwards;
}

@keyframes introLoad {
  from { transform: scaleX(0.08); }
  to { transform: scaleX(1); }
}

/* Top Floating Header HUD */
.vt-topbar {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.vt-topbar__left,
.vt-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.vt-topbar__left {
  padding: 8px 16px 8px 10px;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.42);
  min-width: 0;
}

.vt-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 2px 2px;
  border-radius: 10px;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.vt-brand:hover {
  opacity: 0.88;
}

.vt-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 34px;
  border-radius: 9px;
  background: #ffffff;
  color: #090d16;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.04em;
}

.vt-brand__back {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}

.vt-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.vt-scene-meta {
  min-width: 0;
}

.vt-scene-meta__row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
}

.vt-floor-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #bae6fd;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.vt-scene-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

.vt-engine-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #64748b;
  letter-spacing: 0.04em;
}

.vt-scene-meta__title {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Topbar Toolbar & CTA */
.vt-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.42);
}

.vt-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.vt-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.vt-icon-btn.is-active {
  background: rgba(37, 99, 235, 0.85);
  border-color: rgba(125, 211, 252, 0.45);
  color: #ffffff;
}

.vt-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid rgba(125, 211, 252, 0.35);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.vt-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.5);
}

/* Floating Interactive Floor Map Card */
.vt-map-card {
  position: absolute;
  top: 82px;
  right: max(18px, env(safe-area-inset-right));
  z-index: 18;
  width: 286px;
  padding: 12px 13px 11px;
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.52);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.vt-map-card.is-hidden {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  pointer-events: none;
}

.vt-map-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.vt-map-card__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #cbd5e1;
  white-space: nowrap;
}

.vt-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px var(--accent-bright);
}

.vt-floor-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.vt-floor-tab {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.vt-floor-tab.is-active {
  background: var(--accent);
  color: #ffffff;
}

.vt-map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 25 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vt-map-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
}

.vt-radar-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.vt-map-pins {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.vt-map-pin {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(15, 23, 42, 0.9);
  padding: 0;
  transition: transform 0.2s var(--ease), background 0.2s ease, box-shadow 0.2s ease;
}

.vt-map-pin:hover {
  transform: scale(1.28);
  background: var(--accent);
}

.vt-map-pin.is-active {
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.34);
  transform: scale(1.18);
}

.vt-map-card__foot {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Bottom Cinematic Thumbnail Dock */
.vt-dock-wrap {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  width: min(860px, calc(100vw - 32px));
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.vt-dock-wrap.is-hidden {
  opacity: 0;
  transform: translate(-50%, 24px);
  pointer-events: none;
}

.vt-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.56);
}

.vt-dock-arrow {
  width: 36px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.vt-dock-arrow:hover {
  background: rgba(37, 99, 235, 0.8);
  color: #ffffff;
}

.vt-dock-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.vt-thumb {
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 11px;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 16 / 10;
  transition: border-color 0.2s ease, transform 0.22s var(--ease), box-shadow 0.22s ease;
}

.vt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease);
}

.vt-thumb:hover {
  transform: translateY(-2px);
}

.vt-thumb:hover img {
  transform: scale(1.07);
}

.vt-thumb.is-active {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

.vt-thumb__floor {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(9, 13, 22, 0.78);
  color: #bae6fd;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
}

.vt-thumb__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 6px 5px;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 8, 17, 0.92) 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating Cursor Tooltip for 3D Hotspots */
.vt-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.55);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -135%) scale(0.94);
  transition: opacity 0.16s ease, transform 0.16s var(--ease);
}

.vt-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -145%) scale(1);
}

.vt-tooltip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px var(--accent-bright);
}

.vt-tooltip.is-info .vt-tooltip__dot {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* Info Popup Modal */
.vt-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.vt-modal[hidden] {
  display: none;
}

.vt-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
}

.vt-modal__panel {
  position: relative;
  z-index: 2;
  width: min(500px, 100%);
  border-radius: 22px;
  overflow: hidden;
  background: #0d1424;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
  animation: modalPop 0.28s var(--ease);
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.vt-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(9, 13, 22, 0.78);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vt-modal__close:hover {
  background: var(--accent);
}

.vt-modal__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050811;
}

.vt-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vt-modal__tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 13, 22, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.vt-modal__body {
  padding: 20px 22px 22px;
}

.vt-modal__body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.vt-modal__body p {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #cbd5e1;
}

.vt-modal__spec {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 12px;
  color: #bae6fd;
  font-weight: 600;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 960px) {
  .vt-brand__back,
  .vt-engine-pill,
  .vt-cta-btn {
    display: none;
  }

  .vt-topbar__left {
    padding: 6px 12px 6px 8px;
  }
}

@media (max-width: 720px) {
  .vt-topbar {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .vt-topbar__left {
    width: 100%;
    padding: 7px 12px 7px 8px;
    border-radius: 13px;
  }

  .vt-topbar__right {
    justify-content: flex-end;
  }

  .vt-scene-meta {
    flex: 1 1 auto;
  }

  .vt-scene-meta__row {
    justify-content: flex-start;
  }

  .vt-scene-counter {
    margin-left: auto;
  }

  .vt-brand__mark {
    width: 38px;
    height: 30px;
    font-size: 14px;
  }

  .vt-divider {
    height: 26px;
  }

  .vt-scene-meta__title {
    font-size: 13px;
  }

  .vt-toolbar {
    padding: 4px;
    gap: 3px;
    border-radius: 12px;
  }

  .vt-icon-btn {
    width: 32px;
    height: 32px;
  }

  .vt-map-card {
    top: 120px;
    right: 10px;
    width: min(246px, calc(100vw - 20px));
    padding: 10px;
  }

  .vt-dock-wrap {
    width: calc(100vw - 20px);
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .vt-dock {
    padding: 7px;
    gap: 6px;
  }

  .vt-dock-arrow {
    display: none;
  }

  .vt-dock-list {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 7px;
    scrollbar-width: none;
  }

  .vt-dock-list::-webkit-scrollbar {
    display: none;
  }

  .vt-thumb {
    flex: 0 0 102px;
    scroll-snap-align: start;
  }
}
