.visualization-page {
  --viz-ink: #f4f5f2;
  --viz-muted: rgba(244, 245, 242, 0.66);
  --viz-line: rgba(255, 255, 255, 0.18);
  gap: clamp(28px, 4vw, 52px);
}

.viz-page-head h1 {
  max-width: 1020px;
}

.viz-showroom {
  position: relative;
  min-height: clamp(520px, 64vw, 720px);
  overflow: hidden;
  border: 1px solid var(--portal-line-strong);
  border-radius: clamp(22px, 3vw, 34px);
  background: #080a0b;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
  color: var(--viz-ink);
  isolation: isolate;
}

.viz-protected-media {
  position: relative;
  display: block;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #111517;
}

.viz-protected-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.viz-showroom-media {
  position: absolute;
  inset: 0;
}

.viz-showroom-media img {
  transition: filter 700ms ease, transform 900ms cubic-bezier(.2, .8, .2, 1);
}

.viz-showroom[data-mode="animation"] .viz-showroom-media img {
  animation: viz-camera 10s ease-in-out infinite alternate;
}

.viz-showroom[data-mode="tour"] .viz-showroom-media img {
  transform: scale(1.045) translateX(-1.2%);
  filter: saturate(0.88) contrast(1.04);
}

.viz-showroom-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.86) 0%, rgba(3, 5, 6, 0.42) 38%, transparent 66%),
    linear-gradient(0deg, rgba(3, 5, 6, 0.58), transparent 46%);
  pointer-events: none;
}

.viz-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  color: rgba(255, 255, 255, 0.24);
  font-size: clamp(0.62rem, 1.1vw, 0.88rem);
  font-weight: 760;
  letter-spacing: 0.2em;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-17deg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.viz-lock {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 10, 12, 0.58);
  backdrop-filter: blur(16px);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.67rem;
  font-weight: 690;
  letter-spacing: 0.04em;
}

.viz-showroom-copy {
  position: absolute;
  left: clamp(26px, 5vw, 64px);
  bottom: clamp(28px, 5vw, 64px);
  z-index: 3;
  width: min(620px, calc(100% - 52px));
}

.viz-state-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(74px, 10vw, 132px);
}

.viz-state-row span,
.viz-package-top > span {
  padding: 7px 10px;
  border: 1px solid var(--viz-line);
  border-radius: 999px;
  background: rgba(8, 10, 11, 0.42);
  backdrop-filter: blur(14px);
  color: var(--viz-muted);
  font-size: 0.7rem;
}

.viz-mode-label {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  font-weight: 740;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viz-showroom h2 {
  margin: 0;
  font-size: clamp(2.65rem, 7.2vw, 6.9rem);
  font-weight: 470;
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.viz-showroom .primary-action,
.viz-showroom .secondary-action {
  border-color: rgba(255, 255, 255, 0.32);
}

.viz-showroom .primary-action {
  background: #f3f4f1;
  color: #080a0b;
}

.viz-showroom .secondary-action {
  color: #fff;
  backdrop-filter: blur(12px);
}

.viz-hotspots {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.viz-showroom[data-mode="tour"] .viz-hotspots {
  display: block;
}

.viz-hotspots span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  background: rgba(7, 9, 10, 0.5);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.65rem;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08), 0 0 28px rgba(255, 255, 255, 0.22);
  animation: viz-pulse 2.4s ease-in-out infinite;
}

.viz-format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.viz-format-card {
  display: grid;
  min-height: 188px;
  padding: 20px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: var(--portal-panel);
  color: var(--portal-text);
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
}

.viz-format-card:hover,
.viz-format-card[aria-pressed="true"] {
  border-color: var(--portal-accent-border);
  background: var(--portal-panel-strong);
  transform: translateY(-2px);
}

.viz-format-index,
.viz-format-meta {
  color: var(--portal-muted);
  font-size: 0.69rem;
}

.viz-format-copy {
  display: grid;
  align-content: end;
  gap: 7px;
  margin: 28px 0 18px;
}

.viz-format-copy strong { font-size: 1.16rem; }
.viz-format-copy small { color: var(--portal-muted); font-size: 0.82rem; line-height: 1.5; }
.viz-format-card[aria-pressed="true"] .viz-format-index { color: var(--portal-accent); }

.viz-access-strip,
.viz-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: var(--portal-panel);
}

.viz-access-strip > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viz-access-strip p { display: grid; gap: 4px; margin: 0; }
.viz-access-strip small { color: var(--portal-muted); }
.viz-access-icon { color: var(--portal-accent); font-size: 1.2rem; }
.viz-gallery-toolbar > div { display: flex; align-items: center; gap: 10px; color: var(--portal-muted); font-size: 0.78rem; }

.viz-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.88fr);
  grid-template-rows: repeat(2, minmax(260px, 36vh));
  gap: 12px;
}

.viz-gallery-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: var(--portal-panel);
  color: var(--portal-text);
  text-align: left;
  cursor: zoom-in;
}

.viz-gallery-card:first-child { grid-row: 1 / 3; }
.viz-gallery-card .viz-protected-media { min-height: 0; }
.viz-gallery-card .viz-protected-media img { transition: transform 500ms ease; }
.viz-gallery-card:hover .viz-protected-media img { transform: scale(1.025); }
.viz-gallery-card.is-portrait .viz-protected-media img { object-position: 52% 52%; }
.viz-gallery-caption { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; }
.viz-gallery-caption > span:first-child { display: grid; gap: 4px; }
.viz-gallery-caption small { color: var(--portal-muted); }

.viz-dialog {
  position: relative;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: #0b0e10;
  color: #f4f5f2;
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.7);
}

.viz-dialog::backdrop { background: rgba(2, 4, 5, 0.8); backdrop-filter: blur(16px); }
.viz-dialog-media { height: min(62vh, 680px); }
.viz-dialog-media .viz-protected-media { height: 100%; }
.viz-dialog-copy { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 28px; padding: 22px 26px 26px; }
.viz-dialog-copy h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.7rem); font-weight: 520; letter-spacing: -0.04em; }
.viz-dialog-copy > p:not(.card-kicker) { margin: 2px 0 0; color: rgba(255, 255, 255, 0.62); }
.viz-dialog-actions { grid-row: 1 / 4; grid-column: 2; display: flex; gap: 8px; }
.viz-dialog-actions .secondary-action { border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.viz-dialog-close { position: absolute; right: 14px; top: 14px; z-index: 5; width: 42px; height: 42px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 50%; background: rgba(5, 7, 8, 0.7); color: #fff; font-size: 1.45rem; cursor: pointer; }

@keyframes viz-camera { from { transform: scale(1.025) translateX(0); } to { transform: scale(1.095) translateX(-1.8%); } }
@keyframes viz-pulse { 50% { box-shadow: 0 0 0 13px rgba(255, 255, 255, 0.025), 0 0 36px rgba(255, 255, 255, 0.3); } }

@media (max-width: 780px) {
  .viz-showroom { min-height: 600px; }
  .viz-showroom-shade { background: linear-gradient(0deg, rgba(3, 5, 6, 0.88) 0%, rgba(3, 5, 6, 0.36) 72%, transparent); }
  .viz-state-row { margin-bottom: 120px; }
  .viz-showroom h2 { font-size: clamp(3rem, 16vw, 5rem); }
  .viz-showroom .inline-actions { display: grid; }
  .viz-format-grid { grid-template-columns: 1fr; }
  .viz-format-card { min-height: 150px; }
  .viz-access-strip { align-items: start; flex-direction: column; }
  .viz-gallery-toolbar { align-items: start; flex-direction: column; }
  .viz-gallery-grid { grid-template-columns: 1fr; grid-template-rows: repeat(3, 350px); }
  .viz-gallery-card:first-child { grid-row: auto; }
  .viz-dialog-copy { grid-template-columns: 1fr; }
  .viz-dialog-actions { grid-row: auto; grid-column: auto; display: grid; margin-top: 12px; }
  .viz-dialog-close { right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .viz-showroom-media img,
  .viz-hotspots span { animation: none !important; transition: none; }
}
