* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -ms-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -ms-content-zooming: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

:root {
  --ui-surface: rgba(0, 0, 0, 0.22);
  --ui-surface-strong: rgba(0, 0, 0, 0.5);
  --ui-surface-soft: rgba(255, 255, 255, 0.08);
  --ui-border: rgba(255, 255, 255, 0.18);
  --ui-text: rgba(255, 255, 255, 0.96);
  --ui-text-muted: rgba(255, 255, 255, 0.72);
  --ui-shadow: none;
  --ui-shadow-strong: none;
  --ui-radius: 18px;
  --ui-radius-pill: 999px;
  --ui-gap: 14px;
  --ui-control-size: 42px;
  --ui-blur: none;
  --ui-safe: max(18px, env(safe-area-inset-top));
  --ui-safe-right: max(18px, env(safe-area-inset-right));
  --ui-safe-bottom: max(18px, env(safe-area-inset-bottom));
  --ui-safe-left: max(18px, env(safe-area-inset-left));
}

html,
body {
  width: 100%;
  min-height: 100dvh;
  height: 100dvh;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  background: #fff;
  color: var(--ui-text);
}

a,
a:hover,
a:active,
a:visited {
  text-decoration: none;
  color: inherit;
}

#pano,
#shade {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 32px;
  line-height: 1;
  display: block;
  white-space: nowrap;
  direction: ltr;
  letter-spacing: normal;
  text-transform: none;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variation-settings:
    'FILL' 0,
    'wght' 500,
    'GRAD' 0,
    'opsz' 32;
}

#pano {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#titleBar {
  position: absolute;
  top: calc(var(--ui-safe) + 2px);
  left: var(--ui-safe-left);
  right: auto;
  height: auto;
  z-index: 30;
  pointer-events: none;
}

body.multiple-scenes #titleBar,
body.fullscreen-enabled #titleBar,
body.fullscreen-enabled.mobile #titleBar,
body.multiple-scenes.mobile #titleBar {
  left: var(--ui-safe-left);
  right: auto;
}

#titleBar .sceneName {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  max-width: min(70vw, 22rem);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--ui-surface);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

#projectLogo {
  max-width: 200px; /* albo 250px */
  height: auto;
}

#projectTextTitle {
  font-family: Inter, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ui-text);
  white-space: nowrap;
}

#fullscreenToggle,
#autorotateToggle,
#sceneListToggle {
  position: absolute;
  width: var(--ui-control-size);
  height: var(--ui-control-size);
  border-radius: 10px;
  background: var(--ui-surface);
  box-shadow: none;
  transition: background-color 140ms ease;
}

.no-touch #fullscreenToggle:hover,
.no-touch #autorotateToggle:hover,
.no-touch #sceneListToggle:hover,
.no-touch #sceneList .scene:hover {
  background: var(--ui-surface-strong);
}

#sceneListToggle .toggle-label {
  position: absolute;
  left: calc(var(--ui-control-size) + 15px);
  white-space: nowrap;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ui-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.no-touch #sceneListToggle:hover .toggle-label {
  opacity: 1;
  transform: translateX(0);
}

#sceneListToggle.enabled .toggle-label {
  opacity: 0 !important;
  transform: translateX(-15px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.no-touch #sceneListToggle.enabled:hover .toggle-label {
  opacity: 0 !important;
}

#fullscreenToggle {
  display: none;
  top: calc(var(--ui-safe) + 2px);
  right: var(--ui-safe-right);
  z-index: 31;
}

body.fullscreen-enabled #fullscreenToggle {
  display: block;
}

#autorotateToggle .toggle-label,
#fullscreenToggle .toggle-label {
  position: absolute;
  white-space: nowrap;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ui-text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  top: 45%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 32;
}

#autorotateToggle .toggle-label {
  right: calc(var(--ui-control-size) + 15px);
  transform: translateY(-45%) translateX(10px);
}

#fullscreenToggle .toggle-label {
  right: calc(var(--ui-control-size) * 2 + 25px);
  transform: translateY(-45%) translateX(10px);
}

.no-touch #autorotateToggle:hover .toggle-label,
.no-touch #fullscreenToggle:hover .toggle-label {
  opacity: 1;
  transform: translateY(-45%) translateX(0);
}

#fullscreenToggle,
#autorotateToggle {
  cursor: pointer;
}

#autorotateToggle .toggle-label.on { display: none; }
#autorotateToggle .toggle-label.off { display: block; }
#autorotateToggle.enabled .toggle-label.on { display: block; }
#autorotateToggle.enabled .toggle-label.off { display: none; }

#fullscreenToggle.enabled .toggle-label {
  opacity: 0 !important;
}

body.fullscreen-enabled #fullscreenToggle {
  display: block;
}

#autorotateToggle {
  top: calc(var(--ui-safe) + 2px);
  right: var(--ui-safe-right);
  z-index: 31;
}

/* tylko jeśli fullscreen istnieje */
body.fullscreen-enabled #autorotateToggle {
  right: calc(var(--ui-safe-right) + var(--ui-control-size) + 10px);
}

/* (opcjonalnie mobile, ale tylko gdy fullscreen jest) */
body.fullscreen-enabled.mobile #autorotateToggle {
  right: calc(var(--ui-safe-right) + var(--ui-control-size) + 10px);
}

#sceneListToggle {
  left: var(--ui-safe-left);
  bottom: var(--ui-safe-bottom);
  z-index: 31;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sceneListToggle .hamburger-icon {
  position: relative;
  width: 20px;
  height: 16px;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.42));
}

#sceneListToggle .hamburger-bar {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  transition:
    transform 180ms ease,
    opacity 140ms ease,
    top 180ms ease,
    height 140ms ease;
  transform-origin: center;
}

#sceneListToggle .hamburger-bar-top {
  top: 0;
}

#sceneListToggle .hamburger-bar-middle {
  top: 7px;
}

#sceneListToggle .hamburger-bar-bottom {
  top: 14px;
}

#sceneListToggle.enabled .hamburger-bar {
  height: 3.2px;
}

#sceneListToggle.enabled .hamburger-bar-top {
  top: 7px;
  transform: rotate(45deg);
}

#sceneListToggle.enabled .hamburger-bar-middle {
  opacity: 0;
}

#sceneListToggle.enabled .hamburger-bar-bottom {
  top: 7px;
  transform: rotate(-45deg);
}

#fullscreenToggle .icon,
#autorotateToggle .icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  opacity: 0.96;
  filter: drop-shadow(0 1.25px 1.25px rgba(0, 0, 0, 0.58));
  pointer-events: none;
}

#fullscreenToggle .icon.on,
#autorotateToggle .icon.on {
  display: none;
}

#fullscreenToggle.enabled .icon.on,
#autorotateToggle.enabled .icon.on {
  display: flex;
}

#fullscreenToggle.enabled .icon.off,
#autorotateToggle.enabled .icon.off {
  display: none;
}

/* --- LISTA SCEN --- */
#sceneList {
  position: absolute;
  left: var(--ui-safe-left);
  bottom: calc(var(--ui-safe-bottom) + var(--ui-control-size) + 12px);
  top: auto;
  width: min(15rem, calc(100vw - 2 * var(--ui-safe-left)));
  max-height: min(50vh, 30rem);
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 30;
  scrollbar-width: none;
}

#sceneList::-webkit-scrollbar {
  display: none;
}

#sceneList.enabled {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#sceneList .scenes {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: none;
  backdrop-filter: none;
}

#sceneList .scene {
  display: block;
  width: 100%;
  min-height: 2.8rem;
  margin: 0;
  background: var(--ui-surface);
  backdrop-filter: none;
  border-radius: 10px;
  transition: background-color 160ms ease, transform 120ms ease;
}

#sceneList .scene:active {
  transform: scale(0.98);
  transition: transform 80ms ease;
}

#sceneList .scene + .scene {
  margin-top: 8px;
}

#sceneList .scene .text {
  display: block;
  width: 100%;
  max-width: 28ch;
  min-height: 2.8rem;
  padding: 0.6rem 1rem;
  color: var(--ui-text);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#sceneList .scene.current {
  background: var(--ui-surface-strong);
}

body.single-scene #sceneList,
body.single-scene #sceneListToggle {
  display: none;
}

/* --- LINK HOTSPOT --- */
.link-hotspot {
  width: 87px;
  height: 87px;
  margin-left: -43.5px;
  margin-top: -43.5px;
  display: block;
  opacity: 1;
  transition: opacity 180ms ease;
}

.link-hotspot-icon {
  width: 100%;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  line-height: 1;
  padding: 0;
  margin: 0;
  transform:
    perspective(600px)
    rotateX(65deg)
    scaleY(1.2)
    rotate(var(--hotspot-rotate, 0deg));
}

.link-hotspot-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(18, 22, 28, 0.58);
  cursor: pointer;
  transition:
    background-color 220ms ease,
    transform 220ms ease;

  transform: scale(1);
}

.link-hotspot-glyph {
  display: block;
  line-height: 1;
  transform: scale(1);
  transform-origin: center center;
}

.link-hotspot-glyph.material-symbols-rounded {
  font-size: 80px !important;
  color: rgba(255,255,255,0.96);
  font-variation-settings:
    'FILL' 1,
    'wght' 700,
    'GRAD' 0,
    'opsz' 48;
}

.no-touch .link-hotspot:hover .link-hotspot-bg {
  background: rgba(12, 15, 20, 0.84);
  transform: scale(1.24);
}

@keyframes hotspotArrowPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.no-touch .link-hotspot:hover .link-hotspot-glyph {
  animation: hotspotArrowPulse 1s ease-in-out infinite;
}

.link-hotspot-tooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  min-width: 6rem;
  max-width: 16rem;
  padding: 0.5rem 0.8rem 0.6rem;
  border-radius: 8px;
  background: var(--ui-surface-strong);
  color: var(--ui-text);
  font-size: 0.9rem;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-align: center;
}

.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tooltip-fallback .link-hotspot-tooltip {
  display: none;
}

.no-touch .tooltip-fallback .link-hotspot:hover .link-hotspot-tooltip {
  display: block;
}

body.hide-link-hotspot-tooltips .link-hotspot-tooltip {
  display: none !important;
}

/* --- INFO HOTSPOT --- */
.info-hotspot {
  position: relative;
  width: 48px;
  height: 48px;
  line-height: 1.35;
  opacity: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 22, 28, 0.58);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.42));
  transform-origin: top left;
  will-change: width, height, border-radius;
  transition:
    width 0.28s ease,
    height 0.28s ease,
    border-radius 0.22s ease,
    background-color 160ms ease;
}

.no-touch .info-hotspot:hover {
  background: rgba(12, 15, 20, 0.84);
}

.desktop.no-touch .info-hotspot:hover,
.desktop .info-hotspot.visible,
.desktop.no-touch .info-hotspot.visible:hover {
  width: 280px;
}

.desktop .info-hotspot.visible,
.desktop.no-touch .info-hotspot.visible:hover {
  height: 156px;
  border-radius: 22px;
}

.info-hotspot .info-hotspot-header {
  position: relative;
  width: 100%;
  height: 48px;
  background: transparent;
  cursor: pointer;
}

.info-hotspot .info-hotspot-icon-wrapper {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-hotspot-icon.material-symbols-rounded {
  width: 100%;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  line-height: 1;
  color: rgba(255,255,255,0.96);
  font-size: 34px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.42));
}

.info-hotspot .info-hotspot-title-wrapper {
  position: absolute;
  left: 50px;
  top: 0;
  right: 44px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.desktop .info-hotspot.visible .info-hotspot-title-wrapper,
.desktop.no-touch .info-hotspot:hover .info-hotspot-title-wrapper {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.12s ease 0.16s, transform 0.12s ease 0.16s;
}

.info-hotspot .info-hotspot-title,
.info-hotspot-modal .info-hotspot-title {
  display: block;
  font-weight: 600;
  color: var(--ui-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot .info-hotspot-close-wrapper {
  position: absolute;
  top: 0;
  right: 6px;
  width: 36px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  visibility: hidden;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0.18s;
}

.desktop .info-hotspot.visible .info-hotspot-close-wrapper {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.18s ease 0.04s, transform 0.18s ease 0.04s, visibility 0s;
}

.info-hotspot-close-icon.material-symbols-rounded {
  width: auto;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  line-height: 1;
  color: rgba(255,255,255,0.96);
  font-size: 26px;
}

.info-hotspot .info-hotspot-text {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.10);
  background: transparent;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.desktop .info-hotspot.visible .info-hotspot-text {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease 0.06s, transform 0.18s ease 0.06s;
  pointer-events: auto;
}

/* --- MODAL INFO HOTSPOT --- */
.desktop .info-hotspot-modal {
  display: none;
}

.info-hotspot-modal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 11000 !important;
  background: rgba(8, 10, 14, 0.42);
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0s 0.22s;
}

.info-hotspot-modal.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0s;
}

.info-hotspot-modal .info-hotspot-header,
.info-hotspot-modal .info-hotspot-text {
  left: 14px;
  right: 14px;
}

.info-hotspot-modal .info-hotspot-header {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  height: 56px;
  opacity: 0;
  border-radius: 22px 22px 0 0;
  background: rgba(18, 22, 28, 0.58);
  transition: opacity 0.22s ease, background-color 160ms ease;
}

.info-hotspot-modal.visible .info-hotspot-header,
.info-hotspot-modal.visible .info-hotspot-text {
  opacity: 1;
}

.info-hotspot-modal .info-hotspot-icon-wrapper,
.info-hotspot-modal .info-hotspot-close-wrapper {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
}

.info-hotspot-modal .info-hotspot-title-wrapper {
  position: absolute;
  top: 0;
  left: 56px;
  right: 56px;
  height: 56px;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
}

.info-hotspot-modal .info-hotspot-close-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  border-top-right-radius: 22px;
  background: rgba(18, 22, 28, 0.58);
  cursor: pointer;
  transition: background-color 160ms ease;
}

.no-touch .info-hotspot-modal .info-hotspot-close-wrapper:hover {
  background: rgba(12, 15, 20, 0.84);
}

.info-hotspot-modal .info-hotspot-text {
  position: absolute;
  top: calc(max(18px, env(safe-area-inset-top)) + 56px);
  bottom: max(14px, env(safe-area-inset-bottom));
  padding: 1rem;
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: rgba(20, 24, 31, 0.82);
  overflow-y: auto;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.viewControlButton,
body.view-control-buttons .viewControlButton {
  display: none !important;
}

.mobile #titleBar {
  top: calc(var(--ui-safe) + 2px);
}

.mobile #sceneList {
  left: var(--ui-safe-left);
  width: min(22rem, calc(100vw - 2 * var(--ui-safe-left)));
  max-height: min(54vh, 24rem);
}

.mobile #sceneList .scene,
.mobile #sceneList .scene .text {
  min-height: 3.2rem;
}

/* --- WATERMARK - WIDOCZNY ZAWSZE --- */
#watermark {
  position: absolute;
  right: var(--ui-safe-right);
  bottom: var(--ui-safe-bottom);
  z-index: 999;

  font-family: 'Russo One', sans-serif;
  color: #FFFFFF;
  opacity: 0.7;

  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;

  /* ?? KLUCZOWE */
  pointer-events: auto;
  text-decoration: none;

  /* animacja */
  transition:
    transform 180ms ease,
    opacity 160ms ease;
}

.no-touch #watermark:hover {
  transform: scale(1.08); /* ?? lekkie powiększenie */
  opacity: 1;
}

#watermark .powered-by {
  font-size: 10px;
  letter-spacing: 0.1em;
  font-family: Inter, sans-serif;
  font-weight: 400;
  opacity: 0.8;
}

#watermark .brand-name {
  font-size: 16px;
  letter-spacing: 0.05em;
}

.zoom-indicator {
  position: absolute;
  left: 50%;
  bottom: calc(var(--ui-safe-bottom) + 14px);
  transform: translateX(-50%) translateY(16px);
  width: min(320px, calc(100vw - 40px));
  padding: 12px;
  border-radius: 10px;
  background: var(--ui-surface);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  z-index: 1200;
  backdrop-filter: none;
  box-shadow: none;
}

.zoom-indicator.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.zoom-indicator-track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.zoom-indicator-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  transition: width 180ms ease-out;
}

.zoom-indicator-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zoom-indicator-icon {
  font-size: 20px;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  opacity: 0.96;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.42));
}

/* === IDLE SWIPE HINT === */

#idleSwipeHint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 9999;
}

#idleSwipeHint.visible {
  opacity: 1;
}

.idle-swipe-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transform: translateY(-6%);
}

.idle-swipe-stage {
  position: relative;
  width: min(42vw, 420px);
  height: min(22vw, 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.idle-swipe-icon-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.idle-swipe-icon-wrap.pos-left {
  transform: translate(calc(-50% - 95px), -50%) rotate(-7deg);
}

.idle-swipe-icon-wrap.pos-right {
  transform: translate(calc(-50% + 95px), -50%) rotate(7deg);
}

.idle-swipe-icon-wrap.move-left-to-right {
  animation: moveLeftToRight 0.82s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.idle-swipe-icon-wrap.move-right-to-left {
  animation: moveRightToLeft 0.82s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

#idleSwipeHint .idle-swipe-icon {
  font-size: min(30vw, 250px) !important;
  color: rgba(255,255,255,0.72);
  display: block;
  transform-origin: center center;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* fold tylko podczas postoju */
#idleSwipeHint .idle-swipe-icon.fold-out {
  animation: iconFoldOut 0.18s ease-in forwards;
}

#idleSwipeHint .idle-swipe-icon.fold-in-right {
  animation: iconFoldInRight 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

#idleSwipeHint .idle-swipe-icon.fold-in-left {
  animation: iconFoldInLeft 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.idle-swipe-text {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  text-align: center;
  max-width: 260px;
  line-height: 1.4;
  margin-top: 8px;
}

@keyframes moveLeftToRight {
  0% {
    transform: translate(calc(-50% - 95px), -50%) rotate(-7deg);
  }
  100% {
    transform: translate(calc(-50% + 95px), -50%) rotate(7deg);
  }
}

@keyframes moveRightToLeft {
  0% {
    transform: translate(calc(-50% + 95px), -50%) rotate(7deg);
  }
  100% {
    transform: translate(calc(-50% - 95px), -50%) rotate(-7deg);
  }
}

@keyframes iconFoldOut {
  0% {
    transform: rotateY(0deg) scaleX(1);
  }
  100% {
    transform: rotateY(88deg) scaleX(0.82);
  }
}

@keyframes iconFoldInRight {
  0% {
    transform: rotateY(-88deg) scaleX(0.82);
  }
  100% {
    transform: rotateY(0deg) scaleX(1);
  }
}

@keyframes iconFoldInLeft {
  0% {
    transform: rotateY(88deg) scaleX(0.82);
  }
  100% {
    transform: rotateY(0deg) scaleX(1);
  }
}

.idle-swipe-text {
  white-space: normal;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ui-text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  text-align: center;
  max-width: min(90vw, 32rem);
  line-height: 1.35;
}

.link-hotspot {
  overflow: visible;
  position: relative;
}

.link-hotspot-icon {
  position: relative;
  z-index: 2;
}

.link-hotspot {
  overflow: visible;
  position: relative;
}

.link-hotspot-icon {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.link-hotspot-pulse-hint .link-hotspot-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  pointer-events: none;
  border: 5px solid rgba(255, 255, 255, 0.72);
  opacity: 1;
  z-index: -1;

  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  animation: hotspotRingPulse 1.3s linear infinite;
}

.link-hotspot-pulse-hint .link-hotspot-bg {
  position: relative;
  z-index: 2;
}

@keyframes hotspotRingPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    border-width: 8px;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
    border-width: 0px;
  }
}

.link-hotspot-pulse-hint .link-hotspot-glyph {
  animation: hotspotArrowPulse 1s ease-in-out infinite;
}

.link-hotspot-icon,
.link-hotspot-bg {
  overflow: visible;
}

@media (max-height: 500px) and (orientation: landscape) {
  .idle-swipe-inner {
    transform: none;
    gap: 8px;
  }

  .idle-swipe-stage {
    width: min(30vw, 260px);
    height: min(16vw, 120px);
  }

  #idleSwipeHint .idle-swipe-icon {
    font-size: min(18vw, 140px) !important;
  }

  .idle-swipe-text {
    margin-top: 0;
    font-size: 0.78rem;
    line-height: 1.2;
    max-width: 220px;
  }

  #projectLogo {
    max-width: 90px;
  }

  #projectTextTitle {
    font-size: 0.7rem;
  }

  #titleBar .sceneName {
    padding: 0.5rem 0.7rem;
  }
}

@media (max-width: 760px) {
  :root {
    --ui-control-size: 44px;
    --ui-gap: 12px;
  }

  #titleBar .sceneName {
    max-width: calc(100vw - 8.5rem);
    min-height: 2.7rem;
    padding: 0.7rem 0.92rem;
    font-size: 10px;
  }

  #projectLogo {
    max-width: 120px;
    height: auto;
  }

  #projectTextTitle {
    font-size: 0.85rem;
  }

  #watermark {
    bottom: calc(var(--ui-safe-bottom) + 5px);
  }

  #watermark .powered-by {
    font-size: 7px;
  }

  #watermark .brand-name {
    font-size: 11px;
  }

  #sceneListToggle .toggle-label {
    font-size: 0.85rem;
  }

  #autorotateToggle .toggle-label,
  #fullscreenToggle .toggle-label {
    display: none !important;
  }

  .link-hotspot {
    width: 64px;
    height: 64px;
    margin-left: -32px;
    margin-top: -32px;
  }
  
  .zoom-indicator {
    bottom: calc(var(--ui-safe-bottom) + 10px);
    width: min(280px, calc(100vw - 28px));
    padding: 10px;
  }
}