/* Shared Tokens And Base Layout */
:root {
  --viewer-bg: radial-gradient(circle at top, #d6dfeb 0%, #c2cfde 34%, #b1c0d3 100%);
  --panel-bg: #ececec;
  --panel-border: rgba(0, 0, 0, 0.08);
  --panel-hover: rgba(0, 0, 0, 0.04);
  --text-main: #ffffff;
  --text-muted: rgb(129, 129, 129);
  --accent: #f09300;
  --accent-strong: #d98708;
  --rail-text: rgba(255, 255, 255, 0.92);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.2);
  --control-surface-bg: rgba(8, 12, 16, 0.74);
  --control-surface-bg-strong: rgba(8, 12, 16, 0.84);
  --control-surface-border: rgba(255, 255, 255, 0.14);
  --control-surface-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  --control-button-bg: rgba(255, 255, 255, 0.06);
  --control-button-bg-strong: rgba(255, 255, 255, 0.09);
  --control-label: rgba(255, 255, 255, 0.62);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

html {
  background: #111821;
}

body {
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}

body.viewer-body {
  overflow: hidden;
  background: #c4d0dd;
  color: var(--text-main);
}

body.viewer-body.is-entry-locked {
  overflow: hidden;
}

body.inventory-body {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100dvh;
  background-color: #111821;
  background:
    radial-gradient(circle at top left, rgba(240, 147, 0, 0.18), transparent 28%),
    linear-gradient(180deg, #0f1720 0%, #172330 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-main);
}

a {
  color: inherit;
}

/* Shared Control Primitives */
.ui-glass-surface {
  border: 1px solid var(--control-surface-border);
  background: var(--control-surface-bg);
  box-shadow: var(--control-surface-shadow);
  backdrop-filter: blur(14px);
}

.ui-glass-surface--strong {
  background: var(--control-surface-bg-strong);
}

.ui-control-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
}

.ui-control-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--control-surface-border);
  border-radius: 999px;
  background: var(--control-surface-bg);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  box-shadow: var(--control-surface-shadow);
  backdrop-filter: blur(12px);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.ui-control-pill:hover,
.ui-control-pill:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.16);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  outline: none;
}

.ui-control-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--control-button-bg);
  color: var(--rail-text);
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.ui-control-row:hover,
.ui-control-row:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.16);
  color: #fff;
  text-decoration: none;
  transform: translateX(2px);
  outline: none;
}

.ui-control-row--accent {
  border-color: rgba(240, 147, 0, 0.28);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
}

.ui-control-card {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--control-button-bg);
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.ui-control-card:hover,
.ui-control-card:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.14);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  outline: none;
}

.ui-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--control-button-bg);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.ui-icon-button:hover,
.ui-icon-button:focus-visible {
  border-color: rgba(240, 147, 0, 0.44);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  outline: none;
}

/* Viewer Shell */
.masterplan-viewer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #0b1118;
}

.viewer-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.viewer-loop-audio {
  display: none;
}

.viewer-topbar {
  position: absolute;
  top: 20px;
  left: auto;
  right: 20px;
  z-index: 72;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

.viewer-topbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.56);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.viewer-topbar-group--utilities {
  gap: 10px;
}

.viewer-topbar-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.viewer-topbar-divider,
.floor-topbar-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 2px;
}

.viewer-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.viewer-toolbar-button[hidden] {
  display: none;
}

.viewer-toolbar-button:hover,
.viewer-toolbar-button:focus-visible {
  border-color: rgba(240, 147, 0, 0.44);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
  transform: translateY(-1px);
  outline: none;
}

.viewer-toolbar-button[aria-pressed="true"] {
  border-color: rgba(240, 147, 0, 0.44);
  background: rgba(240, 147, 0, 0.16);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.viewer-toolbar-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.viewer-toolbar-button__icon-node,
.viewer-toolbar-button__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-toolbar-button__icon-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
}

.viewer-toolbar-button__icon-node>svg {
  width: 100%;
  height: 100%;
}

.viewer-toolbar-button__icon>span>svg {
  width: 100%;
  height: 100%;
}

.viewer-toolbar-button__icon-svg {
  display: block;
}

.frame-shell {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.masterplan-viewer.is-ready .frame-shell {
  opacity: 1;
  visibility: visible;
}

.viewer-gallery-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 60;
  background:
    radial-gradient(circle at top left, rgba(240, 147, 0, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(8, 12, 16, 0.96), rgba(14, 20, 28, 0.94));
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.viewer-gallery-panel.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.viewer-gallery-panel__toolbar {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.viewer-gallery-panel__toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-gallery-panel__toolbar button,
.viewer-gallery-panel__toolbar .viewer-gallery-panel__title {
  pointer-events: auto;
}

.viewer-gallery-panel__toolbar .ui-control-pill {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 12, 18, 0.42);
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.viewer-gallery-panel__toolbar .ui-control-pill:hover,
.viewer-gallery-panel__toolbar .ui-control-pill:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(12, 18, 26, 0.56);
}

.viewer-gallery-panel__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.viewer-gallery-panel__body {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}

.viewer-gallery-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 50svh;
  gap: 0;
  align-content: stretch;
  min-height: 100svh;
  height: 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 0;
  grid-auto-flow: row dense;
}

.viewer-tour-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 50svh;
  gap: 0;
  align-content: stretch;
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
}

.viewer-tour-picker-item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(240, 147, 0, 0.16), rgba(255, 255, 255, 0.04)),
    #121a22;
  color: rgba(255, 255, 255, 0.94);
  text-align: left;
  cursor: pointer;
}

.viewer-tour-picker-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 18, 0.08) 0%, rgba(10, 14, 18, 0.16) 42%, rgba(8, 12, 16, 0.84) 100%);
  pointer-events: none;
}

.viewer-tour-picker-item:focus-visible {
  outline: none;
}

.viewer-tour-picker-item__media {
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(180deg, rgba(240, 147, 0, 0.14), rgba(255, 255, 255, 0.04)),
    #121a22;
  background-size: cover;
  background-position: center;
  transition: transform 420ms ease;
}

.viewer-tour-picker-item:hover .viewer-tour-picker-item__media,
.viewer-tour-picker-item:focus-visible .viewer-tour-picker-item__media {
  transform: scale(1.03);
}

.viewer-tour-picker-item__body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 18px 22px 24px;
}

.viewer-tour-picker-item__body strong {
  display: block;
  font-size: clamp(18px, 1.4vw, 24px);
}

.viewer-tour-picker-item__body small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.orientation-lock-active {
  overflow: hidden;
}

.orientation-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: none;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(240, 147, 0, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(10, 14, 20, 0.96), rgba(10, 14, 20, 0.98));
  backdrop-filter: blur(8px);
}

body.orientation-lock-active .orientation-lock-overlay {
  display: grid;
}

body.orientation-lock-active > :not(.orientation-lock-overlay) {
  pointer-events: none;
  user-select: none;
}

.orientation-lock-overlay__card {
  width: min(360px, 100%);
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 18, 0.88);
  text-align: center;
  color: #f4f6f8;
}

.orientation-lock-overlay__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 14px;
  color: #f5b768;
  background: rgba(245, 183, 104, 0.13);
}

.orientation-lock-overlay__icon svg {
  width: 36px;
  height: 36px;
}

.orientation-lock-overlay__card h2 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.orientation-lock-overlay__card p {
  margin: 10px 0 0;
  color: rgba(244, 246, 248, 0.78);
  font-size: 0.92rem;
}

.viewer-gallery-category-card {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.94);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.viewer-gallery-category-card:nth-child(3n + 3) {
  grid-column: 1 / -1;
}

.viewer-gallery-category-card:nth-child(3n + 1),
.viewer-gallery-category-card:nth-child(3n + 2) {
  grid-column: span 1;
}

.viewer-gallery-category-card:hover,
.viewer-gallery-category-card:focus-visible {
  border-color: rgba(240, 147, 0, 0.42);
  background: rgba(240, 147, 0, 0.08);
  transform: none;
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.24);
  outline: none;
}

.viewer-gallery-category-card__media {
  position: absolute;
  inset: 0;
  display: block;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(240, 147, 0, 0.18), rgba(255, 255, 255, 0.04)),
    #121a22;
  background-size: cover;
  background-position: center;
}

.viewer-gallery-category-card:nth-child(3n + 3) .viewer-gallery-category-card__media {
  min-height: 0;
}

.viewer-gallery-category-card:nth-child(3n + 1) .viewer-gallery-category-card__media,
.viewer-gallery-category-card:nth-child(3n + 2) .viewer-gallery-category-card__media {
  min-height: 0;
}

.viewer-gallery-category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 18, 0.08) 0%, rgba(10, 14, 18, 0.16) 42%, rgba(8, 12, 16, 0.86) 100%);
  pointer-events: none;
}

.viewer-gallery-category-card__body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 18px 18px 20px;
}

.viewer-gallery-category-card__body strong {
  font-size: clamp(18px, 1.4vw, 24px);
}

.viewer-gallery-category-card__body small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(24svh, 1fr);
  grid-auto-flow: dense;
  align-content: stretch;
  height: 100%;
  min-height: 100svh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 0;
  padding: 0;
}

.viewer-gallery-grid.is-hidden,
.viewer-gallery-categories.is-hidden,
.viewer-gallery-lightbox.is-hidden,
.viewer-gallery-panel__back.is-hidden {
  display: none;
}

.viewer-gallery-item {
  display: block;
  grid-column: span 4;
  grid-row: span 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #0d141c;
  cursor: pointer;
  aspect-ratio: auto;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.viewer-gallery-item:hover,
.viewer-gallery-item:focus-visible {
  transform: none;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.26);
  outline: none;
}

.viewer-gallery-item--wide {
  grid-column: span 8;
}

.viewer-gallery-item--tall {
  grid-row: span 2;
}

.viewer-gallery-item--large {
  grid-column: span 8;
  grid-row: span 2;
}

.viewer-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-gallery-grid.is-fill-1 {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
}

.viewer-gallery-grid.is-fill-1 .viewer-gallery-item {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}

.viewer-gallery-grid.is-fill-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
}

.viewer-gallery-grid.is-fill-2 .viewer-gallery-item {
  grid-column: span 1;
  grid-row: span 1;
}

.viewer-gallery-grid.is-fill-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}

.viewer-gallery-grid.is-fill-3 .viewer-gallery-item {
  grid-column: span 1;
  grid-row: span 1;
}

.viewer-gallery-grid.is-fill-3 .viewer-gallery-item:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.viewer-gallery-grid.is-fill-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}

.viewer-gallery-grid.is-fill-4 .viewer-gallery-item {
  grid-column: span 1;
  grid-row: span 1;
}

.viewer-gallery-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  gap: 8px;
  min-width: min(460px, calc(100vw - 48px));
  padding: 22px 24px;
  border-radius: 22px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  transform: translate(-50%, -50%);
}

.viewer-gallery-empty strong {
  font-size: 18px;
}

.viewer-gallery-empty span {
  color: rgba(255, 255, 255, 0.74);
}

.viewer-gallery-lightbox {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 24px;
  background: rgba(6, 10, 14, 0.88);
}

.viewer-gallery-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.viewer-gallery-lightbox__image {
  display: block;
  max-width: min(1280px, 100%);
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.34);
  object-fit: contain;
}

.viewer-location-panel {
  position: absolute;
  inset: 0;
  z-index: 32;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.viewer-location-panel.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.viewer-location-panel__inner,
.viewer-location-panel__canvas {
  position: absolute;
  inset: 0;
}

.viewer-location-panel__canvas {
  background: #0d141c;
}

.viewer-location-panel__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.viewer-location-panel__canvas iframe.viewer-location-panel__image {
  position: absolute;
  inset: 0;
  border: 0;
  z-index: 2;
}

body.is-gallery-open .viewer-gallery-panel__toolbar {
  right: calc(20px + var(--viewer-overlay-toolbar-offset, 0px));
}

.viewer-location-panel__empty {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  gap: 8px;
  min-width: min(420px, calc(100vw - 48px));
  padding: 22px 24px;
  border-radius: 22px;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  transform: translate(-50%, -50%);
}

.viewer-location-panel__empty strong {
  font-size: 18px;
}

.viewer-location-panel__empty span {
  color: rgba(255, 255, 255, 0.72);
}

.viewer-external-panel__canvas {
  background: #0d141c;
}

.viewer-external-panel__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0d141c;
}

@media (max-width: 960px) {
  body.is-gallery-open .viewer-gallery-panel__toolbar {
    right: calc(16px + var(--viewer-overlay-toolbar-offset, 0px));
  }

  .viewer-gallery-panel__toolbar {
    top: 16px;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .viewer-gallery-panel__toolbar-group {
    justify-content: space-between;
  }

  .viewer-gallery-panel__body {
    inset: 0;
  }

  .viewer-gallery-categories {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(220px, 50svh);
    gap: 0;
    padding: 0;
    min-height: 100%;
  }

  .viewer-tour-picker-list {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(220px, 40svh);
    min-height: 100%;
  }

  .viewer-gallery-category-card,
  .viewer-gallery-category-card:nth-child(3n + 3),
  .viewer-gallery-category-card:nth-child(3n + 1),
  .viewer-gallery-category-card:nth-child(3n + 2) {
    grid-column: auto;
  }

  .viewer-gallery-category-card__media,
  .viewer-gallery-category-card:nth-child(3n + 3) .viewer-gallery-category-card__media,
  .viewer-gallery-category-card:nth-child(3n + 1) .viewer-gallery-category-card__media,
  .viewer-gallery-category-card:nth-child(3n + 2) .viewer-gallery-category-card__media {
    min-height: clamp(180px, 30vh, 240px);
  }

  .viewer-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(26svh, 1fr);
    min-height: 100%;
  }

  .viewer-gallery-grid.is-fill-1,
  .viewer-gallery-grid.is-fill-2,
  .viewer-gallery-grid.is-fill-3,
  .viewer-gallery-grid.is-fill-4 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
  }

  .viewer-gallery-grid.is-fill-1 .viewer-gallery-item,
  .viewer-gallery-grid.is-fill-2 .viewer-gallery-item,
  .viewer-gallery-grid.is-fill-3 .viewer-gallery-item,
  .viewer-gallery-grid.is-fill-4 .viewer-gallery-item {
    grid-column: 1 / -1;
    grid-row: span 1;
  }

  .viewer-gallery-item,
  .viewer-gallery-item--wide,
  .viewer-gallery-item--tall,
  .viewer-gallery-item--large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .viewer-gallery-empty {
    min-width: calc(100vw - 32px);
  }

  .viewer-location-panel__toolbar {
    top: 78px;
    right: 16px;
    left: 16px;
  }
}

.viewer-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.viewer-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 16, 0.96);
  backdrop-filter: blur(10px);
  z-index: 120;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.viewer-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(8, 12, 16, 0.82);
  box-shadow: var(--shadow-soft);
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}

.loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.hint-overlay {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 25;
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.hint-overlay.is-hidden {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
}

.hint-overlay__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  color: var(--text-muted);
}

.hint-overlay.is-onboarding {
  inset: 0;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  transform: none;
  background: radial-gradient(circle at center, rgba(10, 15, 20, 0.08), rgba(10, 15, 20, 0.38));
  pointer-events: none;
}

.hint-overlay.is-onboarding .hint-overlay__card {
  min-width: min(680px, calc(100vw - 48px));
  max-width: min(760px, calc(100vw - 48px));
  justify-content: center;
  gap: 24px;
  padding: 28px 30px;
  border-radius: 34px;
  background: rgba(8, 12, 16, 0.82);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.hint-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
  text-align: center;
}

.hint-gesture {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  min-width: 92px;
  height: 34px;
  opacity: 0.76;
}

.hint-gesture__track {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06));
}

.hint-gesture__finger {
  position: absolute;
  left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: rgba(255, 255, 255, 0.96);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.24));
  transform: translateX(0);
}

.hint-gesture__finger svg {
  width: 100%;
  height: 100%;
}

.hint-overlay.is-onboarding .hint-copy {
  gap: 8px;
  text-align: left;
}

.hint-overlay.is-onboarding .hint-copy strong {
  font-size: clamp(20px, 2vw, 24px);
}

.hint-overlay.is-onboarding .hint-copy span {
  font-size: 14px;
}

.hint-overlay.is-onboarding .hint-gesture {
  width: 220px;
  min-width: 220px;
  height: 84px;
  opacity: 1;
}

.hint-overlay.is-onboarding .hint-gesture__track {
  height: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.02));
}

.hint-overlay.is-onboarding .hint-gesture__finger {
  animation: hint-gesture-swipe 1.85s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.hint-copy strong {
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.hint-copy span {
  font-size: 12px;
}

.viewer-sidebar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 74px;
  height: calc(100% - 28px);
  padding: 14px 10px 18px;
  border: 1px solid var(--control-surface-border);
  border-radius: 34px;
  background: var(--control-surface-bg);
  box-shadow: var(--control-surface-shadow);
  transition: width 260ms ease, background-color 260ms ease;
  overflow: hidden;
}

.viewer-sidebar:hover,
.viewer-sidebar.is-open {
  width: min(360px, 82vw);
  background: var(--control-surface-bg-strong);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 132px;
  margin-top: 18px;
  padding: 10px 16px 14px 10px;
  transition: min-height 260ms ease, margin 260ms ease, padding 260ms ease, background-color 260ms ease, border-color 260ms ease;
}

.viewer-sidebar:hover .sidebar-brand,
.viewer-sidebar.is-open .sidebar-brand {
  justify-content: flex-start;
  min-height: 164px;
  margin: 8px 2px 20px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
  width: 52px;
  min-width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240, 147, 0, 0.22);
  background: radial-gradient(circle at 30% 30%, rgba(240, 147, 0, 0.18), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
}

.brand-icon--logo {
  flex: 0 0 52px;
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: width 260ms ease, min-width 260ms ease, height 260ms ease, flex-basis 260ms ease;
}

.brand-icon span {
  display: inline-block;
  font-size: 44px;
  font-style: italic;
  line-height: 1;
  transform: translateY(-1px);
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 32px;
  object-fit: contain;
  object-position: center;
  transition: max-width 260ms ease, max-height 260ms ease, opacity 180ms ease, transform 260ms ease;
}

.brand-logo--icon,
.brand-logo--icon-only {
  max-width: 90%;
  max-height: 90%;
}

.brand-logo--full {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  opacity: 0;
  max-width: 0;
  max-height: 100%;
  object-position: left center;
  transform: translateX(-8px);
}

.brand-logo--icon {
  grid-area: 1 / 1;
  opacity: 1;
}

.brand-logo--full-only {
  width: 100%;
  max-width: 36px;
  max-height: 36px;
}

.viewer-sidebar:hover .brand-icon--logo,
.viewer-sidebar.is-open .brand-icon--logo {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 92px;
  place-items: center start;
}

.viewer-sidebar:hover .brand-logo--icon,
.viewer-sidebar.is-open .brand-logo--icon {
  opacity: 0;
  max-width: 0;
  transform: translateX(-8px);
}

.viewer-sidebar:hover .brand-logo--full,
.viewer-sidebar.is-open .brand-logo--full {
  opacity: 1;
  max-width: none;
  transform: translateX(0);
}

.viewer-sidebar:hover .brand-logo--full-only,
.viewer-sidebar.is-open .brand-logo--full-only {
  max-width: none;
  max-height: 64px;
  object-position: left center;
}

.viewer-sidebar:hover .brand-logo--icon-only,
.viewer-sidebar.is-open .brand-logo--icon-only {
  max-width: 36px;
  max-height: 36px;
}

.brand-copy {
  display: none;
  flex-direction: column;
  gap: 5px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.06;
}

.brand-copy strong {
  max-width: 14ch;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.brand-subtitle::after {
  content: "";
  width: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.brand-location {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.56);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.sidebar-section-title {
  display: none;
  padding: 0 14px;
  color: var(--control-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.viewer-sidebar:hover .sidebar-section-title,
.viewer-sidebar.is-open .sidebar-section-title {
  display: block;
}

.sidebar-link-list {
  display: grid;
  gap: 8px;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
}

.nav-label {
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  transition: opacity 160ms ease;
}

.viewer-sidebar:hover .nav-label,
.viewer-sidebar.is-open .nav-label {
  opacity: 1;
}

.viewer-sidebar:hover .nav-icon,
.viewer-sidebar.is-open .nav-icon {
  color: rgba(255, 255, 255, 0.82);
}

.viewer-sidebar:hover .brand-copy,
.viewer-sidebar.is-open .brand-copy {
  display: flex;
}

.viewer-sidebar:hover .brand-icon:not(.brand-icon--logo),
.viewer-sidebar.is-open .brand-icon:not(.brand-icon--logo) {
  border-color: rgba(240, 147, 0, 0.34);
  background: radial-gradient(circle at 30% 30%, rgba(240, 147, 0, 0.22), rgba(255, 255, 255, 0.04));
}

.viewer-sidebar:hover .brand-icon:not(.brand-icon--logo) span,
.viewer-sidebar.is-open .brand-icon:not(.brand-icon--logo) span {
  color: rgba(240, 147, 0, 0.94);
}

.sidebar-footer-actions {
  margin-top: auto;
}

.sidebar-action-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--control-button-bg);
  color: var(--rail-text);
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.sidebar-action-link:hover,
.sidebar-action-link:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.16);
  transform: translateX(2px);
  text-decoration: none;
}

.sidebar-action-link--accent {
  border-color: rgba(240, 147, 0, 0.28);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
}

.mobile-menu-button {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--control-surface-border);
  border-radius: 16px;
  background: var(--control-surface-bg-strong);
  backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: var(--control-surface-shadow);
}

.mobile-menu-button span:last-child {
  display: none;
}

.mobile-menu-button:hover,
.mobile-menu-button:focus {
  border-color: rgba(240, 147, 0, 0.44);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
  text-decoration: none;
}

.mobile-nav-panel {
  background: rgba(8, 12, 16, 0.96);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mobile-nav-title {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 18px;
  font-weight: 600;
}

.mobile-nav-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.mobile-nav-section-title {
  color: var(--control-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--control-button-bg);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.16);
  color: #fff;
  text-decoration: none;
  transform: translateX(2px);
}

.mobile-nav-link.is-active {
  color: #fff;
  border-color: rgba(240, 147, 0, 0.38);
  background: rgba(240, 147, 0, 0.18);
}

.mobile-nav-link--accent {
  border-color: rgba(240, 147, 0, 0.28);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
}

.viewer-rotate-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(7, 12, 18, 0.72);
  backdrop-filter: blur(12px);
}

.viewer-rotate-overlay__card {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(360px, 100%);
  padding: 24px 22px;
  border-radius: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.96);
}

.viewer-rotate-overlay__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(240, 147, 0, 0.14);
  color: rgba(255, 190, 103, 0.96);
}

.viewer-rotate-overlay__icon svg {
  width: 34px;
  height: 34px;
}

.viewer-rotate-overlay__card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.viewer-rotate-overlay__card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.5;
}

.inquiry-modal-card {
  width: min(560px, calc(100vw - 24px));
  padding: 28px 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(10, 16, 22, 0.97), rgba(17, 26, 36, 0.94));
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.inquiry-modal-card .uk-modal-close-default {
  top: 14px;
  right: 14px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
}

.inquiry-modal-card .uk-modal-close-default:hover,
.inquiry-modal-card .uk-modal-close-default:focus-visible {
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
}

.inquiry-modal-card .uk-modal-title {
  margin: 0 0 8px;
  padding-right: 40px;
  color: #fff;
  font-size: clamp(1.35rem, 2vw, 1.72rem);
}

.inquiry-modal-card > p {
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid rgba(240, 147, 0, 0.18);
  border-radius: 14px;
  background: rgba(240, 147, 0, 0.08);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.inquiry-form label {
  display: grid;
  gap: 7px;
}

.inquiry-form label:last-of-type,
.inquiry-form button {
  grid-column: 1 / -1;
}

.inquiry-form label > span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.inquiry-form input,
.inquiry-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.inquiry-form input::placeholder,
.inquiry-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.inquiry-form input:hover,
.inquiry-form textarea:hover {
  background: rgba(255, 255, 255, 0.08);
}

.inquiry-form input:focus,
.inquiry-form textarea:focus {
  outline: none;
  border-color: rgba(240, 147, 0, 0.58);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(240, 147, 0, 0.14);
}

.inquiry-form textarea {
  min-height: 104px;
  resize: vertical;
}

.inquiry-form button {
  justify-self: start;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f09300, #d98708);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(240, 147, 0, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.inquiry-form button:hover,
.inquiry-form button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(240, 147, 0, 0.28);
  filter: brightness(1.03);
  outline: none;
}

.inquiry-feedback {
  margin-top: 12px;
  font-size: 0.9rem;
}

.inquiry-feedback:empty {
  display: none;
}

.inquiry-feedback:not(:empty) {
  padding: 10px 12px;
  border: 1px solid rgba(99, 191, 122, 0.24);
  border-radius: 12px;
  background: rgba(99, 191, 122, 0.12);
  color: #9fe2ac;
}

.inquiry-feedback.is-error:not(:empty) {
  border-color: rgba(255, 128, 128, 0.24);
  background: rgba(181, 39, 39, 0.14);
  color: #ffb4b4;
}

.inquiry-form input:-webkit-autofill,
.inquiry-form textarea:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px rgba(22, 30, 40, 0.98) inset;
}

@media (max-width: 640px) {
  .inquiry-modal-card {
    width: min(100%, calc(100vw - 16px));
    padding: 22px 16px 18px;
    border-radius: 22px;
  }

  .inquiry-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .inquiry-form button {
    width: 100%;
    justify-self: stretch;
  }
}

.viewer-target-panel {
  position: absolute;
  top: 86px;
  right: 20px;
  z-index: 35;
  width: min(380px, calc(100vw - 40px));
}

.viewer-unit-overlay {
  position: absolute;
  inset: 0;
  z-index: 38;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 82px 26px 24px 104px;
}

.viewer-unit-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 18, 0.38);
  backdrop-filter: blur(8px);
}

.viewer-unit-overlay__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1320px, 100%);
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(9, 13, 18, 0.72);
  box-shadow: var(--shadow-soft);
}

.viewer-qr-panel {
  position: absolute;
  inset: 0;
  z-index: 39;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.viewer-qr-panel.is-hidden {
  display: none;
}

.viewer-qr-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 18, 0.48);
  backdrop-filter: blur(10px);
}

.viewer-qr-panel__dialog {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 32px));
  padding: 28px 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(11, 16, 22, 0.86);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.viewer-qr-panel__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.viewer-qr-panel__eyebrow {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.viewer-qr-panel h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
}

.viewer-qr-panel__image {
  display: block;
  width: min(280px, 100%);
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 22px;
  background: #fff;
}

.viewer-qr-panel__url {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.viewer-unit-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 23, 0.7);
}

.viewer-unit-overlay__header h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 2.6vw, 30px);
}

.viewer-unit-overlay__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.viewer-entry-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: block;
  background: rgba(8, 12, 16, 0.22);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.viewer-entry-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.viewer-entry-overlay__media-shell,
.viewer-entry-overlay__video,
.viewer-entry-overlay__scrim {
  position: absolute;
  inset: 0;
}

.viewer-entry-overlay__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-entry-overlay__scrim {
  background: linear-gradient(180deg, rgba(8, 12, 16, 0.18), rgba(8, 12, 16, 0.76));
}

.viewer-entry-overlay__actions {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: calc(100% - 32px);
  transform: translateX(-50%);
}

.viewer-target-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 28px;
  background: rgba(14, 17, 22, 0.8);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.viewer-target-close {
  justify-self: end;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-target-eyebrow {
  color: rgba(240, 147, 0, 0.9);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.viewer-target-card h2 {
  margin: -4px 0 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1;
}

.viewer-target-subtitle,
.viewer-target-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.viewer-target-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.viewer-target-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.viewer-target-facts dt {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.viewer-target-facts dd {
  margin: 0;
  color: #fff;
  text-align: right;
}

.viewer-target-cta {
  justify-self: start;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(208, 126, 0, 0.3);
}

.viewer-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.viewer-target-link {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.viewer-top-pill {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--control-surface-border);
  border-radius: 999px;
  background: var(--control-surface-bg);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--control-surface-shadow);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.viewer-top-pill:hover,
.viewer-top-pill:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.16);
  color: #fff;
  transform: translateY(-1px);
  outline: none;
}

.viewer-target-cta:hover,
.viewer-target-close:hover,
.viewer-target-link:hover {
  color: #fff;
  text-decoration: none;
}

/* Inventory */
.inventory-page-shell {
  min-height: 100dvh;
  padding: 24px;
}

.inventory-page-shell--embedded {
  min-height: 100%;
  padding: 0;
}

body.inventory-body--embedded {
  min-height: auto;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
}

body.inventory-body--embedded .inventory-page {
  gap: 18px;
}

body.inventory-body--embedded .inventory-hero,
body.inventory-body--embedded .inventory-detail-card,
body.inventory-body--embedded .inventory-results-card,
body.inventory-body--embedded .inventory-filter-panel,
body.inventory-body--embedded .inventory-empty-state {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
}

body.inventory-body--embedded .inventory-results-card,
body.inventory-body--embedded .inventory-detail-card,
body.inventory-body--embedded .inventory-hero {
  background: rgba(11, 17, 24, 0.82);
}

.inventory-topbar {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.inventory-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inventory-backlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--control-surface-border);
  border-radius: 999px;
  background: var(--control-surface-bg);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  box-shadow: var(--control-surface-shadow);
  backdrop-filter: blur(12px);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.inventory-backlink:hover,
.inventory-backlink:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.16);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.inventory-backlink__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.inventory-project-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--control-surface-border);
  border-radius: 28px;
  background: var(--control-surface-bg);
  box-shadow: var(--control-surface-shadow);
  backdrop-filter: blur(14px);
}

.inventory-project-chip {
  display: grid;
  gap: 2px;
  min-width: 150px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--control-button-bg);
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.inventory-project-chip small {
  color: rgba(255, 255, 255, 0.46);
}

.inventory-project-chip:hover,
.inventory-project-chip:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.14);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.inventory-project-chip.is-active {
  background: rgba(240, 147, 0, 0.18);
  border-color: rgba(240, 147, 0, 0.38);
  color: #fff;
}

.inventory-page {
  display: grid;
  gap: 22px;
}

.inventory-hero,
.inventory-detail-card,
.inventory-filter-panel,
.inventory-empty-state {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(11, 17, 24, 0.68);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.inventory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 20px;
  padding: 28px;
}

.inventory-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: rgba(240, 147, 0, 0.9);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.inventory-hero-copy h1,
.inventory-section-head h2,
.inventory-detail-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.95;
}

.inventory-hero-copy p,
.inventory-section-head p,
.inventory-hero-subtitle {
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inventory-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
}

.inventory-summary-card strong {
  font-size: clamp(28px, 4vw, 40px);
}

.inventory-detail-panel,
.inventory-results-section {
  display: grid;
  gap: 18px;
}

.inventory-results-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(11, 17, 24, 0.68);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.inventory-detail-card,
.inventory-filter-panel {
  padding: 24px;
}

.inventory-detail-layout {
  display: grid;
  gap: 22px;
}

.inventory-detail-layout.has-media {
  grid-template-columns: minmax(340px, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
}

.inventory-detail-content {
  display: grid;
  gap: 18px;
}

.inventory-detail-media,
.inventory-unit-media {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}

.inventory-detail-media {
  min-height: 100%;
  max-height: 520px;
}

.inventory-detail-media img,
.inventory-unit-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-unit-media {
  aspect-ratio: 16 / 10;
}

.inventory-unit-media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 28px;
  background: rgba(8, 13, 20, 0.72);
}

.inventory-unit-media--logo img {
  object-fit: contain;
  max-height: 56px;
  height: auto;
  width: auto;
  max-width: 100%;
}

.inventory-detail-head,
.inventory-section-head,
.inventory-unit-head,
.inventory-unit-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.inventory-detail-head {
  align-items: center;
}

.inventory-detail-head h2,
.inventory-section-head h2,
.inventory-unit-head h3,
.inventory-empty-state h3 {
  color: #f5f7fb;
}

.inventory-detail-link,
.inventory-secondary-button,
.inventory-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
}

.inventory-detail-link,
.inventory-secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
}

.inventory-primary-button {
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.inventory-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.inventory-detail-facts,
.inventory-unit-metrics {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.inventory-detail-facts div,
.inventory-unit-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inventory-detail-facts dt,
.inventory-unit-metrics dt {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inventory-detail-facts dd,
.inventory-unit-metrics dd {
  margin: 0;
  text-align: right;
  color: rgba(255, 255, 255, 0.92);
}

.inventory-filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.inventory-filter-form label {
  display: grid;
  gap: 6px;
}

.inventory-filter-form select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.inventory-filter-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.inventory-filter-form select option,
.inventory-filter-form select optgroup {
  color: #101828;
  background: #ffffff;
}

.inventory-filter-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.inventory-unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.inventory-unit-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(11, 17, 24, 0.72);
}

.inventory-unit-card.is-featured {
  border-color: rgba(240, 147, 0, 0.34);
  box-shadow: 0 18px 36px rgba(240, 147, 0, 0.12);
}

.inventory-unit-code {
  display: inline-block;
  margin-bottom: 6px;
  color: rgba(240, 147, 0, 0.92);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inventory-unit-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.inventory-unit-location {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
}

.inventory-status-pill {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-status-pill.is-available {
  background: rgba(45, 180, 92, 0.16);
  color: #7cf2a4;
}

.inventory-status-pill.is-hold,
.inventory-status-pill.is-reserved {
  background: rgba(245, 158, 11, 0.16);
  color: #ffd26b;
}

.inventory-status-pill.is-sold,
.inventory-status-pill.is-blocked {
  background: rgba(239, 68, 68, 0.16);
  color: #ff9f9f;
}

.inventory-unit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inventory-empty-state {
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.inventory-empty-state h3 {
  margin: 0 0 8px;
}

.inventory-body--unit .inventory-page-shell {
  padding: 22px;
}

body.inventory-body--unit {
  background-color: #111821;
  background:
    radial-gradient(circle at top left, rgba(240, 147, 0, 0.14), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.05), transparent 30%),
    linear-gradient(180deg, #0c1219 0%, #111821 46%, #161e29 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.inventory-body--unit .inventory-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.inventory-body--unit .inventory-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-body--unit .inventory-backlink {
  padding: 10px 15px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.94rem;
}

.inventory-body--unit .inventory-project-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inventory-body--unit .inventory-project-chip {
  gap: 4px;
  min-width: 118px;
  padding: 14px 14px 13px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.84);
}

.inventory-body--unit .inventory-project-chip small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
}

.inventory-body--unit .inventory-project-chip span {
  font-size: 0.98rem;
  line-height: 1.15;
}

.inventory-body--unit .inventory-project-chip.is-active {
  background: rgba(240, 147, 0, 0.12);
  border-color: rgba(240, 147, 0, 0.38);
  box-shadow: inset 0 0 0 1px rgba(240, 147, 0, 0.08);
}

.inventory-body--unit .inventory-page {
  gap: 18px;
}

.inventory-unit-overview {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.7fr);
  gap: 18px;
  align-items: stretch;
}

.inventory-unit-overview-main {
  display: grid;
  gap: 12px;
}

.inventory-body--unit .inventory-hero,
.inventory-body--unit .inventory-detail-card,
.inventory-unit-media-card,
.inventory-body--unit .inventory-results-card {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 25, 35, 0.96) 0%, rgba(21, 29, 40, 0.94) 100%);
  backdrop-filter: none;
  box-shadow: var(--shadow-soft);
}

.inventory-body--unit .inventory-hero {
  min-height: 254px;
  padding: 24px 22px 22px;
}

.inventory-body--unit .inventory-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inventory-body--unit .inventory-hero-copy p,
.inventory-body--unit .inventory-hero-subtitle {
  font-size: 0.78rem;
}

.inventory-hero-title--unit {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.15);
  font-size: clamp(50px, 5vw, 62px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.inventory-body--unit .inventory-summary-grid {
  align-content: stretch;
}

.inventory-summary-grid--unit {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-summary-card--unit {
  gap: 14px;
  min-height: 98px;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, rgba(29, 37, 48, 0.98) 0%, rgba(31, 40, 52, 0.94) 100%);
}

.inventory-summary-card--unit strong {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1;
  font-weight: 700;
}

.inventory-summary-card--unit span {
  align-self: end;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.88);
}

.inventory-detail-panel--unit {
  gap: 12px;
}

.inventory-detail-card--unit {
  padding: 24px 18px 10px;
}

.inventory-detail-layout--unit {
  gap: 12px;
}

.inventory-detail-heading-block {
  display: grid;
  gap: 3px;
}

.inventory-detail-head--unit {
  padding: 0 4px;
}

.inventory-detail-link--unit {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.inventory-detail-facts--unit {
  gap: 0;
  margin: 4px 0 0;
}

.inventory-detail-facts--unit .inventory-detail-fact-row {
  min-height: 36px;
  padding: 14px 4px 12px;
}

.inventory-detail-facts--unit dd {
  font-size: 0.98rem;
  font-weight: 600;
}

.inventory-unit-media-panel {
  min-width: 0;
}

.inventory-unit-media-card {
  height: 100%;
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.inventory-unit-media-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inventory-unit-media-header h2 {
  margin: 0;
  color: #f5f7fb;
  font-size: 1.4rem;
  line-height: 1.05;
}

.inventory-unit-media-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
}

.inventory-unit-media-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(31, 39, 51, 0.98) 0%, rgba(34, 42, 55, 0.96) 100%);
}

.inventory-unit-media-frame img,
.inventory-unit-media-frame video,
.inventory-unit-media-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.inventory-unit-media-frame img,
.inventory-unit-media-frame video {
  object-fit: contain;
}

.inventory-unit-media-frame.is-placeholder {
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inventory-unit-media-file {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.inventory-unit-media-file strong {
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
}

.inventory-unit-media-file a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.inventory-unit-media-list {
  display: grid;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.inventory-unit-media-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
  cursor: pointer;
}

.inventory-unit-media-item.is-active {
  border-color: rgba(240, 147, 0, 0.34);
  background: rgba(240, 147, 0, 0.1);
}

.inventory-unit-media-item-label {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240, 147, 0, 0.94);
}

.inventory-unit-media-item small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.inventory-body--unit .inventory-results-card {
  padding: 24px 18px 18px;
}

.inventory-body--unit .inventory-section-head p {
  max-width: 34ch;
  font-size: 0.98rem;
}

.inventory-body--unit .inventory-unit-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-body--unit .inventory-unit-card {
  background: linear-gradient(180deg, rgba(27, 35, 46, 0.98) 0%, rgba(24, 32, 43, 0.96) 100%);
}

@media (max-width: 1400px) {
  .inventory-body--unit .inventory-unit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {

  /* Inventory Responsive */
  .inventory-hero,
  .inventory-filter-form,
  .inventory-unit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .inventory-unit-overview {
    grid-template-columns: 1fr;
  }

  .inventory-body--unit .inventory-hero {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .inventory-unit-media-card {
    min-height: 340px;
  }

  .inventory-body--unit .inventory-unit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  body.is-gallery-open .viewer-gallery-panel__toolbar {
    right: calc(16px + var(--viewer-overlay-toolbar-offset, 0px));
  }

  body.is-location-open .viewer-location-panel__toolbar {
    right: calc(16px + var(--viewer-overlay-toolbar-offset, 0px));
  }


  /* Inventory Responsive */
  .inventory-page-shell {
    padding: 16px;
  }

  .inventory-detail-layout.has-media,
  .inventory-hero,
  .inventory-filter-form,
  .inventory-unit-grid {
    grid-template-columns: 1fr;
  }

  .inventory-detail-head,
  .inventory-section-head,
  .inventory-unit-head,
  .inventory-unit-foot {
    flex-direction: column;
  }

  .inventory-body--unit .inventory-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .inventory-body--unit .inventory-project-switcher {
    justify-content: flex-start;
  }

  .inventory-body--unit .inventory-unit-grid {
    grid-template-columns: 1fr;
  }

  .inventory-unit-media-card {
    min-height: 260px;
  }

  .inventory-unit-media-header {
    flex-direction: column;
  }
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  text-decoration: none;
}

.viewer-notice-overlay-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.viewer-notice-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 28px;
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / var(--notice-stripe-opacity, 0.18)) 0 12px, rgb(255 255 255 / 0.02) 12px 24px),
    linear-gradient(180deg, rgb(var(--notice-fill-rgb, 125 138 156) / calc(var(--notice-fill-opacity, 0.56) * 0.82)) 0%, rgb(var(--notice-fill-rgb, 125 138 156) / var(--notice-fill-opacity, 0.56)) 100%);
  -webkit-backdrop-filter: blur(var(--notice-blur, 6px));
  backdrop-filter: blur(var(--notice-blur, 6px));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  cursor: var(--notice-cursor, default);
  z-index: 1;
  pointer-events: auto;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.viewer-notice-overlay::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.36);
  border-radius: 20px;
  pointer-events: none;
}

.viewer-notice-overlay-wrap:hover .viewer-notice-overlay,
.viewer-notice-overlay-wrap:focus-within .viewer-notice-overlay,
.viewer-notice-overlay-wrap.is-open .viewer-notice-overlay,
.viewer-notice-overlay.is-open {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(255, 255, 255, 0.78);
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / calc(var(--notice-stripe-opacity, 0.18) + 0.05)) 0 12px, rgb(255 255 255 / 0.04) 12px 24px),
    linear-gradient(180deg, rgb(var(--notice-fill-rgb, 125 138 156) / calc(var(--notice-fill-opacity, 0.56) * 0.9)) 0%, rgb(var(--notice-fill-rgb, 125 138 156) / min(0.95, calc(var(--notice-fill-opacity, 0.56) + 0.1))) 100%);
}

.viewer-notice-chip {
  position: absolute;
  left: var(--notice-chip-x, 50%);
  top: var(--notice-chip-y, 50%);
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: min(320px, calc(100vw - 48px));
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12, 19, 28, 0.82);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.viewer-notice-overlay-wrap:hover .viewer-notice-chip,
.viewer-notice-overlay-wrap:focus-within .viewer-notice-chip,
.viewer-notice-overlay-wrap.is-open .viewer-notice-chip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.viewer-notice-bubble {
  position: absolute;
  left: var(--notice-chip-x, 50%);
  top: calc(var(--notice-chip-y, 50%) + 28px);
  transform: translate(-50%, 8px);
  width: min(280px, calc(100vw - 48px));
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(10, 15, 22, 0.94);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  z-index: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.viewer-notice-bubble::after {
  content: "";
  position: absolute;
  left: calc(50% - 7px);
  top: -7px;
  width: 14px;
  height: 14px;
  background: rgba(10, 15, 22, 0.94);
  transform: rotate(45deg);
}

.viewer-notice-overlay-wrap:hover .viewer-notice-bubble,
.viewer-notice-overlay-wrap:focus-within .viewer-notice-bubble,
.viewer-notice-overlay-wrap.is-open .viewer-notice-bubble {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.hotspot-dot {
  position: relative;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.17);
}

.hotspot-dot::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: pulse-ring 1.8s ease-out infinite;
}

.hotspot-label {
  display: none;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.7;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.65;
  }

  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@media (max-width: 959px) {

  /* Viewer Responsive */
  .viewer-topbar {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: auto;
    right: 12px;
    justify-content: flex-end;
    max-width: calc(100vw - 84px);
  }

  .viewer-topbar-group {
    flex-wrap: wrap;
  }

  .viewer-unit-overlay {
    padding: 78px 14px 14px;
  }

  .viewer-target-panel {
    top: auto;
    right: 12px;
    bottom: 92px;
    left: 12px;
    width: auto;
  }

  .viewer-target-card {
    padding: 18px;
    border-radius: 24px;
  }
}

@media (max-width: 959px) {

  /* Viewer Responsive */
  .viewer-sidebar {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 12px;
  }

  .hint-overlay {
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    transform: none;
    width: auto;
    max-width: none;
    padding: 0;
  }

  .hint-overlay__card {
    width: 100%;
    max-width: none;
    padding: 12px 14px;
  }

  .hint-overlay.is-onboarding {
    padding: 18px;
  }

  .hint-overlay.is-onboarding .hint-overlay__card {
    min-width: 0;
    max-width: min(560px, calc(100vw - 36px));
    gap: 18px;
    padding: 22px 20px;
  }

  .hint-gesture {
    width: 74px;
    min-width: 74px;
  }

  .hint-overlay.is-onboarding .hint-gesture {
    width: 150px;
    min-width: 150px;
    height: 68px;
  }

  .hotspot-label {
    display: none;
  }

  .viewer-notice-overlay {
    padding: 10px;
    border-radius: 22px;
  }

  .viewer-notice-chip {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .viewer-notice-bubble {
    left: var(--notice-chip-x, 50%);
    width: min(240px, calc(100vw - 32px));
    font-size: 12px;
  }
}

@media (max-width: 639px) {

  /* Viewer Responsive */
  .hint-overlay__card {
    gap: 12px;
  }

  .hint-gesture {
    display: none;
  }

  .hint-overlay.is-onboarding {
    align-items: end;
    padding: 18px 14px 110px;
  }

  .hint-overlay.is-onboarding .hint-overlay__card {
    max-width: 100%;
    padding: 18px 16px;
    gap: 14px;
  }

  .hint-overlay.is-onboarding .viewer-arrow {
    width: 42px;
    height: 42px;
  }

  .hint-overlay.is-onboarding .hint-copy {
    text-align: center;
  }

  .hint-copy strong {
    font-size: 12px;
  }

  .hint-copy span {
    font-size: 11px;
  }
}

/* Shared Viewer Navigation Controls */
.viewer-arrow {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 46;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-top: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(208, 126, 0, 0.28);
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.viewer-arrow--left {
  left: auto;
}

.viewer-arrow--right {
  right: auto;
}

.viewer-arrow:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(208, 126, 0, 0.34);
}

.hint-overlay.is-onboarding .viewer-arrow {
  animation: hint-arrow-pulse 1.75s ease-in-out infinite;
}

.hint-overlay.is-onboarding .viewer-arrow--right {
  animation-delay: 0.18s;
}

@keyframes hint-gesture-swipe {
  0% {
    transform: translateX(-12px) rotate(-10deg) scale(0.96);
    opacity: 0.66;
  }

  18% {
    transform: translateX(8px) rotate(-4deg) scale(1);
    opacity: 1;
  }

  50% {
    transform: translateX(138px) rotate(8deg) scale(1);
    opacity: 1;
  }

  72% {
    transform: translateX(152px) rotate(10deg) scale(0.98);
    opacity: 0.82;
  }

  100% {
    transform: translateX(-12px) rotate(-10deg) scale(0.96);
    opacity: 0.66;
  }
}

@keyframes hint-arrow-pulse {

  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(208, 126, 0, 0.28);
  }

  50% {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(208, 126, 0, 0.38);
  }
}

/* Floor Explorer */
.floor-explorer-shell {
  position: fixed;
  inset: 0;
  display: block;
  padding: 0;
  background: #d5d8d1;
}

.floor-left-rail,
.floor-rail {
  position: absolute;
  top: 10px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.floor-left-rail {
  top: 10px;
  left: 18px;
  bottom: auto;
  z-index: 6;
}

.floor-rail {
  top: 96px;
  left: auto;
  right: 20px;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  width: 166px;
  padding: 12px 10px;
  overflow: hidden;
  border: 1px solid var(--control-surface-border);
  border-radius: 30px;
  background: var(--control-surface-bg);
  color: #fff;
  box-shadow: var(--control-surface-shadow);
  backdrop-filter: blur(14px);
}

.floor-rail__list {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 147, 0, 0.45) transparent;
}

.floor-rail__item {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.floor-rail__item:hover,
.floor-rail__item:focus-visible {
  border-color: rgba(240, 147, 0, 0.34);
  background: rgba(240, 147, 0, 0.12);
  color: #fff;
  transform: translateX(-1px);
  outline: none;
}

.floor-rail__item.is-active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 999px;
  border-color: rgba(240, 147, 0, 0.38);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
  font-weight: 700;
}

.floor-rail.is-compact .floor-rail__list {
  gap: 5px;
}

.floor-rail.is-compact .floor-rail__item,
.floor-rail.is-compact .floor-rail__item.is-active {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.floor-rail.is-very-compact .floor-rail__list {
  gap: 4px;
}

.floor-rail.is-very-compact .floor-rail__item,
.floor-rail.is-very-compact .floor-rail__item.is-active {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.floor-rail__meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.floor-rail__meta strong {
  color: #fff;
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1;
}

.floor-left-rail__top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--control-surface-border);
  border-radius: 999px;
  background: var(--control-surface-bg);
  box-shadow: var(--control-surface-shadow);
  backdrop-filter: blur(12px);
}

.floor-circle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--control-button-bg);
  backdrop-filter: blur(12px);
  color: #fff;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.floor-circle-button[hidden] {
  display: none;
}

.floor-circle-button.is-active,
.floor-circle-button:hover {
  border-color: rgba(240, 147, 0, 0.44);
  background: rgba(240, 147, 0, 0.18);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.floor-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
}

.floor-stage__art {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  isolation: isolate;
}

.floor-stage__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
  filter: blur(0);
  will-change: opacity, transform, filter;
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 320ms ease;
}

.floor-stage__media--incoming {
  z-index: 2;
  opacity: 0;
  transform: scale(1.03);
  filter: blur(2px);
}

.floor-stage__media--incoming.is-visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.floor-stage__media--active.is-fading-out {
  opacity: 0;
  transform: scale(1.015);
  filter: blur(1px);
}

.floor-stage__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.floor-stage__hotspots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.floor-plan-hotspot-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floor-plan-hotspot-wrap.is-hover,
.floor-plan-hotspot-wrap.is-active {
  z-index: 4;
}

.floor-plan-hotspot-area {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(34, 197, 94, 1);
  opacity: calc(var(--floor-hotspot-area-opacity, 0.22) * 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.floor-plan-hotspot-area.is-available {
  background: rgba(34, 197, 94, 1);
}

.floor-plan-hotspot-area.is-hold,
.floor-plan-hotspot-area.is-reserved {
  background: rgba(245, 158, 11, 1);
}

.floor-plan-hotspot-area.is-sold,
.floor-plan-hotspot-area.is-blocked {
  background: rgba(239, 68, 68, 1);
}

.floor-plan-hotspot-wrap.is-hover .floor-plan-hotspot-area,
.floor-plan-hotspot-area.is-active {
  opacity: var(--floor-hotspot-area-opacity, 0.22);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.56);
}

.floor-plan-hotspot {
  --floor-hotspot-fill: rgba(34, 197, 94, 0.96);
  --floor-hotspot-glow: rgba(34, 197, 94, 0.26);
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: var(--floor-hotspot-fill);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.floor-plan-hotspot.is-available {
  --floor-hotspot-fill: rgba(34, 197, 94, 0.96);
  --floor-hotspot-glow: rgba(34, 197, 94, 0.26);
}

.floor-plan-hotspot.is-hold,
.floor-plan-hotspot.is-reserved {
  --floor-hotspot-fill: rgba(245, 158, 11, 0.96);
  --floor-hotspot-glow: rgba(245, 158, 11, 0.28);
}

.floor-plan-hotspot.is-sold,
.floor-plan-hotspot.is-blocked {
  --floor-hotspot-fill: rgba(239, 68, 68, 0.96);
  --floor-hotspot-glow: rgba(239, 68, 68, 0.28);
}

.floor-plan-hotspot.is-active {
  z-index: 4;
  box-shadow: 0 0 0 8px var(--floor-hotspot-glow), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.floor-plan-hotspot__label {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: max-content;
  max-width: 150px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 19, 28, 0.84);
  color: rgba(255, 255, 255, 0.96);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.floor-stage__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 28px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(38, 50, 61, 0.72), rgba(24, 35, 46, 0.82));
}

.floor-stage__label {
  display: none;
  position: absolute;
  top: 10px;
  left: 18px;
  right: 206px;
  width: fit-content;
  max-width: calc(100% - 236px);
  z-index: 6;
  padding: 12px 18px;
  border: 1px solid var(--control-surface-border);
  border-radius: 999px;
  background: var(--control-surface-bg);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--control-surface-shadow);
}

.floor-unit-panel {
  position: absolute;
  top: 10px;
  bottom: 18px;
  left: 18px;
  z-index: 5;
  width: min(316px, calc(100vw - 236px));
  max-width: min(316px, calc(100vw - 236px));
  transition: transform 240ms ease, opacity 240ms ease, width 240ms ease, max-width 240ms ease, left 240ms ease, right 240ms ease, top 240ms ease;
}

.floor-unit-panel.is-collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

.floor-unit-detail {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(9, 14, 20, 0.82), rgba(11, 17, 24, 0.9));
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26);
  min-width: 0;
  height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  overscroll-behavior: contain;
  transition: opacity 220ms ease, transform 220ms ease;
}

.floor-unit-detail::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.floor-unit-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.floor-unit-detail__content {
  order: 2;
  display: grid;
  gap: 12px;
  min-height: 0;
}

.floor-unit-detail__media-shell {
  order: 1;
  display: grid;
  gap: 12px;
  min-height: 0;
  position: relative;
}

.floor-unit-detail__preview {
  display: none;
  overflow: hidden;
  border-radius: 18px;
  min-height: 180px;
  max-height: 220px;
  background: rgba(255, 255, 255, 0.06);
}

.floor-unit-detail__preview img,
.floor-unit-detail__preview video,
.floor-unit-detail__preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.floor-unit-detail__preview img,
.floor-unit-detail__preview video {
  object-fit: cover;
}

.floor-unit-detail__preview span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.floor-unit-detail__media-toolbar,
.floor-unit-media-list {
  display: none;
}

.floor-unit-detail__media {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  min-height: 182px;
  max-height: 214px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floor-unit-detail__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

  .floor-unit-detail__media.is-logo {
    background: rgba(8, 13, 20, 0.82);
  }

  .floor-unit-detail__media.is-logo img {
    object-fit: contain;
    max-height: 64px;
    height: auto;
    width: auto;
    max-width: 72%;
  }

.floor-unit-detail__media video,
.floor-unit-detail__media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.floor-unit-detail__media span {
  color: rgba(255, 255, 255, 0.72);
  padding: 20px;
  text-align: center;
}

.floor-unit-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.floor-unit-detail__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.floor-unit-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--control-button-bg);
  color: rgba(255, 255, 255, 0.96);
  line-height: 0;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.floor-unit-detail-close:hover,
.floor-unit-detail-close:focus-visible {
  border-color: rgba(240, 147, 0, 0.4);
  background: rgba(240, 147, 0, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.floor-unit-detail-close>span,
.floor-unit-detail-close>span svg {
  display: block;
}

.floor-unit-code {
  display: inline-block;
  margin-bottom: 6px;
  color: rgba(240, 147, 0, 0.92);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.floor-unit-detail__head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 0.92;
}

.floor-unit-metrics {
  display: grid;
  gap: 0;
  margin: 0;
}

.floor-unit-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.floor-unit-metrics dt {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.floor-unit-metrics dd {
  margin: 0;
  text-align: right;
  color: rgba(255, 255, 255, 0.92);
}

.floor-unit-detail__foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.floor-unit-detail__foot strong {
  color: #fff;
  font-size: 1rem;
}

.floor-unit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.floor-unit-metric--expanded {
  display: none;
}

.floor-unit-panel.is-expanded {
  top: 86px;
  left: 18px;
  right: 18px;
  bottom: 18px;
  width: auto;
  max-width: none;
  z-index: 5;
}

.floor-unit-panel.is-expanded .floor-unit-detail {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  height: 100%;
  max-height: none;
  overflow: hidden;
  min-height: 0;
  padding: 12px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(9, 14, 20, 0.72), rgba(10, 15, 22, 0.88));
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.floor-unit-panel.is-expanded .floor-unit-detail__content {
  order: 1;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 18px 16px 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(17, 24, 34, 0.96) 0%, rgba(12, 19, 28, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: auto;
}

.floor-unit-panel.is-expanded .floor-unit-detail__media-shell {
  order: 2;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  padding: 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 17, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
}

.floor-unit-panel.is-expanded .floor-unit-detail__media-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.floor-unit-panel.is-expanded .floor-unit-detail__media-toolbar > div:first-child {
  max-width: min(340px, calc(100% - 210px));
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(7, 11, 17, 0.74);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.floor-unit-detail__media-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(7, 11, 17, 0.74);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.floor-unit-detail__media-actions.is-icons-only {
  margin-left: auto;
}

.floor-unit-panel.is-expanded .floor-unit-detail__media-toolbar h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.98);
  font-size: 1.2rem;
  line-height: 1.05;
}

.floor-unit-panel.is-expanded .floor-unit-detail__media {
  min-height: 0;
  height: 100%;
  max-height: none;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
}

.floor-unit-panel.is-expanded .floor-unit-detail__media img,
.floor-unit-panel.is-expanded .floor-unit-detail__media video,
.floor-unit-panel.is-expanded .floor-unit-detail__media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floor-unit-panel.is-expanded .floor-unit-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: none;
  overflow: visible;
}

.floor-unit-panel.is-expanded .floor-unit-detail__preview {
  display: none;
}

.floor-unit-panel.is-expanded .floor-unit-metric--expanded {
  display: flex;
}

.floor-unit-panel.is-expanded #floor-unit-link {
  display: none;
}

.floor-unit-media-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.08);
  color: rgba(226, 232, 240, 0.82);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.floor-unit-media-item:hover,
.floor-unit-media-item:focus-visible,
.floor-unit-media-item.is-active {
  border-color: rgba(240, 147, 0, 0.28);
  background: rgba(226, 232, 240, 0.14);
  color: rgba(248, 250, 252, 0.96);
  transform: translateY(-1px);
  outline: none;
}

.floor-unit-media-item-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: currentColor;
}

.floor-unit-media-item-icon svg {
  width: 100%;
  height: 100%;
}

.floor-unit-media-list.is-hidden,
.inventory-detail-link.is-disabled {
  display: none;
}

.floor-unit-media-file {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.floor-unit-media-file strong {
  color: #15202b;
}

.floor-unit-media-file a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(21, 32, 43, 0.08);
  color: #15202b;
  text-decoration: none;
}

.unit-media-gallery {
  position: relative;
  width: 100%;
  height: 100%;
}

.unit-media-gallery__viewport {
  width: 100%;
  height: 100%;
}

.unit-media-gallery__viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.unit-media-gallery__count {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(18, 25, 35, 0.78);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.unit-media-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 25, 35, 0.78);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.unit-media-gallery__nav--prev {
  left: 12px;
}

.unit-media-gallery__nav--next {
  right: 12px;
}

.inventory-status-pill.is-hidden {
  display: none;
}

.inventory-secondary-button.is-disabled,
.inventory-primary-button.is-disabled {
  pointer-events: none;
  opacity: 0.46;
}

@media (max-width: 900px) {

  /* Floor Explorer Responsive */
  .viewer-arrow {
    bottom: auto;
  }

  .floor-unit-metric--expanded {
    display: flex;
  }

  .floor-explorer-shell {
    padding: 0;
  }

  .floor-left-rail {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    bottom: auto;
    left: 12px;
  }

  .floor-left-rail__top {
    gap: 10px;
  }

  .floor-rail {
    top: calc(env(safe-area-inset-top, 0px) + 70px);
    bottom: 12px;
    left: auto;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 138px;
    overflow: hidden;
  }

  .floor-stage {
    min-height: 72dvh;
  }

  .floor-stage__label {
    top: 8px;
    left: 12px;
    right: 164px;
    width: fit-content;
    max-width: calc(100% - 188px);
    padding: 12px 18px;
  }

  .floor-unit-panel {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    bottom: 12px;
    left: 12px;
    right: 160px;
    width: auto;
    max-width: none;
  }

  .floor-unit-panel.is-expanded {
    top: 84px;
    left: 14px;
    right: 14px;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail {
    grid-template-columns: 1fr;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__content {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  }

  .floor-unit-detail {
    grid-template-columns: 1fr;
    height: 100%;
    max-height: none;
    overflow-y: auto;
  }

  .floor-rail__meta {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .floor-stage__label {
    top: 12px;
    left: 8px;
    right: 112px;
    max-width: calc(100% - 126px);
    padding: 10px 14px;
    font-size: 13px;
  }

  .floor-unit-panel {
    top: 74px;
    bottom: 8px;
    left: 8px;
    right: 104px;
    width: auto;
    max-width: none;
  }

  .floor-unit-panel.is-expanded {
    top: 74px;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  .floor-circle-button {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .floor-unit-detail {
    padding: 10px;
    border-radius: 22px;
  }

  .floor-unit-detail__preview {
    min-height: 86px;
    max-height: 104px;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .floor-unit-detail__media-actions {
    justify-content: space-between;
  }

  .floor-unit-detail__media {
    min-height: 0;
    max-height: none;
    aspect-ratio: 1.05 / 1;
  }

  .floor-unit-detail__head h2 {
    font-size: clamp(20px, 7vw, 30px);
    line-height: 0.96;
  }

  .floor-unit-metrics div {
    gap: 8px;
    padding: 8px 0;
  }

  .floor-unit-metrics dt {
    font-size: 10px;
  }

  .floor-unit-metrics dd {
    font-size: 13px;
  }

  .floor-unit-actions {
    grid-template-columns: 1fr;
  }

  .floor-unit-detail__foot {
    gap: 8px;
  }

  .floor-rail {
    top: calc(env(safe-area-inset-top, 0px) + 62px);
    right: 8px;
    width: 92px;
    padding: 12px 8px;
    border-radius: 22px;
  }

  .floor-rail__list {
    gap: 4px;
    padding-right: 2px;
  }

  .floor-rail__item,
  .floor-rail__item.is-active {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .floor-rail__meta {
    gap: 3px;
    padding-top: 8px;
    font-size: 9px;
  }

  .floor-rail__meta strong {
    font-size: 16px;
  }
}

@media (max-width: 720px) {

  /* Shared Small-Screen Responsive Overrides */
  .viewer-entry-overlay__actions {
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .viewer-topbar {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: auto;
    right: 8px;
    gap: 6px;
    max-width: calc(100vw - 56px);
  }

  .viewer-topbar-group {
    gap: 4px;
    padding: 4px;
    justify-content: flex-end;
  }

  .viewer-topbar-label {
    display: none;
  }

  .viewer-toolbar-button {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .mobile-menu-button {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 8px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .viewer-unit-overlay__header {
    align-items: start;
    flex-direction: column;
  }

  .viewer-unit-overlay__dialog {
    border-radius: 22px;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .viewer-rotate-overlay {
    display: none;
  }
}

@media (max-width: 900px) {
  .floor-unit-panel.is-expanded .floor-unit-detail {
    gap: 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(11, 17, 24, 0.94);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
    overflow-y: auto;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__content {
    gap: 8px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media-shell {
    gap: 10px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media {
    min-height: 116px;
    max-height: 160px;
    border-radius: 16px;
  }

  .floor-unit-detail__foot {
    gap: 6px;
  }

  .floor-unit-detail__foot strong {
    font-size: 0.92rem;
  }

  .floor-unit-actions {
    gap: 8px;
  }

  .floor-unit-actions .inventory-secondary-button,
  .floor-unit-actions .inventory-primary-button {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.92rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .viewer-topbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: calc(100vw - 124px);
    gap: 4px;
  }

  .viewer-topbar-group {
    gap: 4px;
    padding: 4px 6px;
    border-radius: 14px;
  }

  .viewer-toolbar-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .viewer-toolbar-button__icon {
    width: 18px;
    height: 18px;
  }

  .floor-unit-panel {
    top: calc(env(safe-area-inset-top, 0px) + 60px);
    bottom: 12px;
    left: 168px;
    right: 96px;
    width: auto;
    max-width: none;
  }

  .floor-unit-detail {
    grid-template-columns: minmax(150px, 0.88fr) minmax(0, 1.12fr);
    gap: 10px;
    align-items: stretch;
  }

  .floor-unit-detail__content {
    order: 2;
    gap: 6px;
    min-height: 0;
  }

  .floor-unit-detail__media-shell {
    order: 1;
    gap: 8px;
  }

  .floor-unit-detail__media {
    min-height: 100%;
    max-height: none;
  }

  .floor-unit-detail__foot {
    position: sticky;
    bottom: -10px;
    padding-top: 6px;
    background: linear-gradient(180deg, rgba(11, 17, 24, 0), rgba(11, 17, 24, 0.94) 24%);
  }

  .floor-unit-panel.is-expanded {
    top: calc(env(safe-area-inset-top, 0px) + 60px);
    left: 168px;
    right: 96px;
    bottom: 12px;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 24px;
    background: rgba(11, 17, 24, 0.94);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
    overflow-y: auto;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__content {
    grid-template-rows: none;
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(17, 24, 34, 0.96) 0%, rgba(12, 19, 28, 0.94) 100%);
    box-shadow: none;
    overflow: visible;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__preview {
    display: none;
    min-height: 118px;
    max-height: 140px;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media-shell {
    gap: 10px;
    padding: 0;
    border-radius: 20px;
    background: rgba(7, 11, 17, 0.52);
    box-shadow: none;
    overflow: hidden;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .floor-unit-detail__media-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media {
    min-height: 150px;
    height: auto;
    max-height: 190px;
    border-radius: 18px;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media img,
  .floor-unit-panel.is-expanded .floor-unit-detail__media video {
    object-fit: cover;
  }

  .floor-unit-detail__head h2 {
    font-size: clamp(24px, 4vw, 34px);
  }

  .floor-unit-metrics div {
    padding: 8px 0;
  }
}

@media (orientation: landscape) and (pointer: coarse) {
  .viewer-topbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: min(calc(100vw - 24px), 560px);
    gap: 4px;
  }

  .viewer-topbar-group {
    gap: 4px;
    padding: 4px 6px;
    border-radius: 14px;
  }

  .viewer-topbar-label {
    display: none;
  }

  .viewer-toolbar-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .viewer-toolbar-button__icon {
    width: 18px;
    height: 18px;
  }

  .hint-overlay {
    left: 50%;
    right: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    transform: translateX(-50%);
    width: auto;
    max-width: min(calc(100vw - 16px), 760px);
  }

  .hint-overlay__card {
    gap: 10px;
    padding: 8px 12px;
    border-radius: 20px;
  }

  .hint-gesture {
    width: 64px;
    min-width: 64px;
    height: 26px;
  }

  .hint-copy strong {
    font-size: 12px;
  }

  .hint-copy span {
    font-size: 10px;
  }

  .viewer-arrow {
    width: 32px;
    height: 32px;
  }
}

body.is-fullscreen-fallback .mobile-menu-button {
  display: none;
}

body.is-fullscreen-fallback .hint-overlay {
  display: none;
}

@media (max-width: 900px) {
  .floor-unit-panel.is-expanded .floor-unit-detail {
    grid-template-columns: 1fr;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__media-shell {
    display: none;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__preview {
    display: block;
    min-height: 112px;
    max-height: 148px;
    border-radius: 16px;
  }

  .floor-unit-panel.is-expanded .floor-unit-detail__foot {
    position: static;
    bottom: auto;
    padding-top: 0;
    background: transparent;
  }

  .floor-unit-detail__head-actions {
    gap: 8px;
  }

  .inventory-status-pill {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .floor-unit-detail-close {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .floor-unit-actions .inventory-secondary-button,
  .floor-unit-actions .inventory-primary-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.88rem;
  }
}