/* Asred 360 viewer — the same proportions and surfaces as the public map. */
:root {
  --viewer-surface: rgba(8, 12, 11, .88);
  --viewer-surface-strong: rgba(7, 10, 9, .95);
  --viewer-surface-soft: rgba(255, 255, 255, .065);
  --viewer-line: rgba(255, 255, 255, .12);
  --viewer-muted: rgba(255, 255, 255, .66);
  --viewer-radius-lg: 28px;
  --viewer-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  --viewer-top-edge:18px;
}

body { background:#070b09; }

.glass,
#topbar,
#render-nav,
#pano-toolbar,
#pano-info-chip,
#pano-room-list {
  background:var(--viewer-surface);
  border-color:var(--viewer-line);
  box-shadow:0 14px 36px rgba(0,0,0,.26);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
}

#topbar {
  height:58px;
  min-height:58px;
  max-height:58px;
  padding:6px;
  gap:2px;
  border-radius:20px;
}

.topbar-btn,
.topbar-icon-btn {
  min-height:42px;
  padding:0 17px;
  border-radius:14px;
  gap:3px;
  flex-direction:column;
  justify-content:center;
  font-weight:750;
}

.topbar-btn.active {
  background:var(--primary);
  color:#10130f;
  box-shadow:0 8px 22px color-mix(in srgb,var(--primary) 24%,transparent);
}

.topbar-sep { height:24px; background:var(--viewer-line); }

#logo-chip,
#logo-chip.pano-logo-visible {
  top:18px;
  right:18px;
  width:132px;
  min-height:58px;
  max-height:58px;
  padding:8px 14px;
  border-radius:18px;
  background:var(--viewer-surface);
  border:1px solid var(--viewer-line);
  box-shadow:0 14px 36px rgba(0,0,0,.26);
  overflow:hidden;
}

#logo-chip img { max-width:104px; max-height:38px; }

#lang-toggle,
#info-panel-btn {
  height:44px;
  border-radius:14px;
  border-color:var(--viewer-line);
  background:var(--viewer-surface);
  box-shadow:0 12px 30px rgba(0,0,0,.24);
}

#topbar #lang-toggle {
  position:static;
  inset:auto;
  flex:0 0 auto;
  height:42px;
  min-height:42px;
  width:42px;
  flex-basis:42px;
  padding:0;
  gap:6px;
  justify-content:center;
  border:1px solid color-mix(in srgb,var(--primary) 30%,var(--viewer-line));
  border-radius:13px;
  background:color-mix(in srgb,var(--primary) 8%,transparent);
  box-shadow:none;
}

#topbar #lang-toggle:hover {
  color:#11140f;
  border-color:var(--primary);
  background:var(--primary);
}

#topbar #lang-toggle svg {
  display:none;
}

#right-panel {
  top:16px;
  bottom:auto;
  left:16px;
  width:min(430px,calc(100vw - 32px));
  height:auto;
  max-height:calc(100dvh - 32px);
  padding:22px 0 0;
  overflow-x:hidden;
  overflow-y:auto;
  border:1px solid var(--viewer-line);
  border-radius:var(--viewer-radius-lg);
  background:
    linear-gradient(180deg,color-mix(in srgb,var(--primary) 12%,transparent),transparent 24%),
    var(--viewer-surface-strong);
  box-shadow:var(--viewer-shadow);
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--primary) 55%,transparent) transparent;
}

#right-panel.hidden { transform:translateX(calc(-100% - 22px)); }

.rp-panel-close {
  position:absolute;
  top:16px;
  left:16px;
  z-index:4;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--viewer-line);
  border-radius:14px;
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease,color .2s ease,transform .2s ease;
}

.rp-panel-close:hover {
  color:var(--primary);
  border-color:color-mix(in srgb,var(--primary) 52%,transparent);
  background:color-mix(in srgb,var(--primary) 12%,transparent);
  transform:scale(1.03);
}

.rp-panel-close svg { width:19px; height:19px; }

html[lang="ar"] #right-panel,
html[lang="ar"] .rp-header,
html[lang="ar"] .rp-section,
html[lang="ar"] .rp-stat,
html[lang="ar"] .rp-price-label { direction:rtl; text-align:right; }

html[lang="en"] #right-panel,
html[lang="en"] .rp-header,
html[lang="en"] .rp-section,
html[lang="en"] .rp-stat,
html[lang="en"] .rp-price-label { direction:ltr; text-align:left; }

.rp-header {
  position:relative;
  padding:8px 24px 20px;
  padding-left:72px;
  border-bottom-color:var(--viewer-line);
}
.rp-title { font-size:clamp(24px,2vw,30px); line-height:1.35; }
.rp-subtitle { margin-top:6px; color:var(--viewer-muted); line-height:1.65; }
.rp-badge-row {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch;
  padding:16px 24px;
  gap:9px;
  border-bottom-color:var(--viewer-line);
}
.rp-badge-item { min-width:0; width:100%; }
.rp-badge-pill {
  width:100%;
  min-height:38px;
  padding:7px 10px;
  justify-content:center;
  white-space:nowrap;
}
.rp-section { padding:16px 24px; border-bottom-color:var(--viewer-line); }
.rp-section-label { margin-bottom:12px; color:var(--viewer-muted); letter-spacing:0; text-transform:none; }
.rp-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.rp-stats-grid > .rp-stat:last-child:nth-child(odd) { grid-column:1 / -1; }
.rp-stat {
  min-width:0;
  min-height:72px;
  padding:13px 14px;
  border:1px solid var(--viewer-line);
  border-radius:16px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  background:var(--viewer-surface-soft);
  color:inherit;
  text-decoration:none;
}
.rp-stat-value {
  max-width:100%;
  color:#fff;
  font-size:17px;
  line-height:1.25;
  white-space:normal;
  unicode-bidi:plaintext;
  overflow-wrap:anywhere;
  word-break:normal;
}
.rp-stat-label {
  max-width:100%;
  color:var(--viewer-muted);
  font-size:10px;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.rp-detail-row { min-height:42px; border-bottom-color:rgba(255,255,255,.07); }
html[lang="ar"] .rp-detail-row { direction:rtl; }
html[lang="ar"] .rp-detail-val { text-align:left; }
.rp-contact-row .rp-detail-key { color:var(--viewer-muted); }
.rp-contact-row .rp-detail-val { max-width:62%; overflow-wrap:anywhere; }

.rp-cta-row {
  position:static;
  z-index:2;
  padding:14px 24px 18px;
  background:linear-gradient(180deg,transparent,var(--viewer-surface-strong) 22%);
  border-top:0;
  border-bottom:0;
}
.rp-header { order:1; }
.rp-badge-row { order:2; }
#rp-stats-section { order:3; }
#rp-price-section { order:4; }
#rp-details-section { order:5; }
#rp-contact-section { order:6; }
#right-panel #rp-cta-row { order:7 !important; }

.rp-btn-primary {
  min-height:50px;
  border-radius:16px;
  background:color-mix(in srgb,var(--primary) 92%,white 8%);
  color:#10130f;
  font-family:inherit;
  font-size:14px;
  box-shadow:0 12px 28px color-mix(in srgb,var(--primary) 22%,transparent);
}

#rp-toggle {
  display:none !important;
}

body.panel-open { --desktop-panel-left:446px; --desktop-panel-half:223px; }

body.panel-open #topbar {
  right:auto;
  left:calc(50% + var(--desktop-panel-half));
  transform:translateX(-50%);
}

body.panel-open #render-nav,
body.panel-open #pano-toolbar,
body.panel-open #pano-info-chip,
body.panel-open #render-label { margin-left:var(--desktop-panel-half); }

body.panel-open #render-controls,
body.panel-open #map-controls {
  left:20px !important;
}

#render-nav,
#pano-toolbar {
  bottom:20px;
  height:54px;
  min-height:54px;
  max-height:54px;
  padding:6px;
  border-radius:18px;
}

.rn-btn,
.pt-btn {
  min-height:40px;
  padding:0 16px;
  border-radius:13px;
  font-weight:700;
}

#render-controls,
#map-controls { bottom:20px; gap:0; }

#render-controls {
  height:54px;
  min-height:54px;
  max-height:54px;
  padding:4px;
  border:1px solid var(--viewer-line);
  border-radius:17px;
  background:var(--viewer-surface);
  box-shadow:0 14px 36px rgba(0,0,0,.26);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
}

#render-controls .mc-row { gap:2px; }

#pano-scenes-toggle {
  position:fixed;
  left:20px;
  bottom:20px;
  z-index:62;
  display:none;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:54px;
  padding:0 16px;
  border:1px solid var(--viewer-line);
  border-radius:18px;
  background:var(--viewer-surface);
  color:#fff;
  font-family:inherit;
  font-size:12px;
  font-weight:750;
  line-height:1;
  box-shadow:0 14px 36px rgba(0,0,0,.26);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
  cursor:pointer;
}

#pano-scenes-toggle svg { width:18px; height:18px; }
#pano-scenes-toggle.active { color:#11140f; background:var(--primary); border-color:var(--primary); }

#pano-unit-info-toggle {
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:64;
  min-height:54px;
  padding:0 16px;
  display:none;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid color-mix(in srgb,var(--primary) 38%,var(--viewer-line));
  border-radius:18px;
  background:var(--viewer-surface);
  color:#fff;
  font-family:inherit;
  font-size:12px;
  font-weight:800;
  box-shadow:0 14px 36px rgba(0,0,0,.28);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
  cursor:pointer;
}

#pano-unit-info-toggle svg { width:17px; height:17px; color:var(--primary); }
#pano-unit-info-toggle.active { color:#11140f; background:var(--primary); border-color:var(--primary); }
#pano-unit-info-toggle.active svg { color:#11140f; }
body.panorama-mode #pano-unit-info-toggle:not([hidden]) { display:flex; }

#pano-unit-info-panel {
  position:fixed;
  right:20px;
  bottom:84px;
  z-index:63;
  width:min(340px,calc(100vw - 40px));
  max-height:min(520px,calc(100dvh - 112px));
  overflow:auto;
  padding:18px;
  border-radius:22px;
  background:var(--viewer-surface-strong);
  border-color:color-mix(in srgb,var(--primary) 30%,var(--viewer-line));
  box-shadow:var(--viewer-shadow);
}

#pano-unit-info-panel[hidden] { display:none !important; }
#pano-unit-info-panel header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
#pano-unit-info-panel header small { color:var(--primary); font-size:10px; font-weight:850; }
#pano-unit-info-panel header h2 { margin:4px 0 0; color:#fff; font-size:22px; line-height:1.25; }
#pano-unit-info-panel header button {
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--viewer-line);
  border-radius:12px;
  background:rgba(255,255,255,.055);
  color:#fff;
  cursor:pointer;
}
#pano-unit-info-panel header button svg { width:17px; height:17px; }
#pano-unit-info-panel > p { margin:14px 0; color:var(--viewer-muted); font-size:12px; line-height:1.8; }
#pui-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.pui-fact { min-height:62px; padding:11px 12px; display:flex; flex-direction:column; justify-content:center; gap:4px; border:1px solid var(--viewer-line); border-radius:14px; background:rgba(255,255,255,.045); }
.pui-fact strong { color:#fff; font-size:17px; line-height:1; }
.pui-fact span { color:var(--viewer-muted); font-size:10px; }

body.panorama-mode #topbar,
body.panorama-mode #info-panel-btn,
body.panorama-mode #right-panel,
body.panorama-mode #rp-toggle,
body.panorama-mode #render-nav,
body.panorama-mode #render-label,
body.panorama-mode #render-controls,
body.panorama-mode #map-controls,
body.panorama-mode #map-style-btn,
body.panorama-mode #map-style-menu,
body.panorama-mode #pano-info-chip,
body.panorama-mode #pano-toolbar,
body.panorama-mode #pano-controls {
  display:none !important;
}

body.panorama-mode #pano-scenes-toggle { display:flex; }

body.panorama-mode #pano-room-list.visible {
  position:fixed;
  inset:auto auto 20px 50%;
  width:auto;
  max-width:min(760px,calc(100vw - 210px));
  height:54px;
  max-height:54px;
  padding:5px;
  gap:4px;
  display:flex;
  flex-direction:row;
  align-items:center;
  overflow-x:auto;
  overflow-y:hidden;
  transform:translateX(-50%);
  border-radius:18px;
  scrollbar-width:none;
  z-index:61;
}

body.panorama-mode #pano-room-list::-webkit-scrollbar { display:none; }
body.panorama-mode #pano-room-list.collapsed { display:none !important; }

body.panorama-mode #pano-room-list .room-item {
  flex:0 0 auto;
  min-width:142px;
  height:44px;
  padding:4px 11px 4px 5px;
  gap:9px;
  appearance:none;
  background:transparent;
  border:1px solid transparent;
  border-radius:13px;
  color:#fff;
  font-family:inherit;
  text-align:start;
}

body.panorama-mode #pano-room-list .room-item:hover {
  background:var(--viewer-surface-soft);
  border-color:var(--viewer-line);
}

body.panorama-mode #pano-room-list .room-item.active {
  background:color-mix(in srgb,var(--primary) 16%,transparent);
  border-color:color-mix(in srgb,var(--primary) 48%,transparent);
}

body.panorama-mode #pano-room-list .room-thumb {
  width:46px;
  height:34px;
  border-radius:9px;
}

body.panorama-mode #pano-room-list .room-name {
  max-width:110px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  font-weight:800;
}

.mc-btn,
.pc-btn {
  width:44px;
  height:44px;
  border-radius:14px;
  background:var(--viewer-surface);
  border-color:var(--viewer-line);
}

#contact-overlay { padding:18px; background:rgba(0,0,0,.68); }
.contact-modal { width:min(520px,100%); border-radius:var(--viewer-radius-lg); background:var(--viewer-surface-strong); border-color:var(--viewer-line); box-shadow:var(--viewer-shadow); }
.contact-header { padding:20px 24px; }
.contact-close { width:42px; height:42px; border-radius:14px; }

@media (min-width:769px) {
  #tb-contact { display:none !important; }
  #topbar { top:var(--viewer-top-edge); }

  body:not(.panel-open):not(.panorama-mode) #info-panel-btn {
    display:flex;
    top:var(--viewer-top-edge);
    left:18px;
    width:132px;
    height:58px;
    padding:0 16px;
    justify-content:center;
    border-radius:18px;
  }

  body:not(.panel-open):not(.panorama-mode) #rp-toggle { display:none; }

  #right-panel {
    top:var(--viewer-top-edge);
    bottom:auto;
    width:min(430px,calc(100vw - 32px));
    height:max-content;
    max-height:calc(100dvh - 36px);
    padding-top:18px;
    overflow-x:hidden;
    overflow-y:auto;
  }

  .rp-header { padding:6px 24px 18px 72px; }
  .rp-title { font-size:28px; line-height:1.3; }
  .rp-subtitle { margin-top:7px; font-size:12px; line-height:1.7; }
  .rp-badge-row { padding:14px 24px; gap:9px; }
  .rp-badge-pill { min-height:38px; padding:7px 9px; }
  .rp-cta-row { padding:14px 24px 18px; }
  .rp-btn-primary { min-height:50px; border-radius:16px; font-size:14px; }
  .rp-section { padding:15px 24px; }
  .rp-section-label { margin-bottom:11px; }
  .rp-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .rp-stat { min-height:74px; padding:12px 14px; border-radius:15px; }
  .rp-stat-value { font-size:17px; }
  .rp-stat-label { font-size:10px; line-height:1.5; }
  .rp-detail-row { min-height:40px; font-size:12px; }
  .rp-price-label { display:block; }

  body.panel-open {
    --desktop-panel-left:446px;
    --desktop-panel-half:223px;
  }
  body.panel-open #render-controls,
  body.panel-open #map-controls { left:20px !important; }
}

@media (max-width:768px) {
  :root {
    --mobile-safe-bottom:max(10px,env(safe-area-inset-bottom,0px));
    --mobile-nav-height:64px;
  }

  #logo-chip,
  #logo-chip.pano-logo-visible {
    top:max(10px,env(safe-area-inset-top,0px));
    right:10px;
    width:112px;
    min-height:46px;
    max-height:46px;
    padding:6px 10px;
    border-radius:15px;
  }

  #logo-chip img { max-width:88px; max-height:30px; }

  #info-panel-btn {
    display:flex;
    top:var(--viewer-top-edge);
    left:10px;
    width:102px;
    height:46px;
    padding:0 13px;
    justify-content:center;
    border-radius:15px;
    z-index:41;
  }

  #topbar #lang-toggle {
    position:static;
    flex:1 1 0;
    min-width:0;
    width:auto;
    height:54px;
    min-height:54px;
    padding:5px 3px;
    border-radius:15px;
    flex-direction:column;
    justify-content:center;
    gap:3px;
    z-index:auto;
  }

  #topbar #lang-toggle svg {
    width:18px;
    height:18px;
  }

  #topbar #lang-label {
    font-size:10px;
    line-height:1;
  }

  #topbar {
    position:fixed;
    inset:auto 10px var(--mobile-safe-bottom) 10px;
    width:auto;
    max-width:none;
    min-height:var(--mobile-nav-height);
    height:var(--mobile-nav-height);
    padding:5px;
    gap:2px;
    border-radius:20px;
    transform:none;
    z-index:50;
    overflow:visible;
  }

  .topbar-sep { display:none; }

  .topbar-btn,
  .topbar-icon-btn {
    flex:1 1 0;
    min-width:0;
    min-height:54px;
    height:54px;
    padding:5px 3px;
    border-radius:15px;
    flex-direction:column;
    justify-content:center;
    gap:3px;
  }

  .topbar-btn .tb-icon,
  .topbar-icon-btn .tb-icon {
    height:20px;
    display:grid;
    place-items:center;
  }

  .tb-label,
  .topbar-icon-btn .tb-label {
    max-width:100%;
    font-size:10px;
    line-height:1;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .topbar-btn.active { box-shadow:none; }

  .units-dropdown {
    position:fixed;
    right:10px;
    left:10px;
    top:auto;
    bottom:calc(var(--mobile-safe-bottom) + var(--mobile-nav-height) + 8px);
    max-height:min(48vh,380px);
    overflow:auto;
    border-radius:20px;
    background:var(--viewer-surface-strong);
    box-shadow:var(--viewer-shadow);
  }

  #right-panel {
    position:fixed;
    inset:auto 10px calc(var(--mobile-safe-bottom) + var(--mobile-nav-height) + 8px) 10px;
    width:auto;
    height:min(68dvh,580px);
    max-height:min(68dvh,580px);
    padding:26px 0 0;
    border-radius:26px;
    transform:none;
    z-index:46;
    overscroll-behavior:contain;
  }

  #right-panel::before {
    content:"";
    position:absolute;
    top:9px;
    left:50%;
    width:44px;
    height:4px;
    border-radius:99px;
    background:rgba(255,255,255,.38);
    transform:translateX(-50%);
  }

  #right-panel.hidden { transform:translateY(calc(100% + var(--mobile-nav-height) + 40px)); }
  .rp-panel-close {
    top:15px;
    left:15px;
    width:40px;
    height:40px;
    border-radius:13px;
  }
  .rp-header { padding:6px 18px 14px 62px; }
  .rp-title { font-size:22px !important; }
  .rp-subtitle { margin-top:5px; font-size:11px; line-height:1.65; }

  .rp-badge-row,
  .rp-cta-row,
  .rp-section { padding-right:18px; padding-left:18px; }

  .rp-badge-row {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    padding-top:10px;
    padding-bottom:10px;
  }
  .rp-badge-pill {
    min-height:36px;
    padding:6px 5px;
    font-size:11px;
  }
  .rp-section { padding-top:14px; padding-bottom:14px; }
  .rp-stats-grid { grid-template-columns:1fr 1fr; }
  .rp-stat { min-height:68px; padding:11px 12px; }
  .rp-stat-value { font-size:17px; }

  #right-panel .rp-cta-row {
    display:block !important;
    grid-template-columns:1fr;
    margin:0;
    padding-top:12px;
    padding-bottom:14px;
  }

  #right-panel .rp-btn-primary { width:100%; min-height:46px; }
  #rp-toggle { display:none !important; }

  body.compact-panel-open #info-panel-btn { display:none !important; }

  body.compact-panel-open #render-nav,
  body.compact-panel-open #pano-toolbar,
  body.compact-panel-open #pano-info-chip,
  body.compact-panel-open #render-label,
  body.compact-panel-open #render-controls,
  body.compact-panel-open #map-controls {
    opacity:0;
    pointer-events:none;
  }

  #render-nav,
  #pano-toolbar {
    position:fixed;
    left:10px;
    right:10px;
    bottom:calc(var(--mobile-safe-bottom) + var(--mobile-nav-height) + 8px);
    width:auto;
    max-width:none;
    min-height:48px;
    padding:4px;
    margin:0;
    border-radius:17px;
    transform:none;
    overflow-x:auto;
    scrollbar-width:none;
    z-index:32;
  }

  #render-nav::-webkit-scrollbar,
  #pano-toolbar::-webkit-scrollbar { display:none; }

  .rn-btn,
  .pt-btn {
    min-height:40px;
    padding:0 13px;
    flex:0 0 auto;
    border-radius:13px;
    font-size:11px;
  }

  #render-nav .rn-btn.active {
    background:var(--primary) !important;
    border-color:var(--primary) !important;
    color:#11140f !important;
  }

  #render-label {
    top:max(68px,calc(env(safe-area-inset-top,0px) + 68px));
    bottom:auto;
    left:50%;
    max-width:calc(100vw - 132px);
    margin:0;
    transform:translateX(-50%);
  }

  #pano-info-chip { display:none !important; }

  body.panorama-mode #logo-chip,
  body.panorama-mode #logo-chip.pano-logo-visible {
    top:max(10px,env(safe-area-inset-top,0px));
    right:10px;
  }

  body.panorama-mode #pano-scenes-toggle {
    left:10px;
    bottom:var(--mobile-safe-bottom);
    width:48px;
    height:48px;
    padding:0;
    border-radius:16px;
  }

  body.panorama-mode #pano-scenes-toggle span { display:none; }

  body.panorama-mode #pano-room-list.visible {
    inset:auto 10px var(--mobile-safe-bottom) 68px !important;
    width:auto;
    max-width:none;
    height:48px;
    max-height:48px;
    padding:4px;
    transform:none;
    display:flex;
    grid-auto-flow:unset;
    grid-auto-columns:unset;
  }

  body.panorama-mode #pano-room-list .room-item {
    min-width:116px;
    height:40px;
    padding:4px 8px 4px 4px;
    gap:7px;
  }

  body.panorama-mode #pano-room-list .room-thumb { width:38px; height:30px; }
  body.panorama-mode #pano-room-list .room-name { max-width:72px; font-size:10px; }

  #pano-room-list {
    top:112px;
    right:10px;
    left:10px;
    bottom:auto;
    width:auto;
    max-height:116px;
    transform:none;
    border-radius:18px;
    padding:5px;
    grid-auto-flow:column;
    grid-auto-columns:minmax(138px,42vw);
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
  }

  #pano-room-list.visible { display:grid; }
  #pano-room-list::-webkit-scrollbar { display:none; }
  #pano-room-list .room-item { min-width:0; padding:8px 9px; gap:8px; }
  #pano-room-list .room-thumb { width:40px; height:32px; }
  #pano-room-list .room-name { font-size:11px; }
  #pano-room-list .room-sub { font-size:9px; }

  #render-controls,
  #map-controls,
  #pano-controls { display:none !important; }

  #map-style-menu {
    top:112px;
    left:10px;
    right:10px;
    min-width:0;
    border-radius:20px;
    background:var(--viewer-surface-strong);
  }

  #contact-overlay { align-items:flex-end; padding:10px; }

  .contact-modal {
    width:100%;
    max-width:none;
    max-height:min(78vh,660px);
    border-radius:26px;
    animation:viewerSheetIn .24s ease both;
  }

  .contact-header { padding:16px 18px; }
  .contact-body { padding:18px; }

  @keyframes viewerSheetIn {
    from { opacity:0; transform:translateY(24px); }
    to { opacity:1; transform:translateY(0); }
  }
}

@media (max-width:380px) {
  .tb-label,
  .topbar-icon-btn .tb-label { font-size:9px; }
  #info-panel-btn { width:94px; }
  .rp-stats-grid { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion:reduce) {
  #right-panel,
  #topbar,
  #render-nav,
  #pano-toolbar,
  .contact-modal {
    transition-duration:.01ms !important;
    animation-duration:.01ms !important;
  }
}

/* Premium contact experience */
#contact-overlay {
  padding:22px;
  background:rgba(2,5,4,.72);
  backdrop-filter:blur(16px) saturate(120%);
  -webkit-backdrop-filter:blur(16px) saturate(120%);
}

.contact-modal {
  width:min(920px,100%);
  max-height:min(760px,calc(100dvh - 44px));
  display:grid;
  grid-template-columns:minmax(290px,.88fr) minmax(390px,1.12fr);
  direction:ltr;
  overflow:hidden;
  border-radius:32px;
  background:var(--viewer-surface-strong);
  border:1px solid var(--viewer-line);
  box-shadow:0 34px 100px rgba(0,0,0,.58);
}

.contact-experience {
  position:relative;
  min-height:620px;
  overflow:hidden;
  color:#fff;
  background:#0a0e0c;
}

.contact-experience-cover,
.contact-experience-glow {
  position:absolute;
  inset:0;
  pointer-events:none;
}

.contact-experience-cover {
  background-image:
    linear-gradient(180deg,rgba(5,8,7,.26),rgba(5,8,7,.94) 78%),
    var(--contact-cover);
  background-position:center;
  background-size:cover;
  opacity:.56;
  transform:scale(1.035);
  transition:transform 8s ease;
}

.contact-modal:hover .contact-experience-cover { transform:scale(1.075); }

.contact-experience-glow {
  background:
    radial-gradient(circle at 22% 16%,color-mix(in srgb,var(--primary) 48%,transparent),transparent 34%),
    linear-gradient(145deg,color-mix(in srgb,var(--primary) 14%,transparent),transparent 52%);
  opacity:.78;
}

.contact-experience-content {
  position:relative;
  z-index:1;
  height:100%;
  min-height:620px;
  display:flex;
  flex-direction:column;
  padding:34px;
}

html[lang="ar"] .contact-experience,
html[lang="ar"] .contact-main { direction:rtl; text-align:right; }
html[lang="en"] .contact-experience,
html[lang="en"] .contact-main { direction:ltr; text-align:left; }

.contact-live-status {
  width:max-content;
  max-width:100%;
  display:flex;
  align-items:center;
  gap:9px;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  background:rgba(4,8,6,.42);
  color:rgba(255,255,255,.82);
  font-size:10px;
  font-weight:750;
  backdrop-filter:blur(12px);
}

.contact-live-dot {
  width:8px;
  height:8px;
  flex:0 0 auto;
  border-radius:50%;
  background:#55c98d;
  box-shadow:0 0 0 5px rgba(85,201,141,.12);
  animation:contactLivePulse 2.4s ease-in-out infinite;
}

@keyframes contactLivePulse {
  0%,100% { box-shadow:0 0 0 4px rgba(85,201,141,.10); }
  50% { box-shadow:0 0 0 9px rgba(85,201,141,0); }
}

.contact-project-mark {
  width:62px;
  height:62px;
  margin-top:auto;
  display:grid;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--primary) 66%,transparent);
  border-radius:20px;
  background:color-mix(in srgb,var(--primary) 14%,rgba(4,8,6,.72));
  color:var(--primary);
  box-shadow:0 18px 42px color-mix(in srgb,var(--primary) 18%,transparent);
}

.contact-project-mark svg { width:27px; height:27px; }
.contact-kicker { margin-top:22px; color:var(--primary); font-size:11px; font-weight:850; }
.contact-project-name { margin:6px 0 0; color:#fff; font-size:clamp(25px,3vw,38px); line-height:1.25; letter-spacing:-.5px; }
.contact-experience-copy { margin:13px 0 0; color:rgba(255,255,255,.7); font-size:12px; line-height:1.9; }

.contact-assurances {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:20px;
}

.contact-assurances span {
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.1);
  color:rgba(255,255,255,.8);
}

.contact-assurances svg { width:14px; height:14px; color:var(--primary); }
.contact-assurances b { font-size:9px; font-weight:750; }

.contact-quick-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:20px;
}

.contact-quick-action {
  min-width:0;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:14px;
  background:rgba(4,8,6,.44);
  color:#fff;
  text-decoration:none;
  font-size:10px;
  font-weight:800;
  transition:background .2s ease,border-color .2s ease,transform .2s ease;
}

.contact-quick-action:hover {
  background:color-mix(in srgb,var(--primary) 15%,rgba(4,8,6,.58));
  border-color:color-mix(in srgb,var(--primary) 52%,transparent);
  transform:translateY(-2px);
}

.contact-quick-action svg { width:15px; height:15px; color:var(--primary); }

.contact-main {
  min-width:0;
  max-height:min(760px,calc(100dvh - 44px));
  overflow-y:auto;
  background:
    radial-gradient(circle at 88% 4%,color-mix(in srgb,var(--primary) 8%,transparent),transparent 30%),
    #0b0f0d;
}

.contact-header {
  align-items:flex-start;
  padding:30px 34px 22px;
  border-bottom:1px solid var(--viewer-line);
  background:transparent;
}

.contact-eyebrow { color:var(--primary); font-size:10px; font-weight:850; }
.contact-title { margin-top:5px; color:#fff; font-size:25px; line-height:1.3; }
.contact-header-copy { margin-top:5px; color:var(--viewer-muted); font-size:11px; }
.contact-close { width:42px; height:42px; flex:0 0 auto; border-radius:14px; background:rgba(255,255,255,.05); }
.contact-body { padding:24px 34px 32px; }

.cf-field { margin-bottom:15px; }
.cf-label {
  margin-bottom:7px;
  color:rgba(255,255,255,.75);
  font-size:10px;
  letter-spacing:0;
}
.cf-required { margin-inline-start:4px; color:var(--primary); }

.cf-control {
  position:relative;
  display:flex;
  align-items:center;
  min-height:52px;
  border:1px solid var(--viewer-line);
  border-radius:15px;
  background:rgba(255,255,255,.045);
  transition:border-color .2s ease,background .2s ease,box-shadow .2s ease,transform .2s ease;
}

.cf-control:focus-within {
  border-color:color-mix(in srgb,var(--primary) 62%,transparent);
  background:color-mix(in srgb,var(--primary) 6%,rgba(255,255,255,.045));
  box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 10%,transparent);
  transform:translateY(-1px);
}

.cf-control.error {
  border-color:#e46b64;
  box-shadow:0 0 0 4px rgba(228,107,100,.1);
}

.cf-control > svg {
  width:17px;
  height:17px;
  margin-inline-start:16px;
  color:rgba(255,255,255,.44);
  transition:color .2s ease;
}
.cf-control:focus-within > svg { color:var(--primary); }

.cf-control .cf-input {
  min-width:0;
  min-height:50px;
  padding:13px;
  border:0 !important;
  border-radius:15px;
  background:transparent !important;
  box-shadow:none !important;
}

.cf-control-textarea { align-items:flex-start; }
.cf-control-textarea > svg { margin-top:17px; }
.cf-control .cf-textarea { min-height:88px; resize:vertical; }

.cf-submit {
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:6px;
  padding:0 20px;
  border-radius:16px;
  background:color-mix(in srgb,var(--primary) 92%,white 8%);
  color:#10130f;
  box-shadow:0 16px 34px color-mix(in srgb,var(--primary) 22%,transparent);
}

.cf-submit:hover {
  opacity:1;
  transform:translateY(-2px);
  box-shadow:0 20px 42px color-mix(in srgb,var(--primary) 30%,transparent);
}
.cf-submit svg { width:18px; height:18px; transition:transform .2s ease; }
.cf-submit:hover svg { transform:translateX(-3px); }
html[lang="en"] .cf-submit:hover svg { transform:translateX(3px); }
.cf-submit-loader { animation:contactLoaderSpin .9s linear infinite; }
@keyframes contactLoaderSpin { to { transform:rotate(360deg); } }

.cf-success {
  min-height:500px;
  padding:80px 38px;
  align-content:center;
}
.cf-success.visible { display:grid; }
.cf-success-icon {
  width:76px;
  height:76px;
  margin:0 auto 22px;
  display:grid;
  place-items:center;
  border-radius:24px;
  background:color-mix(in srgb,var(--primary) 13%,transparent);
  border:1px solid color-mix(in srgb,var(--primary) 44%,transparent);
}
.cf-success-text { font-size:22px; }
.cf-success-sub { margin-top:4px; color:var(--viewer-muted); }
.cf-success-close {
  width:max-content;
  margin:24px auto 0;
  padding:11px 18px;
  border:1px solid var(--viewer-line);
  border-radius:13px;
  background:rgba(255,255,255,.06);
  color:#fff;
  font-family:inherit;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

@media (max-width:768px) {
  #contact-overlay { align-items:flex-end; padding:10px; }
  .contact-modal {
    width:100%;
    max-width:none;
    max-height:calc(100dvh - 20px);
    grid-template-columns:1fr;
    border-radius:26px;
    overflow-y:auto;
  }
  .contact-experience { min-height:210px; }
  .contact-experience-content { min-height:210px; padding:20px; }
  .contact-project-mark { width:44px; height:44px; margin-top:28px; border-radius:15px; }
  .contact-project-mark svg { width:20px; height:20px; }
  .contact-kicker { margin-top:12px; }
  .contact-project-name { font-size:24px; }
  .contact-experience-copy { display:none; }
  .contact-assurances { margin-top:12px; }
  .contact-quick-actions { display:none; }
  .contact-main { max-height:none; overflow:visible; }
  .contact-header { padding:20px 20px 16px; }
  .contact-title { font-size:21px; }
  .contact-body { padding:18px 20px 24px; }
  .cf-control { min-height:50px; }
  .cf-control .cf-input { min-height:48px; }
  .cf-success { min-height:360px; padding:62px 24px; }
}

@media (prefers-reduced-motion:reduce) {
  .contact-live-dot,
  .cf-submit-loader { animation:none; }
  .contact-experience-cover,
  .contact-quick-action,
  .cf-control,
  .cf-submit { transition:none; }
}

/* Simplified contact card: a clean project image and an unobstructed form. */
.contact-modal { position:relative; }
.contact-modal > .contact-close {
  position:absolute;
  top:22px;
  left:22px;
  z-index:12;
  display:grid;
  place-items:center;
  color:#fff;
  border:1px solid rgba(255,255,255,.2);
  background:rgba(4,8,6,.62);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.contact-modal > .contact-close:hover {
  border-color:color-mix(in srgb,var(--primary) 62%,transparent);
  background:color-mix(in srgb,var(--primary) 18%,rgba(4,8,6,.74));
}
.contact-experience-cover {
  background-image:
    linear-gradient(180deg,rgba(5,8,7,.05),rgba(5,8,7,.12) 50%,rgba(5,8,7,.82)),
    var(--contact-cover);
  opacity:1;
}
.contact-experience-glow {
  background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 10%,transparent),transparent 48%);
  opacity:.72;
}
.contact-experience-content {
  justify-content:flex-end;
  padding:34px;
}
.contact-project-name {
  width:max-content;
  max-width:100%;
  margin:0;
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(4,8,6,.58);
  font-size:18px;
  line-height:1.4;
  letter-spacing:0;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.contact-experience-content .contact-experience-copy {
  display:block;
  max-width:310px;
  margin-top:14px;
  color:rgba(255,255,255,.76);
}
.contact-experience-content .contact-quick-actions {
  margin-top:18px;
}
.contact-title { margin-top:0; }

@media (max-width:768px) {
  .contact-modal > .contact-close { top:18px; left:18px; }
  .contact-experience { min-height:230px; }
  .contact-experience-content { min-height:230px; padding:20px; }
  .contact-project-name { font-size:16px; }
  .contact-experience-content .contact-experience-copy,
  .contact-experience-content .contact-quick-actions { display:none; }
}

/* Viewer navigation stays centered on the viewport, independent of the info panel. */
@media (min-width:769px) {
  #topbar,
  body.panel-open #topbar {
    right:auto;
    left:50%;
    margin:0;
    transform:translateX(-50%);
  }

  #render-nav,
  #pano-toolbar,
  #pano-info-chip,
  #render-label,
  body.panel-open #render-nav,
  body.panel-open #pano-toolbar,
  body.panel-open #pano-info-chip,
  body.panel-open #render-label {
    margin-left:0;
    transform:translateX(-50%);
  }
}

@media (max-width:768px) {
  body.compact-panel-open #render-nav,
  body.compact-panel-open #pano-toolbar,
  body.compact-panel-open #pano-info-chip,
  body.compact-panel-open #render-label {
    opacity:1;
    pointer-events:auto;
  }

  body.compact-panel-open #right-panel {
    bottom:calc(var(--mobile-safe-bottom) + var(--mobile-nav-height) + 64px) !important;
    height:min(58dvh,500px);
    max-height:min(58dvh,500px);
  }

  #render-nav,
  #pano-toolbar {
    z-index:48;
  }
}

/* Balanced primary navigation and explicit render stepping. */
#topbar .tb-label {
  font-size:12px;
  line-height:1;
  font-weight:760;
}

#topbar .tb-icon,
#topbar .tb-icon svg {
  width:17px;
  height:17px;
}

#topbar .topbar-btn,
#topbar .topbar-icon-btn {
  padding-inline:18px;
}

#topbar {
  background:
    linear-gradient(90deg,color-mix(in srgb,var(--primary) 5%,transparent),transparent 32%,transparent 68%,color-mix(in srgb,var(--primary) 5%,transparent)),
    var(--viewer-surface);
  border-color:color-mix(in srgb,var(--primary) 20%,var(--viewer-line));
}

#topbar #tb-map .tb-icon,
#topbar #tb-panorama .tb-icon {
  width:20px;
  height:20px;
  display:grid;
  place-items:center;
  border-radius:7px;
  color:var(--primary);
  border:1px solid color-mix(in srgb,var(--primary) 38%,transparent);
  background:color-mix(in srgb,var(--primary) 10%,transparent);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}

#topbar #tb-map .tb-icon svg,
#topbar #tb-panorama .tb-icon svg {
  width:12px;
  height:12px;
}

#topbar #tb-panorama .tb-icon {
  border-radius:50%;
  box-shadow:
    inset 0 0 0 3px rgba(8,12,11,.82),
    0 0 0 1px color-mix(in srgb,var(--primary) 25%,transparent);
}

#topbar #tb-map:hover .tb-icon,
#topbar #tb-panorama:hover .tb-icon {
  border-color:var(--primary);
  background:color-mix(in srgb,var(--primary) 18%,transparent);
}

#topbar .topbar-btn.active .tb-icon {
  color:#11140f;
  border-color:rgba(17,20,15,.28);
  background:rgba(17,20,15,.12);
  box-shadow:none;
}

#render-nav {
  padding:5px;
  overflow:hidden;
}

#render-nav .rn-track {
  min-width:0;
  display:flex;
  align-items:center;
  gap:3px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-behavior:smooth;
  scrollbar-width:none;
}

#render-nav .rn-track::-webkit-scrollbar { display:none; }

#render-nav .rn-step {
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:13px;
  border:1px solid var(--viewer-line);
  background:var(--viewer-surface-strong);
  color:#fff;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,color .18s ease;
}

#render-nav .rn-step svg {
  width:18px;
  height:18px;
}

#render-nav .rn-step:hover {
  color:#11140f;
  background:var(--primary);
  border-color:var(--primary);
}

#render-nav.single-render .rn-step,
#render-arrows {
  display:none !important;
}

@media (max-width:768px) {
  :root { --mobile-nav-height:58px; }

  #topbar {
    min-height:var(--mobile-nav-height);
    height:var(--mobile-nav-height);
    border-radius:18px;
  }

  #topbar #lang-toggle,
  #topbar .topbar-btn,
  #topbar .topbar-icon-btn {
    min-height:48px;
    height:48px;
    padding:0 2px;
    gap:2px;
    flex-direction:column;
  }

  #topbar #lang-toggle {
    flex:0 0 36px;
    width:36px;
    min-width:36px;
    padding:0;
    border-radius:12px;
    flex-direction:row;
    gap:0;
  }

  #topbar #lang-label {
    font-size:9px;
    font-weight:850;
    letter-spacing:.35px;
  }

  #topbar .topbar-btn,
  #topbar .topbar-menu-wrap {
    flex:1 1 0;
    min-width:0;
  }

  #topbar .tb-label,
  #topbar .topbar-icon-btn .tb-label,
  #topbar #lang-label {
    max-width:none;
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    text-align:center;
    overflow-wrap:normal;
    word-break:normal;
    font-size:9.5px;
    font-weight:750;
    line-height:1.12;
  }

  #topbar #tb-renders .tb-label { font-size:8.75px; }
  html[lang="en"] #topbar #tb-renders .tb-label {
    font-size:8px;
    letter-spacing:-.15px;
  }

  #topbar .tb-icon,
  #topbar .topbar-icon-btn .tb-icon,
  #topbar #lang-toggle svg { display:none; }

  #topbar #tb-map .tb-icon,
  #topbar #tb-panorama .tb-icon {
    width:15px;
    height:15px;
    display:grid;
    flex:0 0 15px;
    border-radius:50%;
    border:0;
    background:transparent;
    box-shadow:none;
  }

  #topbar #tb-map .tb-icon svg,
  #topbar #tb-panorama .tb-icon svg {
    width:12px;
    height:12px;
  }

  #topbar #tb-map .tb-icon,
  #topbar #tb-panorama .tb-icon {
    width:10px;
    height:10px;
    flex-basis:10px;
  }

  #topbar #tb-map .tb-icon svg,
  #topbar #tb-panorama .tb-icon svg {
    width:10px;
    height:10px;
  }

  #topbar #tb-map,
  #topbar #tb-panorama {
    gap:2px;
    flex-direction:column;
  }

  #topbar #tb-panorama .tb-label {
    color:color-mix(in srgb,var(--primary) 88%,white 12%);
  }

  html[lang="en"] #topbar #tb-panorama .tb-label {
    font-size:8.75px;
  }

  #topbar #tb-panorama.active .tb-label,
  #topbar #tb-panorama.active .tb-icon {
    color:#11140f;
  }

  #topbar #tb-fullscreen { display:none; }

  #render-nav {
    min-height:48px;
    height:48px;
    padding:4px;
  }

  #render-nav .rn-btn {
    min-height:38px;
    height:38px;
    padding:0 11px;
    font-size:10px;
  }

  #render-nav .rn-btn svg {
    display:none;
  }

#render-nav .rn-step {
    width:40px;
    height:40px;
    flex-basis:40px;
    border-radius:12px;
  }
}

@media (max-width:768px) {
  #pano-unit-info-toggle {
    right:10px;
    bottom:max(10px,env(safe-area-inset-bottom));
    min-height:48px;
    padding:0 12px;
    border-radius:16px;
    font-size:10px;
  }

  #pano-unit-info-toggle svg { width:15px; height:15px; }

  #pano-unit-info-panel {
    right:10px;
    bottom:calc(max(10px,env(safe-area-inset-bottom)) + 56px);
    width:calc(100vw - 20px);
    max-height:min(54dvh,460px);
    padding:16px;
    border-radius:20px;
  }

  #pano-unit-info-panel header h2 { font-size:19px; }
  #pano-unit-info-panel > p { font-size:11px; line-height:1.7; }
  .pui-fact { min-height:56px; padding:9px 10px; }
  .pui-fact strong { font-size:15px; }
}

/* Panorama scene navigation and apartment information */
#pano-scenes-rail { display:none; }
body.panorama-mode #pano-scenes-rail {
  position:fixed;
  left:50%;
  bottom:20px;
  z-index:65;
  width:min(850px,calc(100vw - 390px));
  height:58px;
  padding:5px;
  display:flex;
  align-items:center;
  gap:5px;
  transform:translateX(-50%);
  border-radius:19px;
  background:var(--viewer-surface);
  border:1px solid var(--viewer-line);
  box-shadow:0 14px 36px rgba(0,0,0,.28);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
}
body.panorama-mode #pano-scenes-rail.collapsed { display:none !important; }
body.panorama-mode #pano-scenes-rail #pano-room-list.visible {
  position:static;
  inset:auto;
  flex:1 1 auto;
  width:auto;
  min-width:0;
  max-width:none;
  height:48px;
  max-height:48px;
  padding:2px;
  transform:none;
  border:0;
  border-radius:14px;
  background:transparent;
  box-shadow:none;
}
.pano-scene-step {
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--viewer-line);
  border-radius:13px;
  background:rgba(255,255,255,.055);
  color:#fff;
  cursor:pointer;
}
.pano-scene-step:hover { color:#11140f; background:var(--primary); border-color:var(--primary); }
.pano-scene-step svg { width:18px; height:18px; }

#pano-unit-info-toggle {
  top:25px;
  left:20px;
  right:auto;
  bottom:auto;
}
#pano-unit-info-panel {
  top:89px;
  left:20px;
  right:auto;
  bottom:auto;
}
#pui-media { display:flex; gap:9px; margin:0 0 12px; overflow-x:auto; scrollbar-width:none; scroll-snap-type:x proximity; }
#pui-media:empty,
#pui-sections:empty { display:none; }
#pui-media::-webkit-scrollbar { display:none; }
.pui-media-item {
  position:relative;
  flex:0 0 min(250px,82%);
  margin:0;
  overflow:hidden;
  border:1px solid var(--viewer-line);
  border-radius:16px;
  background:rgba(255,255,255,.04);
  scroll-snap-align:start;
}
.pui-media-item img { display:block; width:100%; aspect-ratio:16/10; object-fit:cover; }
.pui-media-item figcaption { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 11px; color:#fff; font-size:10px; }
.pui-media-item figcaption small { color:var(--primary); font-weight:850; }
.pui-plan-item { flex-basis:min(290px,92%); }
.pui-plan-map { position:relative; overflow:hidden; background:#f4f2ed; }
.pui-plan-item .pui-plan-map img { height:auto; aspect-ratio:auto; max-height:300px; object-fit:contain; }
.pui-plan-point {
  position:absolute;
  z-index:2;
  width:25px;
  height:25px;
  transform:translate(-50%,-50%);
  display:grid;
  place-items:center;
  padding:0;
  border:3px solid #fff;
  border-radius:50%;
  background:var(--primary);
  color:#111;
  box-shadow:0 4px 13px rgba(0,0,0,.34);
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease;
}
.pui-plan-point span { font-size:9px; font-weight:950; line-height:1; }
.pui-plan-point:hover { transform:translate(-50%,-50%) scale(1.12); }
.pui-plan-point.active { background:#fff; color:#111; box-shadow:0 0 0 5px color-mix(in srgb,var(--primary) 40%,transparent),0 5px 16px rgba(0,0,0,.4); }
.pui-plan-point.active::after { content:''; position:absolute; inset:-8px; border:2px solid var(--primary); border-radius:50%; animation:puiPlanPulse 1.8s ease-out infinite; }
@keyframes puiPlanPulse { 0%{opacity:.85;transform:scale(.65)} 80%,100%{opacity:0;transform:scale(1.45)} }
@media (prefers-reduced-motion:reduce) { .pui-plan-point.active::after { animation:none; opacity:.5; } }
#pui-sections { display:grid; gap:8px; margin-top:12px; }
.pui-custom-section { padding:12px; border:1px solid var(--viewer-line); border-radius:14px; background:rgba(255,255,255,.04); }
.pui-custom-section h3 { margin:0 0 6px; color:#fff; font-size:13px; }
.pui-custom-section p { margin:0; color:var(--viewer-muted); font-size:11px; line-height:1.75; white-space:pre-line; }

@media (max-width:768px) {
  body.panorama-mode #pano-scenes-rail {
    left:10px;
    right:10px;
    bottom:max(10px,env(safe-area-inset-bottom));
    width:auto;
    height:56px;
    transform:none;
  }
  body.panorama-mode #pano-scenes-rail #pano-room-list.visible { height:46px; max-height:46px; }
  .pano-scene-step { width:40px; height:40px; flex-basis:40px; }
  #pano-scenes-toggle { display:none !important; }
  body.panorama-mode #logo-chip,
  body.panorama-mode #logo-chip.pano-logo-visible,
  #pano-unit-info-toggle {
    top:max(25px,env(safe-area-inset-top,0px)) !important;
  }
  #pano-unit-info-toggle {
    left:10px;
    right:auto;
    bottom:auto;
  }
  #pano-unit-info-panel {
    top:calc(max(25px,env(safe-area-inset-top,0px)) + 56px);
    left:10px;
    right:auto;
    bottom:auto;
    max-height:calc(100dvh - 142px);
  }
}

/* Optional 360 scene lighting variants */
#pano-top-actions {
  position:fixed;
  top:25px;
  left:20px;
  z-index:67;
  display:flex;
  align-items:center;
  gap:8px;
  pointer-events:none;
}
body:not(.panorama-mode) #pano-top-actions { display:none; }
#pano-top-actions > button {
  pointer-events:auto;
}
#pano-top-actions #pano-unit-info-toggle,
#pano-top-actions #pano-lighting-toggle {
  position:static !important;
  inset:auto !important;
  bottom:auto !important;
}
#pano-lighting-toggle {
  min-height:54px;
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid color-mix(in srgb,var(--primary) 38%,var(--viewer-line));
  border-radius:18px;
  background:var(--viewer-surface);
  color:#fff;
  font-family:inherit;
  font-size:12px;
  font-weight:800;
  box-shadow:0 14px 36px rgba(0,0,0,.28);
  backdrop-filter:blur(18px) saturate(135%);
  -webkit-backdrop-filter:blur(18px) saturate(135%);
  cursor:pointer;
  transition:background .2s ease,color .2s ease,border-color .2s ease,opacity .2s ease;
}
#pano-lighting-toggle svg {
  width:17px;
  height:17px;
  color:var(--primary);
}
#pano-lighting-toggle.active {
  color:#11140f;
  background:var(--primary);
  border-color:var(--primary);
}
#pano-lighting-toggle.active svg { color:#11140f; }
#pano-lighting-toggle:disabled {
  opacity:.48;
  cursor:not-allowed;
}
#pano-lighting-toggle[hidden] { display:none !important; }

@media (max-width:768px) {
  #pano-top-actions {
    top:max(25px,env(safe-area-inset-top,0px));
    left:10px;
    gap:6px;
    max-width:calc(100vw - 20px);
  }
  #pano-top-actions #pano-unit-info-toggle,
  #pano-top-actions #pano-lighting-toggle {
    min-height:48px;
    padding:0 11px;
    border-radius:16px;
    font-size:10px;
  }
  #pano-top-actions #pano-unit-info-toggle svg,
  #pano-top-actions #pano-lighting-toggle svg {
    width:15px;
    height:15px;
  }
}
