/* =========================================================
   deck.css —— 单屏分页模式（首页专用，最后加载）
   桌面 ≥1024：四个区块 + 首屏 + 预约 = 一屏一页，滚轮翻页
   窄屏 <1024：退回普通纵向流式滚动，右栏导航隐藏
   ========================================================= */

/* 全局栏目行只在分页模式出现 */
.deck-rail { display: none; }

@media (min-width: 1024px) {
  html.deck-mode,
  html.deck-mode body { height: 100%; overflow: hidden; }

  .deck {
    position: relative;
    height: 100svh;
    overflow: hidden;
  }

  .deck > .slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 92px 0 54px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(46px);
    transition: opacity .58s cubic-bezier(.22,.61,.36,1),
                transform .58s cubic-bezier(.22,.61,.36,1),
                visibility .58s;
    will-change: opacity, transform;
  }

  .deck > .slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    z-index: 2;
  }

  .deck > .slide.is-before { transform: translateY(-46px); }

  /* 首屏本身已经 100svh，去掉多余高度 */
  .deck > .slide.hero { padding: 0; height: 100svh; }

  /* 段落间距压缩，让四个区块各自一屏装得下 */
  .deck > .slide.section-pad { padding: 92px 0 52px; }
  /* 栏目行（01 世界推进 …）四个板块必须落在同一条水平线上：
     原来靠 justify-content:center，行位置随各段内容高度上下浮动。
     改成顶端对齐 + 固定 padding-top，坐标就钉死了。 */
  .deck > .slide.section-pad {
    justify-content: flex-start;
    padding-top: 140px;
    padding-bottom: 28px;
  }
  .deck .section-rail { margin-bottom: 26px; }
  /* 栏目行翻页时不许动：slide 里那条只保留占位（visibility:hidden 仍占高度），
     真正显示的是 main.deck 直下的 #deckRail，文字由 deck.js 换。
     宽度要算成「版心 − 右栏 152」，否则底部那条金线会比各板块长一截。 */
  .deck > .slide .section-rail { visibility: hidden; }
  html.deck-mode .deck-rail {
    display: flex;
    position: fixed;
    /* 版心改成左右各缩 122 之后（见文件末尾「版心居中」），栏目行也跟着右移 122，
       宽度同步减去 244，否则底部那条金线会比各板块长/短一截 */
    left: calc(max(32px, (100% - 1440px) / 2) + 137px);
    /* 必须等于 slide 的 padding-top，否则固定层会比自己占位的那条高出/低一截，
       和下面内容叠在一起 */
    top: 140px;
    width: calc(min(1440px, 100% - 64px) - 274px);
    margin: 0;
    z-index: 6;
    pointer-events: none;
  }

  /* —— 世界 —— */
  .deck .world-grid { gap: 46px; align-items: center; }
  /* 不能只按 66vh 定高：视口一矮，图片就比版心剩下的那块高，
     grid 的 align-items:center 会把它往上下两头撑，顶到栏目行上去。
     直接按「视口高 − 上内边距 140 − 下内边距 28 − 栏目行 36 − 行距 26」算。 */
  .deck .world-visual { height: min(600px, calc(100svh - 236px)); }
  .deck .world-copy h3 { font-size: 27px; margin: 12px 0 18px; }
  .deck .world-route { margin-top: 18px; }
  /* padding-left 是「当前地图」那条红色竖标的位置，别被简写吃掉 */
  .deck .world-route-item { padding: 11px 0 11px 14px; }
  .deck .world-route-item h4,
  .deck .world-route-item .route-title { font-size: 16px; }
  .deck .world-route-item .route-note { font-size: 13.5px; }
  .deck .world-difficulties { margin: 18px 0 18px; }
  .deck .world-difficulties span { padding: 7px 4px; font-size: 13px; }
  .deck .world-copy .text-link { margin-top: 14px; }

  /* —— 职业 —— */
  .deck .class-stage { grid-template-columns: 360px 430px minmax(0, 400px); align-items: center; }
  /* 左列位置必须与「选哪个职业」无关：行高原来由最长的详情列撑开，
     法师的文案多一行，整列就跟着往下挪 11px。把行高钉死在立绘高度上，
     详情列再用 max-height 溢出，就不会反过来影响行高。 */
  .deck .class-stage { --art-h: min(62vh, 600px); grid-template-rows: var(--art-h); }
  .deck .class-detail { max-height: 100%; }
  /* 左列四个职业按钮原本贴着列顶，往下空一大截；
     改成整组在列内垂直居中，与中间立绘的中线对齐。
     边框线随之移到第一个按钮上，否则会留在列顶浮着一条空线。 */
  .deck .class-tabs { justify-content: center; border-top: 0; }
  .deck .class-tab:first-child { border-top: 1px solid rgba(196,176,137,.22); }
  .deck .class-art { width: 430px; height: var(--art-h); }
  /* 详情列与立绘之间要留出呼吸：立绘右侧有渐隐遮罩，24px 看着像贴在图上 */
  .deck .class-detail { align-self: center; padding-left: 44px; }
  .deck .class-detail h3 { font-size: 34px; }
  .deck .class-quote { font-size: 15px; }
  .deck .class-description { font-size: 14px; line-height: 1.9; min-height: 0; margin-bottom: 14px; }
  .deck .class-fit { font-size: 13.5px; }
  .deck .class-stats { margin: 14px 0; }
  .deck .class-foot { gap: 6px; }
  .deck .class-cta { margin-top: 14px; min-height: 46px; }

  /* —— 玩法 —— */
  .deck .feature-card { height: min(46vh, 430px); }
  .deck .feature-content h3 { font-size: 26px; margin: 6px 0 10px; }
  .deck .feature-content p { font-size: 14px; line-height: 1.8; }
  .deck .item-cycle { margin-top: 30px; padding: 20px 0 18px; }
  .deck .item-cycle h3 { font-size: 21px; }
  .deck .item-cycle > header { margin-bottom: 16px; }
  .deck .item-cycle li > span { margin-bottom: 9px; font-size: 15px; }
  .deck .item-cycle h4 { font-size: 16px; }

  /* —— 系统 —— */
  .deck .archive-volumes a { padding: 15px 10px 15px 6px; }
  .deck .archive-volumes h3 { font-size: 18px; }
  .deck .archive-volumes p { font-size: 13px; }
  .deck .archive-volumes a > span { font-size: 27px; }
  .deck .archive-brief { padding: 24px 26px 20px; }
  .deck .archive-brief h3 { font-size: 24px; }
  .deck .archive-brief li p { font-size: 13.5px; line-height: 1.75; }
  .deck .archive-brief .btn { min-height: 46px; }

  /* —— 预约 —— */
  .deck > .slide.final-cta { height: 100svh; padding: 0; }
  .deck > .slide.final-cta .final-cta-inner { flex: 1; display: grid; place-items: center; position: relative; }
  .deck .site-footer { position: relative; z-index: 3; background: transparent; border-top: 0; padding: 0 42px 18px; }

  /* 右栏页码导航 */
  .deck-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 120;
    display: block;
  }
  .deck-nav ol {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  /* 贯穿菱形的那根金线：菱形是 34px 正方形旋转 45°，箱体中心在右侧 17px 处，
     线宽 1px 所以取 16.5px 才压在菱形正中（原来是 27px，偏左 10px） */
  .deck-nav ol:before {
    content: "";
    position: absolute;
    right: 16.5px;
    top: 20px;
    bottom: 20px;
    width: 1px;
    background: linear-gradient(180deg, rgba(198,172,126,.05), rgba(198,172,126,.38) 18%, rgba(198,172,126,.38) 82%, rgba(198,172,126,.05));
  }
  .deck-nav li { position: relative; display: flex; justify-content: flex-end; }
  .deck-nav a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 0 8px 10px;
    text-decoration: none;
  }
  .deck-badge {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    transform: rotate(45deg);
    border: 1px solid rgba(198,172,126,.42);
    /* 必须是实色：半透明时贯穿这排菱形的那条金线会从方块里透出来 */
    background: #0C0F12;
    display: grid;
    place-items: center;
    transition: background .25s, border-color .25s, box-shadow .25s, transform .25s;
  }
  .deck-badge i {
    transform: rotate(-45deg);
    /* 汉字数字（〇壹贰叁肆伍）用衬线中文字族，Georgia 没有这些字形 */
    font-family: var(--serif);
    font-style: normal;
    font-size: 14.5px;
    letter-spacing: 0;
    color: #B9A784;
    transition: color .25s;
  }
  /* 「〇」的字形本来就比「壹贰叁」小一圈，单独放大一档 */
  .deck-nav li:first-child .deck-badge i { font-size: 16px; }
  .deck-name {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    margin-top: -.8em;
    font-family: var(--serif);
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: .16em;
    text-align: right;
    color: #8C8579;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity .25s, transform .25s, color .25s;
    white-space: nowrap;
    pointer-events: none;
  }
  .deck-nav a:hover .deck-name { opacity: .8; transform: none; }
  .deck-nav a:hover .deck-badge { border-color: rgba(198,172,126,.8); }

  .deck-nav a.is-active .deck-name {
    opacity: 1;
    transform: none;
    color: #F1EDE2;
    font-size: 15px;
    text-shadow: 0 2px 14px rgba(0,0,0,.8);
  }
  .deck-nav a.is-active .deck-badge {
    background: linear-gradient(135deg, #A52833, #6C1A21);
    border-color: #D1434E;
    box-shadow: 0 0 20px rgba(165,40,51,.5), inset 0 0 14px rgba(255,120,130,.18);
    transform: rotate(45deg) scale(1.06);
  }
  .deck-nav a.is-active .deck-badge i { color: #FBEFE9; }
}

/* 窄屏：导航不出现，各段恢复常规流 */
@media (max-width: 1023px) {
  .deck-nav { display: none; }
}

/* 分页模式下没有滚动，进场动画不再靠 IntersectionObserver：活动页里的内容一律显示 */
@media (min-width: 1024px) {
  html.deck-mode .slide .reveal,
  html.deck-mode .slide .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* 关动画（截图核对 / 偏好减少动态） */
html.deck-nofx .deck > .slide { transition: none !important; }
html.deck-nofx .deck-name,
html.deck-nofx .deck-badge { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html.deck-mode .deck > .slide { transition: none !important; }
}

/* 右栏导航占位：内容整体内缩，避免与页码压在一起。
   原来只缩右侧 152，内容的中心线就跟着左偏 76，版心看起来像贴在左边。
   现在左右各缩 122：算下来内容右边缘恒等于「视口宽 − 154」，
   正好让开右栏「菱形 34 + 内边距 10 + 间距 14 + 四字标签 66 + 右边距 30」，
   同时中心线回到视口正中。首屏文案本来就是 940px 居中，这样两者才对得上。 */
@media (min-width: 1024px) {
  html.deck-mode .deck .section-shell.wide {
    width: min(1440px, calc(100% - 64px));
    padding: 0 137px;
    box-sizing: border-box;
  }
}

/* 预约页：页脚并入同一屏（窄屏时恢复常规流式） */
.final-cta { height: auto; min-height: 660px; display: flex; flex-direction: column; justify-content: center; }
.final-cta-inner { position: relative; z-index: 2; width: 100%; flex: 1; display: grid; place-items: center; padding: 70px 0 24px; }
.final-cta .site-footer { position: relative; z-index: 3; width: 100%; }
@media (max-width: 1023px) {
  .final-cta-inner { padding: 56px 0 18px; }
  .final-cta .site-footer { padding: 24px 20px 18px; }
}

/* 活动项：红底横向色带（参考站那种“当前章节”的提示） */
@media (min-width: 1024px) {
  .deck-nav a { position: relative; isolation: isolate; }
  .deck-nav a.is-active:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 2px;
    bottom: 2px;
    left: -128px;
    /* 收在菱形中心（右侧 17px）之内：菱形旋转后四角是空的，
       色带一旦越过就从这个缺口漏出红边 */
    right: 17px;
    background: linear-gradient(90deg, rgba(165,40,51,0) 0%, rgba(165,40,51,.22) 34%, rgba(165,40,51,.46) 100%);
    border-radius: 2px;
    /* 上下边缘柔化，避免在首屏亮图上露出一块硬边矩形 */
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 26%, #000 74%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 26%, #000 74%, transparent 100%);
  }
  .deck-nav a.is-active .deck-name { letter-spacing: .18em; }
}

/* 分页模式：栏目行固定到同一 y 后，职业区比原来多占一截，
   把详情列的行间距整体收紧（只作用于 ≥1024 的分页模式，流式布局不动） */
@media (min-width: 1024px) {
  .deck .class-role { margin-bottom: 10px; }
  .deck .class-detail h3 { margin-bottom: 6px; }
  .deck .class-description { margin-bottom: 10px; line-height: 1.8; }
  .deck .class-fit { margin-bottom: 18px; }
  .deck .class-chips { margin: 16px 0 0; }
  .deck .class-radar { margin: 0 0 12px; }
  .deck .class-skills { margin: 18px 0 0; padding-top: 16px; }
  .deck .class-skills-head { margin-bottom: 12px; }
  .deck .class-skill-list li { line-height: 1.6; }
  .deck .class-cta { margin-top: 10px; }
}

/* 1024–1499：360+430+400 = 1190 这套固定列宽要版心 ≥1190，
   版心现在 = 100% - 64 - 244，1500 以下装不下，这一段改成按比例分，宽度自己找平。 */
@media (min-width: 1024px) and (max-width: 1499px) {
  .deck .class-stage {
    --art-h: min(60vh, 560px);
    grid-template-columns: minmax(180px, .6fr) minmax(0, 1fr) minmax(290px, .9fr);
  }
  .deck .class-art { width: 100%; height: var(--art-h); }
  .deck .class-detail { padding-left: 44px; }
  .deck .class-radar { grid-template-columns: 150px minmax(0, 1fr); gap: 8px 12px; }
  .deck .radar-labels { display: none; }
  .deck .radar-legend { width: 112px; }
  /* 左列变窄后「四种分工 —— 终点由装备决定」会剩一个字掉到第二行 */
  .deck .class-tabs-note { font-size: 12px; letter-spacing: .02em; padding-right: 8px; }
}
@media (min-width: 1024px) and (max-width: 1499px) {
  .deck .radar-plot { transform: scale(1.34); }
}

/* 1024–1199：版心左右各缩 122 之后，左列掉到 180px 出头，
   「弓箭手」正好在这一段被挤成两行。把按钮的编号列和左右内边距收一收换回一行。 */
@media (min-width: 1024px) and (max-width: 1199px) {
  .deck .class-tab {
    grid-template-columns: 24px minmax(0, 1fr) 10px;
    gap: 10px;
    padding: 18px 10px 18px 12px;
  }
  .deck .class-tab strong { font-size: 16px; letter-spacing: .08em; }
}

/* 系统索引：右侧卡片删除后只剩一张五行表，行高放开撑满整屏 */
@media (min-width: 1024px) {
  .deck .archive-volumes a { padding: 28px 12px 28px 6px; }
  .deck .archive-volumes a > span { font-size: 32px; }
}

/* 上面那档 28px 是按 900+ 的视口放的：五行 × 113 ≈ 566，
   加上顶栏 140 + 栏目行 65 = 771，1366×768 会溢出 4px、1024×700 直接切掉「05 流通与交易」。
   矮屏按视口高把行距收一档（行高 93、整表 465、底边落在 670），700 也能留 30 的余量。 */
@media (min-width: 1024px) and (max-height: 840px) {
  .deck .archive-volumes a { padding: 18px 12px 18px 6px; }
  .deck .archive-volumes a > span { font-size: 28px; }
}

/* 最后一格改成 ∞：汉字数字那一档字号对 ∞ 太挤，单独换成 Georgia 并降一档字重感 */
.deck-nav .deck-badge--inf i {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0;
  padding-bottom: 2px;
}
.deck-nav a.is-active .deck-badge--inf i { font-size: 18px; }

/* 世界屏加了「地志」之后，矮屏（≤780）右栏多出约 60px。
   这里只收间距与字号，不删内容：路线行、标题、难度条的留白各让一点。 */
@media (min-width: 1024px) and (max-height: 780px) {
  .deck .world-route { margin-top: 10px; }
  .deck .world-route-item { padding: 8px 0 8px 14px; }
  .deck .world-copy h3 { font-size: 23px; margin: 10px 0 10px; }
  .deck .world-difficulties { margin: 8px 0 12px; }
  .deck .world-lore { margin-top: 8px; padding-left: 14px; }
  .deck .world-lore .lore-body { font-size: 13px; line-height: 1.7; }
  .deck .world-lore .lore-rumor { margin-top: 4px; }
}
