/* 页头与导航 */
:root {
  color-scheme: dark;
  --coal: #130706;
  --ember: #be4f2b;
  --gold: #d9a76b;
  --cream: #f5e0bf;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--cream); background: var(--coal); font: 16px/1.55 "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid #f7b76b; outline-offset: 4px; }
.site-header { background: #fff; color: #39251d; border-bottom: 1px solid #f33; }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1440px, 100% - 40px);
  margin-inline: auto;
}
.header-inner { justify-content: space-between; min-height: 70px; }
.brand, .header-actions, .quick-nav { display: flex; align-items: center; }
.brand { gap: 13px; }
.header-actions { gap: clamp(12px, 1.55vw, 32px); }
.quick-nav > * {
  position: relative;
  display: block;
  min-width: clamp(96px, 6.2vw, 126px);
  padding: 4px 10px;
  color: #4d382c;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.quick-nav > * + *::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: #d8cbbd;
  transform: translate(-50%, -50%) rotate(45deg);
}
.quick-nav small { display: block; margin-top: 3px; color: #725f50; font: 10px/1.1 Arial, sans-serif; }
.quick-nav [aria-disabled="true"] { color: #76675d; }
.quick-nav a:hover { color: #ad391a; }
.brand img { display: block; object-fit: contain; }
.logo { width: 126px; height: 58px; }
.slogan { width: 90px; height: 34px; }
.icon { width: 39px; height: 39px; }
.music-disc {
  width: 36px;
  height: 36px;
  border: 1px solid #a76b43;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #28170e 0 3px, #472817 4px 5px);
  color: #ffe1ad;
  animation: spin 9s linear infinite;
  cursor: pointer;
}
.music-disc[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .music-disc { animation: none; } }

/* 首屏与四枚独立入口 */
.site-main {
  --edge: clamp(28px, 5vw, 128px);
  --side-mask: linear-gradient(to right, transparent, #000 var(--edge), #000 calc(100% - var(--edge)), transparent);
  width: min(100%, 1920px);
  margin-inline: auto;
}
.hero { position: relative; aspect-ratio: 16 / 9; }
.hero-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mask-image: var(--side-mask), linear-gradient(#000 92%, transparent);
  mask-composite: intersect;
}
.hero-motion { position: absolute; inset: 0; }
.hero-motion[hidden] { display: none; }
.hero-motion:not([hidden]) + .hero-entries img { opacity: 0; }
.hero-entries {
  position: absolute;
  top: 91.111%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 63.02%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.48%;
}
.hero-entries a { display: block; border-radius: 18%; transition: filter 150ms ease; }
.hero-entries img { display: block; width: 100%; height: auto; }
.hero-entries a:hover, .hero-entries a:focus-visible { filter: brightness(1.18) drop-shadow(0 0 10px #ec562773); }

/* 章节与装备展示 */
.realm { position: relative; isolation: isolate; padding: clamp(48px, 6vw, 105px) 24px 105px; }
.realm::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px 0 0;
  background: url(realm-clear.jpg) center / cover no-repeat;
  mask-image: var(--side-mask), linear-gradient(transparent, #000 165px, #000 calc(100% - 180px), transparent);
  mask-composite: intersect;
}
.chapter { width: min(100%, 1220px); margin: 0 auto; }
.chapter + .chapter { margin-top: clamp(54px, 7vw, 120px); }
.section-title {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 1.5vw, 26px);
  width: min(100%, 960px);
  margin: 0 auto 24px;
  padding: 64px 0 24px;
  color: #ffdfad;
  text-align: center;
  font: 800 clamp(21px, 3.2vw, 48px)/1.15 "Microsoft YaHei", sans-serif;
  text-shadow: 0 3px 14px #190604;
}
.section-number {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 65px;
  height: 60px;
  transform: translateX(-50%);
  color: #d6aa7d;
  font: 400 42px/1 KaiTi, serif;
}
.section-number::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  aspect-ratio: 1;
  border-top: 1px solid #c79c72aa;
  border-left: 1px solid #c79c7288;
  transform: rotate(45deg) scale(.8);
}
.section-name { position: relative; }
.section-name::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #efc796;
  border-bottom: 2px solid #efc796;
  transform: translateX(-50%) rotate(45deg);
}
.section-title::before, .section-title::after {
  content: "";
  height: 31px;
  background: url(section-wing.svg) right center / 100% 100% no-repeat;
}
.section-title::before { grid-column: 1; grid-row: 1; }
.section-title::after { transform: scaleX(-1); }
.intro-copy {
  width: min(100%, 860px);
  margin: auto;
  padding: 24px 20px;
  border-block: 1px solid #9b563b;
  background: #260f0ba8;
  text-align: center;
  font-size: clamp(15px, 2vw, 22px);
}
.swiper-container { --swiper-navigation-color: #f7cb8e; }
.swiper-container button.swiper-button-prev, .swiper-container button.swiper-button-next {
  width: 39px;
  height: 49px;
  padding: 0;
  border: 1px solid #a46f47;
  background: #1a0807e8;
}
.swiper-button-prev::after, .swiper-button-next::after { font-size: 22px; }
.art-zoom { display: block; width: 100%; padding: 0; border: 1px solid #9c6949; background: #100705; cursor: zoom-in; }
.art-zoom img { display: block; width: 100%; height: auto; }
.art-zoom:hover img { filter: brightness(1.08); }
.feature, .effects { width: min(100%, 1120px); margin: auto; }
dialog { max-width: 96vw; background: #190a07; border: 1px solid #ae7752; padding: 12px; }
dialog::backdrop { background: #110605dd; }
dialog form { text-align: right; margin-bottom: 6px; }
dialog button { border: 0; background: transparent; color: #fff0d7; font: 26px/1 Arial, sans-serif; cursor: pointer; }
dialog img { display: block; max-width: 90vw; max-height: 82vh; object-fit: contain; }

/* 页脚与窄屏适配 */
.site-footer { background: #1e0d0a; border-top: 1px solid #f33; }
.footer-inner { gap: clamp(25px, 5vw, 105px); padding-block: 25px; }
.footer-inner img { flex: none; width: min(170px, 45vw); height: auto; }
.footer-inner p { margin: 4px 0; font-size: 12px; }
@media (max-width: 760px) {
  .header-inner, .footer-inner { flex-wrap: wrap; justify-content: center; gap: 8px; padding-block: 10px; }
  .header-actions { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .quick-nav > * { min-width: clamp(62px, 20vw, 80px); padding-inline: 3px; font-size: 14px; }
  .quick-nav small { font-size: 9px; }
  .realm { padding-inline: 12px; }
  .equipment { width: min(100%, 380px); }
}

/* 赤焰正文布局 */
.site-header { background: #160807; color: #f4d5ae; border-bottom-color: #713116; }
.site-header .slogan { filter: grayscale(1) invert(1); }
.quick-nav > *, .quick-nav small { color: #f0cbaa; }
.quick-nav a:hover { color: #fff3d5; }
.realm {
  margin-top: -1px;
  padding-top: clamp(44px, 6vw, 90px);
  background:
    linear-gradient(to right, var(--coal), transparent var(--edge), transparent calc(100% - var(--edge)), var(--coal)),
    linear-gradient(#63150c, #8b2010 36%, #63150c 85%, #210a08);
}
.realm::before {
  inset: 0;
  aspect-ratio: 2 / 3;
  bottom: auto;
  background: url(realm-crimson.jpg) center top / cover no-repeat;
  mask-image: var(--side-mask), linear-gradient(transparent, #000 135px, #000 73%, transparent);
  mask-composite: intersect;
}
.realm::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: min(105vw, 2016px) 0 0;
  pointer-events: none;
  background: linear-gradient(#7a190c50, #68150930), url(realm-clear.jpg) center / cover no-repeat;
  mask-image: var(--side-mask), linear-gradient(transparent, #000 clamp(140px, 24vw, 480px), #000 calc(100% - 100px), transparent);
  mask-composite: intersect;
}
.realm-crest {
  position: absolute;
  z-index: -1;
  top: -98px;
  left: 0;
  width: 100%;
  height: 122px;
  mask-image: var(--side-mask);
  pointer-events: none;
}
.hero { z-index: 1; }
.section-title { color: #ffde9e; text-shadow: 0 3px #5b190c, 0 0 20px #e95220, 0 6px 16px #2a0704; }
.section-title .section-name { font-family: KaiTi, "Microsoft YaHei", serif; }
.chapter + .chapter { margin-top: clamp(45px, 6vw, 96px); }
.intro-layout {
  position: relative;
  width: min(100%, 1150px);
  aspect-ratio: 1600 / 667;
  margin: 0 auto;
  container-type: inline-size;
}
.intro-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(intro-unified.png) center / contain no-repeat;
  mask-image: linear-gradient(transparent, #000 7%, #000 86%, transparent),
    linear-gradient(to right, transparent 35%, #000 55%);
  mask-composite: add;
  pointer-events: none;
}
.intro-points {
  position: absolute;
  inset: 23% 10% 20% 43%;
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 3%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.intro-points li {
  display: flex;
  align-items: center;
  padding-inline: .8em;
  color: #ffe7c0;
  background: linear-gradient(90deg, #7a2918b3, #2b080633);
  border-bottom: 1px solid #c0794a80;
  font-size: clamp(9px, 2cqw, 22px);
}
.intro-points li::before { content: "◆"; margin-right: .7em; color: #e6a561; font-size: .65em; }
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.25vw, 23px);
}
.equipment-card {
  position: relative;
  isolation: isolate;
  aspect-ratio: 3 / 4;
  min-width: 0;
  margin: 0;
  filter: drop-shadow(0 8px 12px #33080285);
}
.equipment-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url(equipment-frame.png) center / contain no-repeat;
  pointer-events: none;
}
.equipment-card .art-zoom {
  position: absolute;
  inset: 16% 6% 5%;
  width: auto;
  border: 0;
  overflow: hidden;
}
.equipment-card .art-zoom img { height: 100%; object-fit: contain; }
.equipment-card figcaption {
  position: absolute;
  z-index: 1;
  inset: 7.5% 12% 84.5%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(5px, .65vw, 12px);
  color: #ffe3a8;
  font: 700 clamp(12px, 1.25vw, 21px)/1 KaiTi, "Microsoft YaHei", serif;
  letter-spacing: .16em;
  text-indent: .16em;
  text-shadow: 0 1px 2px #210600, 0 0 8px #b94c27;
  pointer-events: none;
}
.equipment-card figcaption::before,
.equipment-card figcaption::after {
  content: "";
  width: 100%;
  max-width: 38px;
  height: 1px;
  background: linear-gradient(to right, transparent, #df9c53);
}
.equipment-card figcaption::before { justify-self: end; }
.equipment-card figcaption::after { transform: scaleX(-1); }
.feature, .effects { box-shadow: 0 0 0 6px #5d1a12, 0 0 0 7px #ba7145, 0 14px 28px #30080380; }
@media (max-width: 620px) {
  .realm-crest { top: -35px; height: 45px; }
  .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
