:root {
  color-scheme: dark;
  --accent: #e22a25;
  --panel: rgba(13, 17, 23, 0.82);
  --panel-strong: rgba(13, 17, 23, 0.94);
  --line: rgba(255, 255, 255, 0.24);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.74);
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #111820; }
button, a { -webkit-tap-highlight-color: transparent; }

.tour { position: relative; width: 100%; height: 100%; min-height: 320px; overflow: hidden; background: #111820; isolation: isolate; }
.tour__panorama { position: absolute; inset: 0; width: 100%; height: 100%; }
.tour__header { position: absolute; z-index: 4; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 15px; max-width: min(560px, calc(100% - 90px)); padding: 10px 15px 10px 11px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tour__brand { display: flex; align-items: center; flex: 0 0 auto; min-height: 44px; padding: 5px 10px; background: #fff; border-radius: 9px; transition: transform 160ms ease; }
.tour__brand:hover { transform: translateY(-1px); }
.tour__brand img { display: block; width: 120px; height: auto; }
.tour__heading { min-width: 0; }
.tour__eyebrow { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; }
.tour__heading h1 { margin: 0; overflow: hidden; color: var(--text); font-size: clamp(18px, 2.2vw, 27px); font-weight: 700; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.tour__controls { position: absolute; z-index: 4; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: grid; gap: 7px; }
.tour-control { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; color: #fff; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 22px rgba(0, 0, 0, 0.24); cursor: pointer; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); transition: background 160ms ease, transform 160ms ease; }
.tour-control:hover { background: var(--panel-strong); transform: translateY(-1px); }
.tour-control svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.tour-control .icon-exit, .tour-control.is-fullscreen .icon-enter { display: none; }
.tour-control.is-fullscreen .icon-exit { display: block; }
.tour__brand:focus-visible, .tour-control:focus-visible, .scene-card:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tour__loading { position: absolute; z-index: 3; top: 50%; left: 50%; display: flex; align-items: center; gap: 12px; padding: 12px 17px; color: var(--text); background: var(--panel-strong); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 9px 30px rgba(0, 0, 0, 0.3); font-size: 14px; transform: translate(-50%, -50%); transition: opacity 180ms ease, visibility 180ms ease; }
.tour__loading.is-hidden { visibility: hidden; opacity: 0; }
.tour__loading.is-error { color: #fff; background: rgba(140, 24, 24, 0.94); }
.tour__spinner { width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; }
.tour__loading.is-error .tour__spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.tour__scenes { position: absolute; z-index: 4; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); left: max(14px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(2, minmax(150px, 220px)); justify-content: center; gap: 8px; width: fit-content; max-width: calc(100% - 28px); margin: 0 auto; padding: 9px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.scene-card { position: relative; width: 210px; max-width: 100%; height: 76px; padding: 0; overflow: hidden; color: #fff; background: #171d24; border: 2px solid transparent; border-radius: 9px; cursor: pointer; transition: border-color 160ms ease, transform 160ms ease; }
.scene-card:hover { transform: translateY(-2px); }
.scene-card.is-active { border-color: var(--accent); }
.scene-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene-card::after { position: absolute; inset: 35% 0 0; content: ""; background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.88)); pointer-events: none; }
.scene-card span { position: absolute; z-index: 1; right: 7px; bottom: 7px; left: 7px; overflow: hidden; font-size: 12px; font-weight: 700; line-height: 1.12; text-align: left; text-overflow: ellipsis; text-shadow: 0 1px 3px #000; white-space: nowrap; }
.tour__noscript { position: absolute; z-index: 8; inset: 0; display: grid; place-items: center; padding: 25px; color: #fff; background: #111820; text-align: center; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.pnlm-container { background-color: #111820; }
.pnlm-about-msg { z-index: 6; }

@media (max-width: 760px) {
  .tour__header { gap: 9px; max-width: calc(100% - 75px); padding: 7px 10px 7px 7px; border-radius: 11px; }
  .tour__brand { min-height: 36px; padding: 4px 7px; border-radius: 7px; }
  .tour__brand img { width: 96px; }
  .tour__eyebrow { font-size: 9px; }
  .tour__heading h1 { font-size: 16px; }
  .tour__controls { gap: 5px; }
  .tour-control { width: 38px; height: 38px; border-radius: 10px; }
  .tour-control svg { width: 20px; height: 20px; }
  .tour__scenes { grid-template-columns: repeat(2, minmax(126px, 1fr)); width: calc(100% - 28px); gap: 6px; padding: 7px; border-radius: 12px; }
  .scene-card { width: 100%; height: 64px; }
  .scene-card span { font-size: 11px; }
}

@media (max-width: 430px) {
  .tour__header { max-width: calc(100% - 67px); }
  .tour__heading h1 { font-size: 14px; }
  .tour__eyebrow { display: none; }
  .tour-control { width: 34px; height: 34px; }
  #reset-view { display: none; }
}

@media (max-height: 520px) {
  .tour__header { top: max(8px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); }
  .tour__controls { top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); }
  .tour__scenes { right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); left: max(8px, env(safe-area-inset-left)); }
}

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