:root {
  color-scheme: dark;
  --nav-text: #dcd9e5;
  --nav-gold: #f3e3ad;
  --header-height: 4.30622vw;
  font-family: "SimSun", "Songti SC", "Noto Serif CJK SC", serif;
  background: #06102b;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 320px; min-height: 100%; }

body { min-height: 100svh; }

button { font: inherit; }
.mobile-home-ornament { display:none; }

.collection-home {
  position: relative;
  min-height: 100svh;
  overflow: clip;
  isolation: isolate;
}

.collection-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

/* 标题对应效果图右上区域，保留素材原始宽高比与透明通道。 */
.collection-emblem {
  position: absolute;
  top: 5.62201vw;
  left: 44.25837%;
  width: 39.95215%;
  margin: 0;
  line-height: 0;
}

.collection-emblem img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

/* 三张卡片使用一张透明素材；各入口的文字和点击区域独立。 */
.collection-entries {
  position: absolute;
  top: 32.41627vw;
  left: 36.48325%;
  width: 57.53589%;
  aspect-ratio: 962 / 212;
}

.collection-entries-art {
  display: block;
  position: absolute;
  inset: 0;
  background: url("./111.png") center / contain no-repeat;
  user-select: none;
  pointer-events: none;
}

.collection-entry {
  position: absolute;
  top: 0;
  bottom: 0;
  padding: 0;
  border: 0;
  color: #fff4dc;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.collection-entry--exhibits { left: 0; width: 31.18503%; }
.collection-entry--sapphire { left: 33.78378%; width: 31.60083%; }
.collection-entry--studio { left: 67.77547%; width: 32.22453%; }

.entry-label {
  position: absolute;
  right: 0;
  bottom: 6.13208%;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7177vw;
  white-space: nowrap;
  font-size: 1.79426vw;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 3px #0a102d, 0 0 5px rgb(229 226 255 / 22%);
  transition: color 180ms ease, text-shadow 180ms ease;
}

.entry-arrow {
  width: 0.53828vw;
  height: 0.53828vw;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.collection-entry:focus-visible {
  outline: 2px solid #f5e5b6;
  outline-offset: 4px;
  border-radius: 6px;
}

@media (hover: hover) {
  .collection-entry:hover .entry-label {
    color: #fff8e8;
    text-shadow: 0 0 12px rgb(249 226 170 / 75%);
  }
}

.site-header {
  position: relative;
  height: var(--header-height);
  background: linear-gradient(90deg,
    rgb(3 8 27 / 20%) 0%,
    rgb(3 8 27 / 58%) 33%,
    rgb(3 8 27 / 65%) 100%);
}

.site-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgb(177 182 221 / 12%),
    rgb(193 195 223 / 38%) 43%,
    rgb(178 187 221 / 32%));
  pointer-events: none;
}

/* 以 1672 × 941 效果图为基准：导航起点 x=524，五项中心与原稿对齐。 */
.main-nav {
  display: grid;
  grid-template-columns: 155fr 179fr 204fr 199fr 188fr;
  height: 100%;
  width: 55.32297%;
  margin-left: 31.33971%;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.11962vw 0 0;
  border: 0;
  outline-offset: -8px;
  color: var(--nav-text);
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-label {
  display: block;
  white-space: nowrap;
  font-size: 1.43541vw;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.025em;
  text-shadow: 0 1px 2px rgb(0 0 0 / 75%), 0 0 3px rgb(209 215 246 / 28%);
  transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-item.is-active { color: var(--nav-gold); }

.nav-item.is-active .nav-label {
  font-size: 1.73445vw;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px #06102b, 0 0 6px rgb(243 219 161 / 25%);
}

.nav-indicator {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, #c6a672, #eddfb7 32%, #fff9e6 50%, #e7d3a3 68%, #b59668);
  box-shadow: 0 0 3px rgb(244 223 179 / 40%);
  pointer-events: none;
  transition: opacity 180ms ease;
}

.nav-item.is-active .nav-indicator { opacity: 1; }

.nav-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6.2vw;
  height: 1.65vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse,
    rgb(255 251 232 / 90%) 0%,
    rgb(255 234 190 / 55%) 12%,
    rgb(225 198 152 / 24%) 31%,
    rgb(211 193 177 / 8%) 54%,
    transparent 74%);
}

.nav-diamond {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 0.59809vw;
  height: 0.59809vw;
  border: 1px solid #fff0c3;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #8e8696;
  box-shadow: 0 0 4px #f1d7ad, 0 0 12px rgb(255 237 202 / 60%);
}

.nav-diamond::after {
  content: "";
  width: 55%;
  height: 55%;
  border: 1px solid #fbf2dc;
  background: #b8b1c2;
}

.nav-item:focus-visible {
  outline: 1px solid #f5e5b6;
  border-radius: 2px;
}

@media (hover: hover) {
  .nav-item:hover { color: #f3e3b9; }
  .nav-item:hover .nav-label { text-shadow: 0 0 10px rgb(244 221 167 / 45%); }
}

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

/* 窄屏只调整导航占宽，不压缩文字到无法阅读；底图仍完整铺满屏幕。 */
@media (max-width: 900px) {
  :root { --header-height: 66px; }
  .main-nav { width: 96%; margin-inline: auto; }
  .nav-label { font-size: clamp(13px, 2.8vw, 22px); letter-spacing: 0.025em; }
  .nav-item.is-active .nav-label { font-size: clamp(16px, 3.1vw, 25px); }
  .nav-indicator::before { width: 80px; height: 22px; }
  .nav-diamond { width: 9px; height: 9px; }
  .collection-background { object-position: 35% center; }
  .collection-emblem {
    top: calc(var(--header-height) + 28px);
    left: 40%;
    width: 57%;
  }
  .collection-entries {
    top: calc(var(--header-height) + 68px + 32.06907vw);
    left: 4%;
    width: 92%;
  }
  .entry-label { font-size: clamp(13px, 2.5vw, 24px); gap: 1vw; }
  .entry-arrow { width: 0.8vw; height: 0.8vw; }
}

/* 同一张完整原图按屏幕高度取景，屏幕变宽时自然露出更多两侧场景。 */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1024px), (orientation: landscape) and (max-width: 1024px) and (max-height: 580px) {
  :root { --header-height:clamp(44px,8.9vw,60px); }
  .collection-home {
    min-height:max(100svh,530px); display:flex; flex-direction:column; align-items:center;
    padding-bottom:env(safe-area-inset-bottom,0px); background:#081431;
  }
  .collection-home > picture { position:absolute; inset:0; z-index:-1; pointer-events:none; }
  .collection-background { inset:0; z-index:auto; width:100%; height:100%; object-fit:cover; object-position:50% 0; }
  .site-header {
    z-index:2; width:100%; height:calc(var(--header-height) + env(safe-area-inset-top,0px));
    padding-top:env(safe-area-inset-top,0px); background:linear-gradient(180deg,#07132cba,#0c1b3890);
  }
  .main-nav { width:100%; height:var(--header-height); margin:0; grid-template-columns:.78fr 1fr 1.18fr 1.15fr 1.13fr; }
  .nav-item { padding:0; outline-offset:-4px; }
  .nav-label { font-size:clamp(12px,3.04vw,20px); font-weight:400; letter-spacing:.04em; }
  .nav-item.is-active .nav-label { font-size:clamp(15px,3.48vw,23px); font-weight:500; letter-spacing:.07em; }
  .nav-indicator::before { width:70px; height:18px; }
  .nav-diamond { width:7px; height:7px; background:#fff4d6; }
  .collection-emblem {
    position:relative; inset:auto; width:min(70vw,38svh,405px); margin:-8px 0 0; z-index:1;
  }
  .collection-entries {
    position:relative; inset:auto; width:min(90vw,51svh,530px); margin-top:auto;
    aspect-ratio:auto; display:grid; gap:clamp(3px,.65svh,8px); container-type:inline-size;
  }
  .collection-entries-art { display:none; }
  /* 原图 828×544，透明行将三个入口分开：0–167、188–351、356–543。 */
  .collection-entry {
    position:relative; inset:auto; width:100%; min-height:0; aspect-ratio:828 / 168;
    background:transparent url("./mobile/mobile-entries.png") 0 0 / 100% auto no-repeat;
  }
  .collection-entry--sapphire { aspect-ratio:828 / 164; background-position:0 49.473684%; }
  .collection-entry--studio { aspect-ratio:828 / 188; background-position:0 100%; }
  .entry-label {
    inset:5% 17% 0 51.5%; gap:0; font-size:5.45cqw; font-weight:600; letter-spacing:.035em;
    color:#ffedc5; text-shadow:0 1px 3px #080e26,0 0 6px #19294b;
  }
  .collection-entry--studio .entry-label { top:14%; }
  .entry-arrow { display:none; }
  .mobile-home-ornament {
    display:flex; align-items:center; justify-content:center; width:100%; gap:12px;
    height:clamp(26px,5.9svh,62px); color:#ebd09c; font-size:20px;
  }
  .mobile-home-ornament::before,.mobile-home-ornament::after { content:""; width:38%; height:1px; background:linear-gradient(90deg,transparent,#eed6a6); box-shadow:0 0 8px #79a5f7; }
  .mobile-home-ornament::after { transform:scaleX(-1); }
}

/* 横屏将入口放到右侧，画面左半保留给菲欧娜。 */
@media (orientation: landscape) and (max-width: 1024px) and (max-height: 580px) {
  :root { --header-height:44px; }
  .collection-home { display:grid; min-height:max(100svh,292px); grid-template: auto 1fr auto auto / 1fr min(45vw,73svh,385px) 3vw; align-items:center; }
  .site-header { grid-column:1 / -1; }
  .main-nav { width:min(100%,640px); margin-inline:auto; }
  .nav-label { font-size:15px; }
  .nav-item.is-active .nav-label { font-size:17px; }
  .collection-background { object-position:50% 34%; }
  .collection-home > picture::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,transparent 54%,#07132f50 78%,#07132f66); }
  .collection-emblem { grid-column:2; justify-self:center; width:min(90%,50svh); margin:0; }
  .collection-entries { grid-column:2; width:100%; margin:0; gap:2px; }
  .mobile-home-ornament { grid-column:2; height:clamp(12px,4svh,22px); font-size:14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
