﻿﻿﻿* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: "Microsoft YaHei", "SimHei", sans-serif;
}

.image-page {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background: #000;
}

.image-stage {
  position: relative;
  width: min(100vw, calc(100vh * 1672 / 941));
  height: min(100vh, calc(100vw * 941 / 1672));
  background: #0a0a0a;
  overflow: hidden;
}

.image-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #1a1a2e 8%, #16213e 18%, #1a1a2e 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  z-index: 1;
}

.image-stage.loaded::before {
  display: none;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.image-stage picture {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.image-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: blur(20px);
  transform: scale(1.05);
  opacity: 0;
  transition: filter 0.25s ease-out, opacity 0.15s ease-out, transform 0.25s ease-out;
}

.image-stage img.loaded {
  filter: blur(0);
  transform: scale(1);
  opacity: 1;
}

.hotspots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.hotspots rect {
  fill: transparent;
  stroke: transparent;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition:
    fill 160ms ease,
    stroke 160ms ease,
    filter 160ms ease;
}

.hotspots a:hover rect,
.hotspots a:focus-visible rect {
  fill: rgba(255, 184, 74, 0.16);
  stroke: #ffc76a;
  filter: drop-shadow(0 0 5px rgba(255, 169, 55, 0.95));
}

.hotspots a:focus-visible {
  outline: none;
}

.hotspots a:active rect {
  fill: rgba(255, 184, 74, 0.28);
  stroke: #fff3c7;
}

.back-rail {
  position: fixed;
  left: 0;
  top: 50%;
  z-index: 10;
  transform: translateY(-50%);
  width: 46px;
  min-height: 200px;
  display: grid;
  place-items: center;
  color: #ffffff;
  text-decoration: none;
  background: #111;
  border: 1px solid rgba(255,255,255,.65);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 0 0 rgba(255, 184, 74, 0);
  transition:
    opacity 0.15s ease-out,
    transform 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease !important;
}

.back-rail:hover,
.back-rail:focus-visible {
  color: #fff4d6;
  background: #291b0b;
  border-color: #ffc76a;
  box-shadow:
    0 0 0 1px rgba(255, 199, 106, 0.24),
    5px 0 18px rgba(255, 169, 55, 0.35);
  transform: translateY(-50%) translateX(5px);
}

.back-rail:active {
  background: #3a260e;
  transform: translateY(-50%) translateX(2px);
}

.back-rail span {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: .14em;
  font-size: 14px;
  font-weight: 700;
}

.back-rail:focus-visible {
  outline: 3px solid #ffc76a;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hotspots rect,
  .back-rail {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  .back-rail {
    width: 38px;
    min-height: 170px;
  }

  .back-rail span {
    font-size: 13px;
  }
}

.back-rail-small {
  width: 48px;
  min-height: 170px;
  border-radius: 0 12px 12px 0;
}

.back-rail-small span {
  font-size: 14px;
  letter-spacing: .12em;
}

.back-home {
  top: calc(50% - 92px);
}

.back-parent {
  top: calc(50% + 92px);
}

@media (max-width: 640px) {
  .back-rail-small {
    width: 38px;
    min-height: 145px;
  }

  .back-rail-small span {
    font-size: 12px;
    letter-spacing: .08em;
  }

  .back-home {
    top: calc(50% - 78px);
  }

  .back-parent {
    top: calc(50% + 78px);
  }
}
