:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --accent: #f5b53d;
  --glass: rgba(10, 13, 18, .82);
}

* { box-sizing: border-box; }
html, body, .tour-shell, #panorama { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: #05070a; }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.72), transparent);
  pointer-events: none;
}

.brand, .top-actions { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: white; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 12px;
  background: rgba(0,0,0,.42);
  color: var(--accent);
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { margin-top: 1px; color: rgba(255,255,255,.72); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.top-actions { display: flex; gap: 10px; }
.top-actions a, .top-actions button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(0,0,0,.44);
  color: white;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.top-actions a { display: flex; align-items: center; background: var(--accent); border-color: var(--accent); color: #19130a; font-weight: 700; }

.scene-panel {
  position: fixed;
  z-index: 30;
  top: 84px;
  bottom: 28px;
  left: 20px;
  width: min(350px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: var(--glass);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(18px);
  transition: transform .24s ease, opacity .24s ease;
}
.scene-panel.is-closed { transform: translateX(calc(-100% - 30px)); opacity: 0; pointer-events: none; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 13px; }
.panel-heading span, .panel-heading strong { display: block; }
.panel-heading span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.panel-heading strong { margin-top: 3px; font-size: 16px; }
.panel-heading button { border: 0; background: transparent; color: rgba(255,255,255,.8); font-size: 28px; cursor: pointer; }

.scene-list { overflow-y: auto; padding: 0 10px 12px; scrollbar-width: thin; }
.scene-button {
  width: 100%;
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
}
.scene-button:hover { background: rgba(255,255,255,.08); }
.scene-button.is-active { border-color: rgba(245,181,61,.7); background: rgba(245,181,61,.12); }
.scene-button img { width: 88px; height: 56px; border-radius: 9px; object-fit: cover; }
.scene-button span { font-size: 13px; line-height: 1.3; }
.scene-button small { display: block; margin-top: 4px; color: rgba(255,255,255,.5); }

.scene-link-hotspot {
  width: 90px;
  height: 70px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.floor-arrow-shape {
  display: block;
  position: absolute;
  left: 23px;
  bottom: 4px;
  width: 44px;
  height: 32px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.75));
  animation: scene-link-pulse 1.6s ease-in-out infinite;
}
.floor-arrow-shape svg { display: block; width: 100%; height: 100%; overflow: visible; }
.floor-arrow-shape polyline { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.floor-arrow-label {
  position: absolute;
  left: 50%;
  bottom: 52px;
  width: max-content;
  max-width: 210px;
  transform: translateX(-50%);
  padding: 5px 10px;
  border: 0;
  border-radius: 2px;
  background: rgba(0,0,0,.64);
  color: white;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.scene-link-hotspot::after {
  content: none;
}
.scene-link-back .floor-arrow-shape { transform: rotate(180deg); }
.scene-link-hotspot:hover .floor-arrow-shape { filter: drop-shadow(0 0 5px rgba(255,255,255,.9)); }
@keyframes scene-link-pulse {
  0%, 100% { opacity: .7; transform: translateY(2px); }
  50% { opacity: 1; transform: translateY(-2px); }
}
.scene-link-back .floor-arrow-shape { animation-name: scene-link-back-pulse; }
@keyframes scene-link-back-pulse {
  0%, 100% { opacity: .7; transform: rotate(180deg) translateY(2px); }
  50% { opacity: 1; transform: rotate(180deg) translateY(-2px); }
}

#panorama .pnlm-render-container { transition: transform .42s ease, filter .42s ease, opacity .42s ease; }
#panorama.is-walking .pnlm-render-container { transform: scale(1.08); filter: blur(1px); opacity: .72; }

.hint {
  position: fixed;
  z-index: 15;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.48);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  backdrop-filter: blur(10px);
  transition: opacity .5s ease;
}
.hint.is-hidden { opacity: 0; pointer-events: none; }

.pnlm-container { background: #05070a; }
.pnlm-load-box { background-color: rgba(0,0,0,.55); }

@media (max-width: 680px) {
  .topbar { padding-inline: 12px; }
  .brand small { display: none; }
  .top-actions a { display: none; }
  .scene-panel { inset: auto 10px 10px 10px; width: auto; max-height: 56vh; }
  .scene-panel.is-closed { transform: translateY(calc(100% + 20px)); }
  .hint { bottom: 74px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .floor-arrow-shape { animation: none; }
}
