:root {
  --bg-top: #f4efe4;
  --bg-bottom: #d8e4ea;
  --ink: #11212d;
  --muted: #4d5b63;
  --panel: rgba(255, 252, 247, 0.76);
  --panel-border: rgba(17, 33, 45, 0.14);
  --accent: #d95d39;
  --accent-dark: #7f2f1d;
  --accent-soft: rgba(217, 93, 57, 0.14);
  --shadow: 0 24px 80px rgba(17, 33, 45, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 30%),
    linear-gradient(145deg, var(--bg-top), var(--bg-bottom));
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1320px, calc(100vw - 32px));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  padding: 12px 0;
  display: flex;
  align-items: stretch;
}

.panel-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

h2 {
  font-family: "Space Grotesk", sans-serif;
}
.list-item {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.viewer-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.82fr);
  gap: 18px;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  height: calc(100vh - 24px);
  height: calc(100svh - 24px);
}

.viewer-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.viewer-stage {
  position: relative;
  min-height: 0;
}

model-viewer,
.info-panel {
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

model-viewer {
  width: 100%;
  min-height: 0;
  height: 100%;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.96), transparent 24%),
    linear-gradient(180deg, rgba(255, 250, 245, 0.84), rgba(224, 236, 240, 0.92));
  overflow: hidden;
}

.viewer-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.4), transparent 42%),
    linear-gradient(180deg, rgba(10, 28, 40, 0.9), rgba(26, 61, 78, 0.78));
  backdrop-filter: blur(16px);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.viewer-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.viewer-loader__aurora {
  position: absolute;
  inset: 12% 15%;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(171, 233, 255, 0.42), transparent 58%),
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.32), transparent 46%);
  filter: blur(20px);
  animation: aurora-drift 3.8s ease-in-out infinite alternate;
}

.viewer-loader__content {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 24px;
  text-align: center;
  border-radius: 28px;
  background: rgba(245, 251, 255, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 20px 50px rgba(0, 0, 0, 0.2);
}

.viewer-loader__snowflake {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0 16%, transparent 17% 100%),
    conic-gradient(
      from 0deg,
      transparent 0deg 14deg,
      rgba(181, 233, 255, 0.95) 14deg 20deg,
      transparent 20deg 44deg,
      rgba(181, 233, 255, 0.95) 44deg 50deg,
      transparent 50deg 74deg,
      rgba(181, 233, 255, 0.95) 74deg 80deg,
      transparent 80deg 104deg,
      rgba(181, 233, 255, 0.95) 104deg 110deg,
      transparent 110deg 134deg,
      rgba(181, 233, 255, 0.95) 134deg 140deg,
      transparent 140deg 164deg,
      rgba(181, 233, 255, 0.95) 164deg 170deg,
      transparent 170deg 194deg,
      rgba(181, 233, 255, 0.95) 194deg 200deg,
      transparent 200deg 224deg,
      rgba(181, 233, 255, 0.95) 224deg 230deg,
      transparent 230deg 254deg,
      rgba(181, 233, 255, 0.95) 254deg 260deg,
      transparent 260deg 284deg,
      rgba(181, 233, 255, 0.95) 284deg 290deg,
      transparent 290deg 314deg,
      rgba(181, 233, 255, 0.95) 314deg 320deg,
      transparent 320deg 344deg,
      rgba(181, 233, 255, 0.95) 344deg 350deg,
      transparent 350deg 360deg
    );
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    0 0 30px rgba(171, 233, 255, 0.35);
  animation: snowflake-spin 2.4s linear infinite;
  opacity: 0.92;
}

.viewer-loader__eyebrow,
.viewer-loader__status {
  margin: 0;
}

.viewer-loader__eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(214, 244, 255, 0.92);
}

.viewer-loader__status {
  font-size: 1rem;
  line-height: 1.45;
  color: #f3fbff;
}

.viewer-loader__progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.viewer-loader__bar {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8fdaf4, #ffffff);
  box-shadow: 0 0 18px rgba(203, 243, 255, 0.5);
  transform-origin: left center;
  transition: transform 180ms ease;
}

@keyframes snowflake-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aurora-drift {
  from {
    transform: translate3d(-12px, -8px, 0) scale(0.96);
  }

  to {
    transform: translate3d(10px, 12px, 0) scale(1.08);
  }
}

.cta-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid rgba(217, 93, 57, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 244, 238, 0.92), rgba(255, 252, 247, 0.88));
  box-shadow: 0 16px 36px rgba(17, 33, 45, 0.08);
}

.cta-copy {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
}

.cta-copy span {
  font-weight: 700;
  color: var(--accent-dark);
}

.info-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  background: var(--panel);
  overflow: hidden;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.panel-heading-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.panel-heading-row h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.page-audio-shell {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: min(100%, 420px);
  padding: 8px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 244, 238, 0.92), rgba(255, 252, 247, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(217, 93, 57, 0.14),
    0 10px 24px rgba(17, 33, 45, 0.06);
}

.page-audio-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #d95d39, #8f3721);
  box-shadow: 0 12px 24px rgba(143, 55, 33, 0.22);
}

.page-audio-toggle:hover {
  transform: translateY(-1px);
}

#page-audio-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.page-audio-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.page-audio-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.page-audio-progress {
  width: 100%;
  margin: 0;
  accent-color: #d95d39;
}

.page-audio-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

#page-audio-player {
  display: none;
}

.page-chip {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(217, 93, 57, 0.1);
  box-shadow: inset 0 0 0 1px rgba(217, 93, 57, 0.12);
}

.panel-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
  font-size: 0.88rem;
  max-width: 30ch;
}

.page-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-items: center;
  padding: 10px 0;
}

.page-preview-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 245, 240, 0.9), rgba(255, 255, 255, 0.78)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.85), transparent 60%);
  box-shadow:
    inset 0 0 0 1px rgba(217, 93, 57, 0.12),
    0 18px 40px rgba(17, 33, 45, 0.06);
}

.page-preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(100%, 44vh);
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(17, 33, 45, 0.14);
}

.panel-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

@media (min-width: 1081px) {
  .info-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-items: stretch;
  }

  .panel-header {
    gap: 10px;
  }

  .panel-description {
    max-width: none;
    font-size: 0.96rem;
    line-height: 1.6;
    text-align: left;
    text-wrap: pretty;
  }

  .page-stage {
    min-height: 0;
    display: grid;
    align-items: center;
    justify-items: center;
    padding: 0;
    margin-bottom: 10px;
  }

  .page-preview-wrap {
    width: min(100%, 320px);
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 12px;
    overflow: hidden;
  }

  .page-preview {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }

  .panel-footer {
    margin-top: 0;
  }
}

.hotspot-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.list-item {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 62px;
  padding: 8px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(17, 33, 45, 0.08);
}

.list-item:hover {
  transform: translateY(-1px);
}

.list-item.is-active {
  background: linear-gradient(180deg, rgba(255, 237, 231, 0.95), rgba(255, 245, 241, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(217, 93, 57, 0.22),
    0 12px 24px rgba(217, 93, 57, 0.08);
}

.list-item-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 25px rgba(17, 33, 45, 0.12);
}

.list-item.is-active .list-item-number {
  color: #fff;
  background: linear-gradient(135deg, #d95d39, #7f2f1d);
}

.hotspot {
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.hotspot-marker {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #d95d39, #7f2f1d);
  box-shadow:
    0 0 0 10px rgba(217, 93, 57, 0.16),
    0 10px 22px rgba(127, 47, 29, 0.32);
}

.hotspot-audio-marker {
  background: linear-gradient(135deg, #d95d39, #8f3721);
}

.hotspot-audio-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  color: #fff;
}

.hotspot.is-active .hotspot-marker,
.hotspot:hover .hotspot-marker {
  transform: scale(1.06);
}

.hotspot:not(.visible) {
  display: none;
}

@media (max-width: 1080px) {
  body {
    overflow: auto;
  }

  .page-shell {
    min-height: auto;
    height: auto;
    padding: 14px 0 18px;
  }

  .viewer-card {
    grid-template-columns: 1fr;
    min-height: auto;
    height: auto;
  }

  .viewer-column {
    min-height: auto;
  }

  .viewer-stage {
    min-height: auto;
  }

  model-viewer,
  .info-panel {
    min-height: auto;
  }

  model-viewer {
    height: clamp(420px, 62vh, 640px);
  }

  .info-panel {
    gap: 20px;
  }

  .panel-header {
    gap: 14px;
  }

  .panel-heading-copy {
    gap: 12px;
  }

  .cta-tab {
    padding: 16px 18px;
  }

  .page-stage {
    padding: 4px 0;
    justify-items: center;
  }

  .page-preview {
    max-height: min(52vh, 520px);
  }

  .hotspot-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .list-item {
    padding: 14px;
    min-height: 78px;
  }
}

@media (min-width: 681px) and (max-width: 1080px) {
  .page-shell {
    width: min(100vw - 28px, 980px);
  }

  .info-panel {
    padding: 24px;
  }

  .panel-header,
  .panel-topline,
  .panel-heading-row,
  .panel-heading-copy,
  .panel-description,
  .page-stage,
  .panel-footer {
    width: 100%;
  }

  .panel-heading-row {
    display: block;
  }

  .page-audio-shell {
    width: min(100%, 520px);
  }

  .panel-description {
    max-width: none;
    font-size: 1rem;
    line-height: 1.55;
  }

  .page-stage {
    flex: 0 0 auto;
    justify-items: center;
    padding: 8px 0 4px;
  }

  .page-preview-wrap {
    width: min(100%, 420px);
    height: clamp(320px, 40vh, 440px);
    min-height: 320px;
    padding: 16px;
  }

  .page-preview {
    max-height: 100%;
  }

  .panel-footer {
    gap: 12px;
    padding-top: 8px;
  }

  .hotspot-list {
    gap: 12px;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100vw - 16px, 1380px);
    padding: 8px 0 14px;
  }

  .info-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .viewer-column {
    gap: 12px;
  }

  model-viewer {
    height: clamp(320px, 50vh, 460px);
    border-radius: 24px;
  }

  .viewer-loader {
    border-radius: 24px;
  }

  .cta-tab {
    padding: 16px;
    border-radius: 22px;
  }

  .cta-copy {
    font-size: 0.94rem;
  }

  .panel-label {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }

  .panel-topline {
    align-items: flex-start;
  }

  .panel-heading-row h2 {
    font-size: 1.45rem;
  }

  .panel-description {
    font-size: 0.92rem;
    max-width: none;
  }

  .page-audio-shell {
    width: 100%;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .page-audio-time {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .page-preview-wrap {
    padding: 12px;
    border-radius: 18px;
  }

  .page-preview {
    max-height: 34vh;
    border-radius: 14px;
  }

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

  .list-item {
    padding: 10px;
    min-height: 70px;
    border-radius: 18px;
  }

  .list-item-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .hotspot {
    width: 46px;
    height: 46px;
  }

  .hotspot-marker {
    box-shadow:
      0 0 0 8px rgba(217, 93, 57, 0.14),
      0 8px 18px rgba(127, 47, 29, 0.26);
  }
}

@media (max-width: 420px) {
  model-viewer {
    height: clamp(280px, 44vh, 360px);
  }

  .info-panel {
    padding: 16px;
  }

  .page-chip {
    min-width: 48px;
    height: 34px;
    font-size: 0.88rem;
  }
}
