/* 风景台：一屏一个景，右边一排浮起的卡片，点哪张换哪张 */

.sp-page {
  background: #1a1e18; padding: 0 !important; max-width: none !important; width: 100%; }
.sp-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- 台面 */
.sp-stage {
  position: relative;
  height: calc(100vh - 50px);
  height: calc(100dvh - 50px);
  min-height: 560px;
  overflow: hidden;
  background: #1a1e18;
  color: #f4f2ec;
  isolation: isolate;
}

.sp-bg { position: absolute; inset: 0; z-index: 0; }
.sp-bg-i {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.045);
  transition: opacity 1.1s ease, transform 1.6s ease;
  will-change: opacity, transform;
}
.sp-bg-i.on { opacity: 1; transform: scale(1); }

.sp-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 17, 13, 0.86) 0%, rgba(14, 17, 13, 0.62) 30%, rgba(14, 17, 13, 0.18) 56%, rgba(14, 17, 13, 0.30) 78%, rgba(14, 17, 13, 0.58) 100%),
    linear-gradient(180deg, rgba(14, 17, 13, 0.34) 0%, rgba(14, 17, 13, 0) 26%, rgba(14, 17, 13, 0) 62%, rgba(14, 17, 13, 0.62) 100%);
}

/* ---------------------------------------------------------------- 左边的字 */
.sp-copy {
  position: absolute; z-index: 3;
  left: clamp(22px, 5.4vw, 84px);
  bottom: clamp(58px, 11vh, 104px);
  width: min(560px, 44vw);
}

.sp-where {
  font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(244, 242, 236, 0.66); font-variant-numeric: tabular-nums;
}
.sp-find { margin-top: 8px; font-size: 12px; letter-spacing: 0.02em; color: rgba(244, 242, 236, 0.5); }

.sp-title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(42px, 6.6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: #fdfcf6;
  text-shadow: 0 2px 26px rgba(10, 12, 9, 0.45);
}
.sp-en {
  margin-top: 12px;
  font-size: 12.5px; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(244, 242, 236, 0.6);
}
.sp-note {
  margin-top: 18px; max-width: 30ch;
  font-family: var(--font-read); font-size: 15.5px; line-height: 1.85;
  color: rgba(244, 242, 236, 0.8);
}
.sp-loc {
  margin-top: 12px; font-size: 12px; letter-spacing: 0.04em;
  color: rgba(244, 242, 236, 0.55); font-variant-numeric: tabular-nums;
}
.sp-loc a { color: rgba(244, 242, 236, 0.78); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sp-loc a:hover { color: #fdfcf6; }

.sp-acts { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.sp-open {
  height: 42px; padding: 0 22px; border-radius: 999px;
  border: 1px solid rgba(244, 242, 236, 0.55);
  background: rgba(244, 242, 236, 0.06);
  color: #f4f2ec; font-size: 13.5px; letter-spacing: 0.04em;
  cursor: pointer; transition: background 0.3s ease, border-color 0.3s ease;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sp-open:hover { background: rgba(244, 242, 236, 0.14); border-color: rgba(244, 242, 236, 0.85); }
.sp-nav {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(244, 242, 236, 0.4);
  background: rgba(244, 242, 236, 0.04);
  color: #f4f2ec; font-size: 15px; line-height: 1;
  cursor: pointer; transition: background 0.3s ease, border-color 0.3s ease;
}
.sp-nav:hover { background: rgba(244, 242, 236, 0.14); border-color: rgba(244, 242, 236, 0.8); }
.sp-count {
  margin-left: 10px; font-size: 12px; letter-spacing: 0.16em;
  color: rgba(244, 242, 236, 0.78); font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- 右边的卡片 */
.sp-rail {
  /* 卡片压在画面下缘，别挡着风景本身；上沿留出空白给标题与说明 */
  position: absolute; z-index: 4;
  top: auto; bottom: clamp(58px, 8.4vh, 92px); left: 44%; right: 0;
  display: flex; align-items: flex-end; gap: 14px;
  padding: 0 0 6px 8px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.sp-rail::-webkit-scrollbar { display: none; }

.sp-card {
  position: relative; flex: 0 0 auto;
  width: clamp(148px, 12.6vw, 186px);
  height: clamp(190px, 18.4vw, 250px);
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(244, 242, 236, 0.2);
  background: #242a22; color: #f7f5ee;
  text-align: left; padding: 0; cursor: pointer;
  scroll-snap-align: center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
  opacity: 0.82;
}
.sp-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12, 15, 11, 0) 42%, rgba(12, 15, 11, 0.78) 100%);
}
.sp-card.on {
  opacity: 1;
  transform: translateY(-16px) scale(1.035);
  border-color: rgba(246, 240, 220, 0.92);
  box-shadow: 0 26px 54px rgba(8, 10, 7, 0.5);
}
.sp-card:hover { opacity: 1; }

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

.sp-card-t {
  position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 30px;
  font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: 0.01em;
}
.sp-card-w {
  position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 12px;
  font-size: 10.5px; letter-spacing: 0.04em; color: rgba(247, 245, 238, 0.74);
}
.sp-card-n {
  position: absolute; z-index: 2; top: 10px; left: 12px;
  font-size: 10.5px; letter-spacing: 0.18em; color: rgba(247, 245, 238, 0.7);
}

/* ---------------------------------------------------------------- 底部刻度 */
.sp-seg {
  position: absolute; z-index: 4; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
}
.sp-seg-i {
  width: 20px; height: 2px; border: 0; padding: 0;
  background: rgba(244, 242, 236, 0.26); cursor: pointer;
  transition: background 0.3s ease;
}
.sp-seg-i.on { background: #f4f2ec; }

/* ---------------------------------------------------------------- 台下 */
.sp-foot {
  position: absolute; z-index: 4; right: clamp(18px, 2.4vw, 30px); bottom: 18px;
  margin: 0; padding: 0; max-width: 46ch;
  font-size: 10.5px; line-height: 1.6; letter-spacing: 0.02em;
  color: rgba(244, 242, 236, 0.42); text-align: right; pointer-events: none;
}

/* ---------------------------------------------------------------- 大图 */
.sp-view { width: min(1420px, 95vw); max-height: 92vh; padding: 0; border: 1px solid var(--paper-line); border-radius: 2px; background: var(--paper); color: var(--ink); }
.sp-view::backdrop { background: rgba(24, 28, 22, 0.62); }
.sp-view-in { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(300px, 1fr); max-height: 88vh; }
.sp-view-fig { margin: 0; background: var(--ground-deep); display: flex; align-items: center; justify-content: center; }
.sp-view-fig img { display: block; width: 100%; height: auto; }
.sp-view-side { display: flex; flex-direction: column; gap: 18px; padding: 26px 24px 20px; border-left: 1px solid var(--paper-line); overflow: auto; }
.sp-view-zh { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; }
.sp-view-en { margin-top: 4px; font-family: var(--font-ui); font-size: 13px; color: var(--ink-dark-3); letter-spacing: 0.02em; }
.sp-view-where { margin-top: 10px; font-size: 14px; color: var(--ink-dark-2); font-variant-numeric: tabular-nums; }
.sp-view-note { margin-top: 14px; font-family: var(--font-read); font-size: 16px; line-height: 1.75; color: var(--ink-dark-2); }
.sp-view-meta { margin-top: auto; font-size: 12.5px; line-height: 1.7; color: var(--ink-dark-3); }
.sp-view-meta a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.sp-view-nav { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 窄屏 */
@media (max-width: 900px) {
  .sp-stage {
    height: calc(100vh - 44px);
    height: calc(100dvh - 44px);
    min-height: 560px;
  }
  .sp-copy {
    left: 22px; right: 22px; width: auto;
    top: clamp(30px, 6vh, 56px); bottom: auto;
  }
  .sp-title { margin-top: 12px; font-size: clamp(34px, 9.4vw, 54px); }
  .sp-en { margin-top: 8px; font-size: 11px; letter-spacing: 0.22em; }
  .sp-note { margin-top: 12px; font-size: 14px; line-height: 1.8; max-width: 26ch; }
  .sp-loc { margin-top: 10px; }
  .sp-acts { margin-top: 18px; gap: 8px; }
  .sp-open { height: 38px; padding: 0 18px; font-size: 13px; }
  .sp-nav { width: 38px; height: 38px; }

  .sp-rail {
    top: auto; bottom: 104px; left: 0; right: 0;
    transform: none; padding: 0 22px 10px;
  }
  .sp-card { width: 132px; height: 168px; }
  .sp-card.on { transform: translateY(-10px) scale(1.02); }
  .sp-card-t { font-size: 13.5px; bottom: 26px; }
  .sp-card-w { font-size: 10px; bottom: 10px; }
  .sp-seg { bottom: 84px; }
  .sp-seg-i { width: 16px; }
  .sp-foot { display: none; }
}

@media (max-width: 900px) and (max-height: 760px) {
  .sp-note { display: none; }
  .sp-title { font-size: clamp(30px, 8.6vw, 44px); }
  .sp-en { font-size: 10px; letter-spacing: 0.18em; }
  .sp-acts { margin-top: 14px; }
  .sp-rail { bottom: 96px; }
  .sp-card { width: 118px; height: 152px; }
  .sp-seg { bottom: 76px; }
}

@media (max-width: 900px) and (max-height: 700px) {
  .sp-note { display: none; }
  .sp-stage { min-height: 540px; }
}
