:root {
  --color-bg: #101010;
  --color-text: #f4f4f1;
  --color-muted: #a3a3a3;
  --color-line: rgba(255, 255, 255, 0.14);
  --page-pad: clamp(18px, 3vw, 48px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  line-height: 1.5;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px var(--page-pad);
  background: rgba(16, 16, 16, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 2.8vw, 36px);
  color: var(--color-muted);
  font-size: 12px;
}

.nav-links button {
  transition: color 180ms ease;
}

.nav-links button:hover {
  color: #ffffff;
}

.museum {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #101010;
}

#museum-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-switcher {
  position: fixed;
  top: 74px;
  left: 50%;
  z-index: 13;
  display: flex;
  gap: 4px;
  max-width: calc(100vw - 36px);
  overflow-x: auto;
  padding: 5px;
  background: rgba(8, 8, 8, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition:
    opacity 320ms ease,
    transform 320ms ease;
}

.museum.is-entered .gallery-switcher {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.gallery-switcher button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 13px;
  color: var(--color-muted);
  font-size: 10px;
  white-space: nowrap;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.gallery-switcher button:hover,
.gallery-switcher button.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.cover-card {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #f7f7f7;
  transition:
    opacity 600ms ease,
    visibility 600ms ease;
}

.cover-card.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cover-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0));
}

.cover-text {
  position: relative;
  z-index: 1;
  padding: 0 var(--page-pad) clamp(48px, 8vw, 96px);
  color: #ffffff;
}

.cover-text p {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
}

.cover-text h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(42px, 8vw, 112px);
  font-weight: 400;
  line-height: 0.92;
}

.cover-text button {
  margin-top: 28px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.cover-text button:hover {
  background: #ffffff;
  color: #050505;
}

.museum-panel {
  position: fixed;
  right: var(--page-pad);
  bottom: var(--page-pad);
  z-index: 25;
  width: min(420px, calc(100vw - 36px));
  max-height: min(520px, calc(100vh - 120px));
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.58) transparent;
  padding: 28px;
  background: rgba(8, 8, 8, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(22px);
  opacity: 0;
  transform: translateY(16px);
  visibility: hidden;
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    visibility 240ms ease;
}

.museum-panel::-webkit-scrollbar {
  width: 7px;
}

.museum-panel::-webkit-scrollbar-track {
  background: transparent;
}

.museum-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

.museum-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.76);
}

.museum-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.panel-close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: var(--color-muted);
  font-size: 24px;
  line-height: 1;
}

.panel-kicker {
  margin: 0 0 16px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.panel-content h2 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

.panel-content h3 {
  margin: 28px 0 12px;
  font-size: 14px;
}

.panel-content p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.panel-content ul,
.panel-content ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-content li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.panel-content li span {
  color: var(--color-muted);
}

.contact-lines {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.museum-controls {
  position: fixed;
  left: 50%;
  bottom: var(--page-pad);
  z-index: 11;
  display: flex;
  gap: 8px;
  max-width: min(760px, calc(100vw - 36px));
  overflow-x: auto;
  padding: 8px;
  background: rgba(18, 18, 18, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.museum-controls button {
  flex: 0 0 auto;
  width: 34px;
  height: 30px;
  color: #f4f4f1;
  font-size: 11px;
}

.museum-controls button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.movement-hint {
  position: fixed;
  left: var(--page-pad);
  bottom: var(--page-pad);
  z-index: 11;
  color: #6e6e73;
  font-size: 11px;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
  }

  .cover-text h1 {
    font-size: clamp(38px, 14vw, 72px);
  }

  .gallery-switcher {
    top: 82px;
    justify-content: flex-start;
    width: calc(100vw - 36px);
  }

  .museum-panel {
    right: 18px;
    bottom: 86px;
    padding: 24px;
  }

  .museum-controls {
    bottom: 18px;
  }

  .movement-hint {
    display: none;
  }
}
