/**
 * 时空漫游页：版式、区块与卡片（与 journey-narrative-premium 首屏协调）
 */

.roam-main {
  max-width: 72rem;
}

/* —— 引导条 —— */
.roam-page-intro {
  margin-bottom: 2.5rem;
  border-radius: 1.25rem;
  border: 2px solid rgba(100, 116, 139, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 48%, rgba(241, 245, 249, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 12px 40px -18px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  position: relative;
}
.dark .roam-page-intro {
  border-color: rgba(100, 116, 139, 0.5);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.78) 100%);
  box-shadow: 0 16px 48px -20px rgba(0, 0, 0, 0.55);
}
.roam-page-intro::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, rgb(22, 93, 255), rgba(76, 175, 80, 0.85));
  opacity: 0.85;
}
.roam-page-intro-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem 1.35rem 1.35rem 1.6rem;
}
@media (min-width: 768px) {
  .roam-page-intro-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1.5rem 1.85rem;
  }
}
.roam-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgb(var(--site-primary-rgb, 22 163 74));
  opacity: 0.9;
}
.dark .roam-kicker {
  color: rgb(52 211 153);
}
.roam-page-intro-title {
  margin: 0 0 0.4rem;
  font-family: var(--site-font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgb(15 23 42);
  line-height: 1.25;
}
.dark .roam-page-intro-title {
  color: rgb(248 250 252);
}
.roam-page-intro-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgb(71 85 105);
  max-width: 40rem;
}
.dark .roam-page-intro-desc {
  color: rgb(148 163 184);
}
.roam-jump-anchor {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(var(--site-primary-rgb, 22 163 74));
  background: rgba(22, 93, 255, 0.08);
  border: 1px solid rgba(22, 93, 255, 0.22);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.dark .roam-jump-anchor {
  color: rgb(52 211 153);
  background: rgba(22, 93, 255, 0.12);
  border-color: rgba(96, 165, 250, 0.28);
}
.roam-jump-anchor:hover {
  background: rgba(22, 93, 255, 0.14);
  transform: translateY(-1px);
}

/* —— 内容区块 —— */
.roam-section {
  margin-bottom: 2.5rem;
  border-radius: 1.25rem;
  padding: 1.35rem 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 36px -22px rgba(15, 23, 42, 0.14);
}
.roam-section--no-shadow {
  box-shadow: none !important;
}
.dark .roam-section {
  border-color: rgba(71, 85, 105, 0.35);
  background: rgba(15, 23, 42, 0.52);
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.45);
}
.dark .roam-section--no-shadow {
  box-shadow: none !important;
}
@media (min-width: 768px) {
  .roam-section {
    padding: 1.75rem 1.75rem 2rem;
  }
}
.roam-section--last {
  margin-bottom: 3.5rem;
}

.roam-section-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  font-family: var(--site-font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgb(15 23 42);
}
.dark .roam-section-heading {
  color: rgb(248 250 252);
}
.roam-section-heading--plain {
  font-family: inherit;
}
.roam-section-heading-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  background: linear-gradient(145deg, rgba(22, 93, 255, 0.14), rgba(22, 93, 255, 0.06));
  color: rgb(var(--site-primary-rgb, 22 163 74));
  font-size: 0.95rem;
}
.dark .roam-section-heading-icon {
  background: rgba(22, 93, 255, 0.18);
  color: rgb(52 211 153);
}
.roam-section-lead {
  margin: -0.35rem 0 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgb(71 85 105);
}
.dark .roam-section-lead {
  color: rgb(148 163 184);
}

/* 表单与按钮 */
.roam-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(51 65 85);
}
.dark .roam-label {
  color: rgb(203 213 225);
}
.roam-select {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dark .roam-select {
  border-color: rgba(71, 85, 105, 0.55);
  background: rgba(2, 6, 23, 0.65);
}
.roam-select:focus {
  outline: none;
  border-color: rgb(var(--site-primary-rgb, 22 163 74));
  box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.2);
}
.roam-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgb(100 116 139);
}
.dark .roam-hint {
  color: rgb(148 163 184);
}
.roam-btn-primary {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, rgb(22, 93, 255) 0%, rgb(37, 99, 235) 100%);
  cursor: pointer;
  box-shadow: 0 4px 14px -4px rgba(22, 93, 255, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.roam-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -6px rgba(22, 93, 255, 0.55);
}
.roam-btn-primary:active {
  transform: translateY(0);
  opacity: 0.95;
}

/* 分区天气卡（脚本注入） */
#region-weather-grid [data-region-id] {
  border-radius: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.88) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dark #region-weather-grid [data-region-id] {
  background: rgba(2, 6, 23, 0.45);
  border-color: rgba(71, 85, 105, 0.4);
  box-shadow: none;
}
#region-weather-grid [data-region-id]:hover {
  border-color: rgba(22, 93, 255, 0.35);
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.2);
}

/* 图表容器 */
.roam-subheading {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgb(30 41 59);
}
.dark .roam-subheading {
  color: rgb(226 232 240);
}
.roam-subheading-note {
  font-weight: 400;
  font-size: 0.78rem;
  color: rgb(100 116 139);
}
.dark .roam-subheading-note {
  color: rgb(148 163 184);
}
.roam-chart-shell {
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.dark .roam-chart-shell {
  border-color: rgba(71, 85, 105, 0.35);
  background: rgba(2, 6, 23, 0.35);
  box-shadow: none;
}

/* 风物三卡 */
.roam-scenery-card {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 32px -24px rgba(15, 23, 42, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dark .roam-scenery-card {
  border-color: rgba(71, 85, 105, 0.4);
  background: rgba(15, 23, 42, 0.55);
}
.roam-scenery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px -22px rgba(15, 23, 42, 0.22);
}
.roam-scenery-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgb(15 23 42);
}
.roam-scenery-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.55), transparent 45%);
  pointer-events: none;
}
.roam-scenery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.roam-scenery-card:hover .roam-scenery-img {
  transform: scale(1.04);
}
.roam-scenery-card-body {
  padding: 0.9rem 1rem 1rem;
}
.roam-scenery-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--site-font-serif);
  letter-spacing: 0.04em;
  color: rgb(15 23 42);
}
.dark .roam-scenery-title {
  color: rgb(248 250 252);
}

/* 南北方对比 */
.roam-compare-card {
  border-radius: 1rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.roam-compare-card--north {
  border-color: rgba(14, 165, 233, 0.28);
  background: linear-gradient(160deg, rgba(224, 242, 254, 0.65) 0%, rgba(255, 255, 255, 0.5) 100%);
}
.dark .roam-compare-card--north {
  border-color: rgba(56, 189, 248, 0.22);
  background: linear-gradient(165deg, rgba(12, 74, 110, 0.35) 0%, rgba(15, 23, 42, 0.65) 100%);
}
.roam-compare-card--south {
  border-color: rgba(16, 185, 129, 0.28);
  background: linear-gradient(160deg, rgba(209, 250, 229, 0.55) 0%, rgba(255, 255, 255, 0.5) 100%);
}
.dark .roam-compare-card--south {
  border-color: rgba(52, 211, 153, 0.22);
  background: linear-gradient(165deg, rgba(6, 78, 59, 0.32) 0%, rgba(15, 23, 42, 0.65) 100%);
}
.roam-compare-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -20px rgba(15, 23, 42, 0.18);
}
.roam-compare-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.roam-compare-card--north .roam-compare-card-title {
  color: rgb(7 89 133);
}
.dark .roam-compare-card--north .roam-compare-card-title {
  color: rgb(125 211 252);
}
.roam-compare-card--south .roam-compare-card-title {
  color: rgb(6 95 70);
}
.dark .roam-compare-card--south .roam-compare-card-title {
  color: rgb(110 231 183);
}
.roam-compare-card-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgb(51 65 85);
}
.dark .roam-compare-card-text {
  color: rgb(203 213 225);
}

/* 典型四区卡片（脚本注入） */
.roam-typical-card {
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.55);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dark .roam-typical-card {
  border-color: rgba(71, 85, 105, 0.4);
  background: rgba(2, 6, 23, 0.4);
}
.roam-typical-card:hover {
  border-color: rgba(22, 93, 255, 0.28);
  box-shadow: 0 10px 28px -18px rgba(15, 23, 42, 0.15);
}
.roam-typical-card-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: rgb(var(--site-primary-rgb, 22 163 74));
}
.dark .roam-typical-card-title {
  color: rgb(52 211 153);
}
.roam-typical-card-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: rgb(51 65 85);
}
.dark .roam-typical-card-text {
  color: rgb(203 213 225);
}

/* 入场轻动画 */
.roam-stagger .roam-stagger-item {
  animation: roam-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.roam-stagger .roam-stagger-item:nth-child(1) {
  animation-delay: 0.04s;
}
.roam-stagger .roam-stagger-item:nth-child(2) {
  animation-delay: 0.1s;
}
.roam-stagger .roam-stagger-item:nth-child(3) {
  animation-delay: 0.16s;
}
.roam-stagger .roam-stagger-item:nth-child(4) {
  animation-delay: 0.22s;
}
@keyframes roam-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* 省份弹窗 */
.roam-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(10px);
}
.roam-modal.hidden {
  display: none !important;
}
.roam-modal-panel {
  width: 100%;
  max-width: 26rem;
  border-radius: 1.15rem;
  padding: 1.35rem 1.4rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.35);
}
.dark .roam-modal-panel {
  border-color: rgba(71, 85, 105, 0.45);
  background: rgba(15, 23, 42, 0.94);
}
.roam-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.roam-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--site-font-serif);
  color: rgb(15 23 42);
}
.dark .roam-modal-title {
  color: rgb(248 250 252);
}
.roam-modal-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: rgb(71 85 105);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.roam-modal-close:hover {
  background: rgba(148, 163, 184, 0.35);
}
.dark .roam-modal-close {
  color: rgb(203 213 225);
}
.roam-modal-body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgb(71 85 105);
}
.dark .roam-modal-body {
  color: rgb(203 213 225);
}

/* 叙事首屏区段 */
#season-journey {
  position: relative;
  min-height: 56vh;
}

/* 滚动渐入（与 scripts/roam-init.js IntersectionObserver 配合） */
.roam-scroll-surface:not(.roam-scroll-surface--in) {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s cubic-bezier(0.2, 0.9, 0.4, 1),
    transform 0.55s cubic-bezier(0.2, 0.9, 0.4, 1);
}
.roam-scroll-surface--in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .roam-scroll-surface:not(.roam-scroll-surface--in) {
    opacity: 1;
    transform: none;
  }
}
