/* ============================================================
   西游专注官网样式
   色板：旧纸 #E9E2D2 / 墨夜 #12100E / 墨字 #2A251E
        纸字 #D9CDB8 / 赤点 #B8422F / 金线 #C9873F(深) #A96A28(浅)
   字体：Noto Serif SC（正文）/ Noto Sans Mono（数字）
   ============================================================ */

/* ---------- 自托管字体（可变字重，已按页面用字子集化；国内访问无需依赖 Google Fonts） ---------- */
@font-face {
  font-family: 'Noto Serif SC';
  src: url('../fonts/NotoSerifSC-subset.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans Mono';
  src: url('../fonts/NotoSansMono-subset.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f4f2ee;
  font-family: 'Noto Serif SC', serif;
  color: #2A251E;
}

a { color: #C9873F; text-decoration: none; }

.svg-defs { position: absolute; }

/* 页面整体：旧纸底色 */
.page {
  min-height: 100vh;
  background: #E9E2D2;
  position: relative;
  overflow: hidden;
}

/* 噪点纹理覆盖层 */
.grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .05;
  pointer-events: none;
}

/* ---------- 导航 ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 40px;
  position: relative;
}

.nav-brand { display: flex; align-items: center; gap: 13px; }

.logo { flex: none; }

.nav-title {
  font: 400 19px 'Noto Serif SC', serif;
  letter-spacing: .14em;
}

.nav-links { display: flex; align-items: center; gap: 36px; }

.nav-link {
  font: 300 13.5px 'Noto Serif SC', serif;
  color: rgba(42,37,30,.68);
  letter-spacing: .12em;
}
.nav-link:hover { color: #2A251E; }

.nav-cta {
  font: 300 13.5px 'Noto Serif SC', serif;
  color: #E9E2D2;
  background: #2A251E;
  padding: 9px 22px;
  border-radius: 19px;
  letter-spacing: .16em;
}
.nav-cta:hover { background: #12100E; color: #E9E2D2; }

/* ---------- 首屏 ---------- */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 40px 120px;
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  flex-wrap: wrap;
}

/* 基准设 0、靠 min-width 保底，避免与右侧样机的实际宽度相加后触发换行 */
.hero-copy { flex: 1 1 0; min-width: 360px; }

.hero-kicker {
  font: 300 14px 'Noto Serif SC', serif;
  color: #A96A28;
  letter-spacing: .4em;
  margin-bottom: 28px;
}

.hero-title {
  margin: 0;
  font: 400 56px/1.35 'Noto Serif SC', serif;
  letter-spacing: .06em;
  text-wrap: pretty;
}

.hero-desc {
  margin: 34px 0 0;
  font: 300 16px/2.1 'Noto Serif SC', serif;
  color: rgba(42,37,30,.63);
  letter-spacing: .06em;
  max-width: 460px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 48px;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 42px 0 calc(42px + .3em);
  border-radius: 27px;
  background: #2A251E;
  color: #E9E2D2;
  font: 500 17px 'Noto Serif SC', serif;
  letter-spacing: .3em;
  white-space: nowrap;
}
.hero-cta:hover { background: #12100E; color: #E9E2D2; }

.hero-note {
  font: 300 12.5px 'Noto Serif SC', serif;
  color: rgba(42,37,30,.43);
  letter-spacing: .1em;
}

/* ---------- 手机样机 ---------- */
.hero-phones {
  /* 按实际内容宽度（264×2 + 26 = 554px）占位，样机完整排在内容区内，不向窗口外溢出 */
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 26px;
}

/* 浅色样机相对深色错位下移 */
.phone-offset { margin-top: 64px; }

/* 外框固定为缩放后的占位尺寸，内部按 .88 缩放 */
.phone-frame { width: 264px; height: 572px; flex: none; }
.phone-scale { transform: scale(.88); transform-origin: top left; }

.phone {
  width: 300px;
  height: 650px;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
}

.phone-dark {
  background: #0f0d0b;
  border: 1px solid rgba(217,205,184,.12);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}

.phone-light {
  background: #F0EBDF;
  border: 1px solid rgba(42,37,30,.20);
  box-shadow: 0 24px 60px rgba(18,16,14,.18);
}

.phone-status {
  height: 44px;
  display: flex;
  align-items: flex-end;
  padding: 0 0 2px 26px;
}

.phone-clock { font: 500 12px 'Noto Sans Mono', monospace; }
.phone-clock-dark { color: rgba(217,205,184,.4); }
.phone-clock-light { color: rgba(42,37,30,.48); }

.phone-path {
  display: block;
  width: 300px;
  height: 319px;
  margin-top: 8px;
}

.phone-info { text-align: center; margin-top: 16px; }

.phone-chapter {
  font: 400 32px/1 'Noto Serif SC', serif;
  letter-spacing: .08em;
  padding-left: .08em;
}
.phone-chapter-dark { color: #D9CDB8; }
.phone-chapter-light { color: #2A251E; }

.phone-eta {
  font: 300 11px 'Noto Serif SC', serif;
  letter-spacing: .14em;
  margin-top: 10px;
}
.phone-eta-dark { color: rgba(217,205,184,.42); }
.phone-eta-light { color: rgba(42,37,30,.50); }

.phone-mileage {
  font: 400 9.5px 'Noto Sans Mono', monospace;
  letter-spacing: .04em;
  margin-top: 14px;
}
.phone-mileage-dark { color: rgba(217,205,184,.3); }
.phone-mileage-light { color: rgba(42,37,30,.38); }

.phone-cta-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  display: flex;
  justify-content: center;
}

.phone-cta {
  width: 150px;
  height: 44px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 15px 'Noto Serif SC', serif;
  letter-spacing: .3em;
  padding-left: .3em;
}
.phone-cta-dark { background: #D9CDB8; color: #12100E; }
.phone-cta-light { background: #2A251E; color: #E9E2D2; }

/* ---------- 规则（墨夜） ---------- */
.rules { background: #12100E; position: relative; }

.rules-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 40px;
}

.rules-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.rules-kicker {
  font: 300 13px 'Noto Serif SC', serif;
  color: #C9873F;
  letter-spacing: .4em;
}

.rules-theme {
  font: 300 12px 'Noto Serif SC', serif;
  color: rgba(217,205,184,.34);
  letter-spacing: .14em;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 64px;
}

.rule-num {
  font: 400 15px 'Noto Sans Mono', monospace;
  color: rgba(217,205,184,.30);
}

.rule-title {
  font: 400 22px 'Noto Serif SC', serif;
  letter-spacing: .08em;
  margin-top: 18px;
  color: #D9CDB8;
}

.rule-desc {
  margin: 16px 0 0;
  font: 300 14px/2 'Noto Serif SC', serif;
  color: rgba(217,205,184,.50);
  letter-spacing: .04em;
  text-wrap: pretty;
}

/* ---------- 路途（旧纸） ---------- */
.map {
  border-top: 1px solid rgba(42,37,30,.16);
  position: relative;
}

.map-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 40px;
  display: flex;
  align-items: center;
  gap: 80px;
  flex-wrap: wrap;
}

.map-figure { flex: 0 0 300px; display: flex; justify-content: center; }

.map-canvas { position: relative; width: 280px; height: 541px; flex: none; }

.map-svg { width: 280px; height: 541px; }

.map-label {
  position: absolute;
  font: 300 12px 'Noto Serif SC', serif;
  letter-spacing: .24em;
}
.map-label-lingshan {
  right: 176px;
  top: 8px;
  text-align: right;
  color: rgba(42,37,30,.55);
}
.map-label-changan {
  left: 142px;
  bottom: 16px;
  color: #A96A28;
}

.map-copy { flex: 1 1 400px; min-width: 340px; }

.map-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 28px;
}

.map-kicker {
  font: 300 13px 'Noto Serif SC', serif;
  color: #A96A28;
  letter-spacing: .4em;
}

.map-theme {
  font: 300 12px 'Noto Serif SC', serif;
  color: rgba(42,37,30,.40);
  letter-spacing: .14em;
}

.map-title {
  margin: 0;
  font: 400 36px/1.5 'Noto Serif SC', serif;
  letter-spacing: .06em;
  text-wrap: pretty;
}

.map-desc {
  margin: 28px 0 0;
  font: 300 15px/2.1 'Noto Serif SC', serif;
  color: rgba(42,37,30,.63);
  letter-spacing: .05em;
  max-width: 440px;
  text-wrap: pretty;
}

.map-stats { display: flex; gap: 44px; margin-top: 44px; }

.stat-num {
  font: 400 26px 'Noto Sans Mono', monospace;
  color: #2A251E;
}

.stat-label {
  font: 300 12px 'Noto Serif SC', serif;
  color: rgba(42,37,30,.48);
  letter-spacing: .14em;
  margin-top: 8px;
}

/* ---------- 下载（墨夜） ---------- */
.download { background: #12100E; position: relative; }

.download-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px 40px;
  text-align: center;
}

.download-title {
  margin: 36px 0 0;
  font: 400 40px/1.5 'Noto Serif SC', serif;
  letter-spacing: .08em;
  color: #D9CDB8;
}

.download-note {
  margin: 20px 0 0;
  font: 300 14px/2 'Noto Serif SC', serif;
  color: rgba(217,205,184,.45);
  letter-spacing: .08em;
}

.download-stores {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 52px;
  flex-wrap: wrap;
}

.store {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 200px;
  height: 60px;
  border-radius: 12px;
  border: 1px solid rgba(217,205,184,.3);
  color: #D9CDB8;
  text-align: center;
}
.store:hover { border-color: #D9CDB8; color: #D9CDB8; }

.store-name {
  font: 400 15px 'Noto Serif SC', serif;
  letter-spacing: .08em;
}

.store-os {
  font: 300 10.5px 'Noto Serif SC', serif;
  color: #D9CDB8;
  opacity: .5;
  letter-spacing: .1em;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid rgba(42,37,30,.58);
  position: relative;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-item {
  font: 300 12px 'Noto Serif SC', serif;
  color: rgba(42,37,30,.58);
  letter-spacing: .06em;
}
a.footer-item:hover { color: #2A251E; }

.footer-mail {
  font: 400 12px 'Noto Sans Mono', monospace;
  color: rgba(42,37,30,.58);
}
.footer-mail:hover { color: #2A251E; }

.footer-icp {
  font: 400 11px 'Noto Sans Mono', monospace;
  color: rgba(42,37,30,.58);
  letter-spacing: .04em;
}

/* ---------- Toast 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%) translateY(12px);
  background: #2A251E;
  color: #E9E2D2;
  font: 300 13.5px 'Noto Serif SC', serif;
  letter-spacing: .12em;
  padding: 12px 28px;
  border-radius: 22px;
  border: 1px solid rgba(217,205,184,.25);
  box-shadow: 0 12px 32px rgba(18,16,14,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 100;
}
.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 中窄屏适配：压缩边距与间距、样机缩小一号，保证首屏样机不被挤出窗口 ---------- */
@media (max-width: 1279px) {
  .nav { padding: 28px 36px; }
  .hero { padding: 56px 36px 100px; gap: 40px; }
  .hero-copy { min-width: 340px; }
  .hero-phones { gap: 20px; }
  .phone-frame { width: 240px; height: 520px; }
  .phone-scale { transform: scale(.8); }
  .rules-inner, .map-inner, .download-inner { padding-left: 36px; padding-right: 36px; }
  .footer-inner { padding-left: 36px; padding-right: 36px; }
}

/* ---------- 小屏适配 ---------- */
@media (max-width: 720px) {
  .nav { padding: 24px 20px; }
  .hero { padding: 40px 20px 80px; gap: 48px; }
  .hero-copy { min-width: 0; }
  .hero-title { font-size: 40px; }
  .hero-phones { flex: 1 1 100%; flex-wrap: wrap; }
  .rules-inner, .map-inner, .download-inner { padding-left: 20px; padding-right: 20px; }
  .footer-inner { padding: 32px 20px; }
}
