:root {
  --ink: #f5f4ed;
  --muted: rgba(245, 244, 237, 0.7);
  --panel: rgba(10, 18, 14, 0.54);
  --panel-strong: rgba(9, 16, 13, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #d9c799;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; background: #0d1410; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { font: inherit; }

.tour-shell { position: relative; width: 100%; height: 100%; min-height: 420px; background: #0d1410; overflow: hidden; }
.viewer { position: absolute; inset: 0; }

.click-pulse {
  position: absolute;
  z-index: 7;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
}
.click-pulse::before,
.click-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.click-pulse::before {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.78);
}
.click-pulse::after {
  border: 1px solid rgba(255,255,255,.52);
  transform: scale(.78);
}
.click-pulse.is-active {
  animation: clickPulseFade .42s ease-out forwards;
}
.click-pulse.is-active::before {
  animation: clickPulseCore .42s ease-out forwards;
}
.click-pulse.is-active::after {
  animation: clickPulseRing .42s ease-out forwards;
}
@keyframes clickPulseFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes clickPulseCore {
  0% { transform: scale(.55); opacity: .9; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes clickPulseRing {
  0% { transform: scale(.75); opacity: .75; }
  100% { transform: scale(1.9); opacity: 0; }
}

.viewer::after { content: ""; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,8,6,.42) 0%, transparent 22%, transparent 68%, rgba(4,8,6,.42) 100%); }
.psv-navbar { display: none !important; }

.topbar { position: absolute; z-index: 5; inset: 0 0 auto 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; pointer-events: none; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; font-size: 12px; letter-spacing: .08em; background: rgba(8,14,10,.25); backdrop-filter: blur(10px); }
.brand-copy { min-width: 0; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.brand-kicker { color: var(--accent); font-size: 10px; letter-spacing: .18em; font-weight: 700; margin-bottom: 4px; }
.brand-copy h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: clamp(19px, 2.5vw, 30px); line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-subtitle { margin-top: 4px; font-size: 12px; color: var(--muted); }
.icon-button { pointer-events: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); color: #fff; background: rgba(8,14,10,.32); backdrop-filter: blur(12px); cursor: pointer; font-family: Georgia, serif; font-size: 18px; }
.icon-button:hover, .icon-button:focus-visible { background: rgba(8,14,10,.62); outline: 2px solid rgba(255,255,255,.75); outline-offset: 2px; }

.scene-info { position: absolute; z-index: 6; left: 24px; bottom: 122px; width: min(420px, calc(100% - 48px)); padding: 14px 16px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); backdrop-filter: blur(14px); transform: translateY(8px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.scene-info.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scene-count { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.scene-info h2 { margin: 5px 0 5px; font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 22px; }
.scene-info p { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.78); }

.jump-gallery {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(760px, calc(100% - 180px));
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 16, 13, 0.44);
  backdrop-filter: blur(14px);
}
.jump-gallery[hidden] { display: none; }
.jump-gallery__label { flex: 0 0 auto; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.jump-gallery__list { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.jump-gallery__list::-webkit-scrollbar { display: none; }
.jump-thumb { position: relative; flex: 0 0 auto; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; overflow: visible; background: rgba(255,255,255,.08); cursor: pointer; transition: transform .15s ease, border-color .15s ease, opacity .15s ease; }
.jump-thumb:hover, .jump-thumb:focus-visible { transform: translateY(-1px); border-color: rgba(255,255,255,.46); outline: none; }
.jump-thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217,199,153,.18); }
.jump-thumb__image { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: block; }
.jump-thumb__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jump-thumb::after { content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); opacity: 0; pointer-events: none; padding: 6px 9px; border-radius: 10px; background: rgba(6,10,8,.92); color: #fff; white-space: nowrap; font-size: 11px; line-height: 1.2; transition: opacity .15s ease, transform .15s ease; }
.jump-thumb:hover::after, .jump-thumb:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.tour-nav {
  position: absolute;
  z-index: 5;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 18px;
}
.nav-button {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  padding: 0;
  color: #fff;
  background: rgba(9,16,13,.48);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, opacity .15s ease;
}
.nav-button--back { grid-column: 1; justify-self: start; }
.nav-button--next { grid-column: 3; justify-self: end; }
.nav-button:hover:not(:disabled) { background: rgba(20,31,25,.72); border-color: rgba(255,255,255,.3); transform: translateY(-1px); }
.nav-button:focus-visible { outline: 2px solid rgba(255,255,255,.85); outline-offset: 2px; }
.nav-button:disabled { opacity: .28; cursor: default; }
.nav-arrow { font-size: 21px; line-height: 1; font-weight: 400; transform: translateY(-1px); }
.progress-wrap { grid-column: 2; width: min(420px, 100%); justify-self: center; height: 2px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.22); }
.progress-bar { height: 100%; width: 0; background: rgba(255,255,255,.92); transition: width .22s ease; }
.status { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: calc(100% - 48px); padding: 10px 14px; border-radius: 10px; background: rgba(6,10,8,.84); color: #fff; font-size: 13px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.status.is-visible { opacity: 1; }

@media (max-width: 920px) {
  .jump-gallery { max-width: calc(100% - 32px); left: 16px; right: 16px; transform: none; }
}

@media (max-width: 680px) {
  .topbar { padding: 15px 14px; }
  .brand-mark { width: 36px; height: 36px; font-size: 11px; }
  .brand-copy h1 { font-size: 24px; max-width: calc(100vw - 110px); }
  .brand-kicker { font-size: 9px; }
  .tour-subtitle { font-size: 11px; }
  .icon-button { width: 38px; height: 38px; }
  .scene-info { left: 14px; right: 14px; bottom: 132px; width: auto; }
  .scene-info h2 { font-size: 18px; }
  .jump-gallery { bottom: 72px; padding: 7px 8px; gap: 8px; }
  .jump-gallery__label { display: none; }
  .jump-thumb { width: 40px; height: 40px; }
  .tour-nav { left: 14px; right: 14px; bottom: 14px; gap: 10px; grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .nav-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .nav-arrow { font-size: 19px; }
  .progress-wrap { width: min(260px, 100%); }
}

.brand-mark.has-logo { width: auto; min-width: 42px; max-width: 132px; padding: 4px 8px; border-radius: 12px; }
.brand-logo { display: block; max-width: 112px; max-height: 32px; object-fit: contain; }
.powered-by { position: absolute; z-index: 5; right: 20px; bottom: 78px; color: rgba(255,255,255,.55); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
@media (max-width: 680px) { .powered-by { right: 14px; bottom: 68px; font-size: 8px; } }
