/* ===== 首页 · 夜间展厅入口 ===== */
.page-home {
  --home-line: rgba(141, 117, 71, 0.28);
  --home-line-strong: rgba(201, 164, 92, 0.55);
  --home-space: clamp(48px, 7vw, 96px);
  --home-card-pad: clamp(18px, 3vw, 28px);
  display: block;
  position: relative;
  overflow-x: hidden;
}

/* --- 首屏 --- */
.page-home .home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 5vw, 44px) 0 clamp(44px, 7vw, 92px);
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: -12% -22% auto;
  height: 132%;
  background:
    radial-gradient(46% 46% at 78% 16%, rgba(201, 164, 92, 0.18), transparent 68%),
    radial-gradient(52% 52% at 12% 6%, rgba(108, 77, 142, 0.22), transparent 70%);
  pointer-events: none;
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(141, 117, 71, 0.13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(141, 117, 71, 0.13) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(70% 60% at 68% 24%, #000 0%, transparent 74%);
  mask-image: radial-gradient(70% 60% at 68% 24%, #000 0%, transparent 74%);
  pointer-events: none;
}

.page-home .home-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(26px, 5vw, 48px);
}

.page-home .breadcrumb {
  margin-bottom: 16px;
}

.page-home .home-hero h1 {
  margin: 12px 0 0;
  max-width: 17em;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(27px, 6.4vw, 52px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.page-home .home-hero__lede {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.85;
  color: rgba(244, 239, 230, 0.78);
}

.page-home .home-hero__actions {
  margin-top: clamp(22px, 3vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.page-home .home-hero__hint {
  max-width: 22em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* 目录 */
.page-home .gateway {
  margin-top: clamp(28px, 4vw, 42px);
}

.page-home .gateway__title {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-home .gateway__list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.page-home .gateway__link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--home-line);
  border-radius: var(--radius-sm);
  background: rgba(16, 29, 51, 0.5);
  color: var(--paper);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.page-home .gateway__link:hover,
.page-home .gateway__link:focus-visible {
  border-color: var(--home-line-strong);
  background: rgba(16, 29, 51, 0.88);
  transform: translateX(3px);
}

.page-home .gateway__num {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.page-home .gateway__name {
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* 首屏右侧 */
.page-home .home-hero__aside {
  display: grid;
  gap: 14px;
}

.page-home .hero-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--home-line);
  background: var(--navy-soft);
  box-shadow: var(--shadow-soft);
}

.page-home .hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* 设备面板预览 */
.page-home .hero-preview {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
}

.page-home .hero-preview__title {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-home .view-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.page-home .view-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--home-line);
  background: rgba(4, 7, 13, 0.6);
}

.page-home .view-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: var(--font-cond);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}

.page-home #home-view-phone:checked ~ .view-switch [for="home-view-phone"],
.page-home #home-view-pad:checked ~ .view-switch [for="home-view-pad"],
.page-home #home-view-desk:checked ~ .view-switch [for="home-view-desk"] {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--ink);
}

.page-home .view-switch__input:focus-visible ~ .view-switch {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
}

.page-home .view-stage {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(141, 117, 71, 0.18);
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.9), rgba(4, 7, 13, 0.9));
  overflow-x: auto;
}

.page-home .view-pane {
  display: none;
}

.page-home #home-view-phone:checked ~ .view-stage .view-pane--phone,
.page-home #home-view-pad:checked ~ .view-stage .view-pane--pad,
.page-home #home-view-desk:checked ~ .view-stage .view-pane--desk {
  display: block;
}

.page-home .device {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--home-line);
  background: rgba(16, 29, 51, 0.75);
}

.page-home .device--phone {
  max-width: 250px;
  margin-inline: auto;
}

.page-home .device--pad,
.page-home .device--desk {
  max-width: 100%;
}

.page-home .device__cols {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
}

.page-home .device--pad .device__cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-home .device--desk .device__cols {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.page-home .device__cols li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(141, 117, 71, 0.22);
  background: rgba(8, 17, 31, 0.7);
}

.page-home .device__cols .mono {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.page-home .device__cols strong {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--paper);
}

.page-home .device__cols em {
  font-style: normal;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.page-home .device--desk .device__cols em {
  display: none;
}

/* --- 章节通用 --- */
.page-home .home-stage,
.page-home .home-panel-section,
.page-home .home-legacy,
.page-home .home-resource,
.page-home .home-trust {
  position: relative;
  padding: var(--home-space) 0;
}

.page-home .home-stage::before,
.page-home .home-legacy::before,
.page-home .home-trust::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(141, 117, 71, 0.45), transparent);
}

/* --- 三种到访目的 --- */
.page-home .bento {
  margin-top: clamp(26px, 4vw, 40px);
  display: grid;
  gap: 14px;
}

.page-home .bento__cell {
  padding: var(--home-card-pad);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.page-home .bento__num {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.page-home .bento__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.4;
  color: var(--paper);
}

.page-home .bento__cell p {
  margin: 0;
  max-width: 40em;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(244, 239, 230, 0.75);
}

.page-home .bento__cell .btn {
  margin-top: 4px;
}

/* --- 面板五栏 --- */
.page-home .panel-layout {
  margin-top: clamp(26px, 4vw, 40px);
  display: grid;
  gap: clamp(22px, 4vw, 40px);
}

.page-home .panel-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--home-line);
  background: var(--navy-soft);
}

.page-home .panel-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.page-home .panel-figure__cap {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--home-line);
  background: rgba(4, 7, 13, 0.55);
}

.page-home .panel-slot-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.page-home .panel-slot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--home-line);
}

.page-home .panel-slot:first-child {
  padding-top: 0;
}

.page-home .panel-slot:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.page-home .panel-slot .mono {
  grid-row: span 2;
  padding-top: 5px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.page-home .panel-slot h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--paper);
}

.page-home .panel-slot p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(244, 239, 230, 0.72);
}

/* --- 旧版查询与移动端 --- */
.page-home .home-legacy__grid {
  display: grid;
  gap: clamp(24px, 4vw, 44px);
}

.page-home .home-legacy__lede {
  margin: 16px 0 0;
  max-width: 36em;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(244, 239, 230, 0.75);
}

.page-home .legacy-notes {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.page-home .legacy-note {
  border: 1px solid var(--home-line);
  border-radius: var(--radius-sm);
  background: rgba(16, 29, 51, 0.55);
  overflow: hidden;
}

.page-home .legacy-note summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--paper);
  cursor: pointer;
  list-style: none;
}

.page-home .legacy-note summary::-webkit-details-marker {
  display: none;
}

.page-home .legacy-note summary::before {
  content: "+";
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  color: var(--gold);
}

.page-home .legacy-note[open] summary::before {
  content: "−";
}

.page-home .legacy-note summary:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: -2px;
}

.page-home .legacy-note p {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(244, 239, 230, 0.72);
}

.page-home .legacy-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--home-line);
  background: var(--navy-soft);
  box-shadow: var(--shadow-soft);
}

.page-home .legacy-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* --- 帮助与资源 --- */
.page-home .home-resource__grid {
  display: grid;
  gap: clamp(24px, 4vw, 44px);
}

.page-home .resource-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--home-line);
  background: var(--navy-soft);
}

.page-home .resource-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.page-home .home-resource__lede {
  margin: 16px 0 0;
  max-width: 36em;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(244, 239, 230, 0.75);
}

.page-home .resource-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.page-home .resource-list li {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(141, 117, 71, 0.2);
  background: rgba(16, 29, 51, 0.5);
  font-size: 14px;
  line-height: 1.75;
  color: rgba(244, 239, 230, 0.78);
}

.page-home .resource-list .mono {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.page-home .resource-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- 信任与下一步 --- */
.page-home .trust-stats {
  margin: clamp(24px, 4vw, 36px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.page-home .trust-stats li {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--home-line);
  background: linear-gradient(180deg, rgba(16, 29, 51, 0.82), rgba(8, 17, 31, 0.6));
}

.page-home .trust-stats strong {
  display: block;
  font-family: var(--font-cond);
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.page-home .trust-stats span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(244, 239, 230, 0.72);
}

.page-home .trust-note {
  margin: 22px 0 0;
  max-width: 46em;
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
}

.page-home .trust-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- 响应式 --- */
@media (min-width: 560px) {
  .page-home .gateway__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .page-home .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .trust-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .page-home .home-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: start;
    gap: clamp(32px, 5vw, 72px);
  }

  .page-home .panel-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
  }

  .page-home .home-legacy__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    align-items: start;
  }

  .page-home .home-resource__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .page-home .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .page-home .bento__cell--a {
    grid-column: span 4;
  }

  .page-home .bento__cell--b {
    grid-column: span 2;
  }

  .page-home .bento__cell--c {
    grid-column: span 6;
  }

  .page-home .trust-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .page-home .device--desk .device__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .resource-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .gateway__link,
  .page-home .view-switch__btn {
    transition: none;
  }

  .page-home .gateway__link:hover,
  .page-home .gateway__link:focus-visible {
    transform: none;
  }
}
