:root {
  --wwj-brand-font: "LXGW WenKai", "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", serif;
  --wwj-body-font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
}

body,
button,
input,
select,
textarea,
#container,
#menu,
#menuopenbutton,
#loading,
#remarks {
  font-family: var(--wwj-body-font) !important;
  letter-spacing: 0;
}

body._wf,
body._wf ._n,
body._wf ._b {
  font-family: var(--wwj-body-font) !important;
}

html[data-wwj-product="exploration-world"] [data-wwj-rebrand-owned],
html[data-wwj-product="exploration-world"] [data-wwj-rebrand-text="true"] {
  font-family: var(--wwj-body-font);
  letter-spacing: 0;
}

html[data-wwj-product="exploration-world"] .wwj-localization-shell {
  display: none !important;
}

/* -----------------------------
   左上角个人品牌
----------------------------- */

#introLogo {
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: none !important;
}

.wwj-intro-wordmark {
  display: block;
  width: 100%;
  color: #101416;
  font-family: var(--wwj-brand-font) !important;
  font-size: 38rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

#logoLT::before {
  content: none !important;
  background-image: none !important;
}

.wwj-corner-wordmark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0e1214;
  font-family: var(--wwj-brand-font) !important;
  font-size: 31rem;
  line-height: 1;
  white-space: nowrap;
}

/* -----------------------------
   旧版首屏中文挂载节点
----------------------------- */

#titleIntro .title::after,
#titleRT .curiosity::before,
#titleRT .is::before,
#titleRT .life::before,
#titleIntro .tagline::before,
#titleRT .tagline::before {
  content: none !important;
  background-image: none !important;
}

.wwj-hero-label,
.wwj-triad-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0c1113;
  font-family: var(--wwj-brand-font) !important;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

/* 比原版缩小约 25%，避免主标题压满画面 */
#titleIntro .curiosity .wwj-hero-label {
  justify-content: flex-start;
  padding-left: 34rem;
  font-size: 48rem;
}

#titleIntro .is .wwj-hero-label {
  font-size: 32rem;
}

#titleIntro .life .wwj-hero-label {
  font-size: 42rem;
}

#titleIntro .tagline {
  display: flex !important;
  align-items: center;
  width: 416rem !important;
  height: 48rem !important;
  background: transparent !important;
}

#titleIntro .tagline::after {
  border: 0 !important;
  border-bottom: 1px solid #0c1113 !important;
}

.wwj-hero-tagline {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 4rem 10rem;
  font-size: 17rem;
  line-height: 1.35;
  white-space: nowrap;
}

#titleIntro .open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 201rem;
  height: 64rem;
  border: 1px solid #111;
  background: #fff !important;
  background-image: none !important;
}

.wwj-notebook-prompt {
  display: block;
  padding: 0 14rem;
  font-family: var(--wwj-brand-font) !important;
  font-size: 16rem;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

#titleRT .curiosity .wwj-triad-label {
  font-size: 19rem;
}

#titleRT .is .wwj-triad-label,
#titleRT .life .wwj-triad-label {
  font-size: 15rem;
}

#titleRT .tagline {
  display: none !important;
}

/* -----------------------------
   菜单说明
----------------------------- */

.wwj-modal-intro {
  max-width: 560rem;
  margin: 0 0 32rem;
  color: #202628;
  font-size: 15rem;
  line-height: 1.75;
}

/* -----------------------------
   场景中文故事卡
----------------------------- */

#wwj-exploration-story {
  position: fixed;
  left: 32rem;
  bottom: 32rem;
  z-index: 2;
  width: min(390rem, calc(100vw - 64rem));
  padding: 24rem 26rem 24rem 30rem;
  border-left: 3rem solid #101416;
  background: rgba(245, 245, 245, 0.88);
  color: #101416;
  opacity: 0;
  transform: translateY(18rem);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

#wwj-exploration-story.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#wwj-exploration-story.is-final {
  top: 50%;
  right: 7vw;
  bottom: auto;
  left: auto;
  width: min(460rem, 38vw);
  transform: translateY(-46%);
}

#wwj-exploration-story.is-final.is-visible {
  transform: translateY(-50%);
}

.wwj-story-eyebrow {
  margin: 0 0 9rem;
  font-size: 12rem;
  font-weight: 700;
  line-height: 1.4;
}

.wwj-story-title {
  margin: 0 0 12rem;
  font-family: var(--wwj-brand-font) !important;
  font-size: 29rem;
  font-weight: 400;
  line-height: 1.35;
}

.wwj-story-copy {
  display: grid;
  gap: 7rem;
}

.wwj-story-copy p {
  margin: 0;
  font-size: 15rem;
  line-height: 1.75;
}

body:has(dialog#menu[open]) #wwj-exploration-story {
  opacity: 0;
}

/* =========================================================
   新版 Adapter 首屏覆盖
   作用于 #wwj-rebrand-root，优先级高于 Adapter 注入的关键样式。
   中间“魏文杰 / 探索 / 世界”整体缩小约 27%。
========================================================= */

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-title {
  left: 29vw !important;
  top: 26vh !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-line {
  padding: 0.015em 0.15em 0.085em !important;
  font-size: clamp(46px, 5.15vw, 96px) !important;
  line-height: 0.94 !important;
  letter-spacing: 0.075em !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-intro {
  left: 29.4vw !important;
  top: 66.5vh !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-intro strong {
  font-size: clamp(24px, 1.85vw, 35px) !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-intro span {
  font-size: clamp(14px, 0.95vw, 18px) !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-notebook-prompt {
  font-size: clamp(16px, 1.15vw, 22px) !important;
}

/* -----------------------------
   移动端
----------------------------- */

@media (max-width: 767px) {
  .wwj-intro-wordmark {
    font-size: 25rem;
  }

  .wwj-corner-wordmark {
    font-size: 20rem;
  }

  #titleIntro .curiosity .wwj-hero-label {
    padding-left: 20rem;
    font-size: 32rem;
  }

  #titleIntro .is .wwj-hero-label {
    font-size: 22rem;
  }

  #titleIntro .life .wwj-hero-label {
    font-size: 29rem;
  }

  #titleIntro .tagline {
    width: 259rem !important;
    height: 38rem !important;
  }

  .wwj-hero-tagline {
    padding-bottom: 7rem;
    font-size: 12rem;
  }

  #titleIntro .open {
    right: -54rem;
    width: 154rem;
    height: 48rem;
  }

  .wwj-notebook-prompt {
    padding: 0 8rem;
    font-size: 12rem;
  }

  #titleRT .curiosity .wwj-triad-label {
    font-size: 12rem;
  }

  #titleRT .is .wwj-triad-label,
  #titleRT .life .wwj-triad-label {
    font-size: 10rem;
  }

  #wwj-exploration-story,
  #wwj-exploration-story.is-final {
    top: auto;
    right: auto;
    bottom: 74rem;
    left: 16rem;
    width: calc(100vw - 32rem);
    max-height: 38vh;
    padding: 16rem 18rem 16rem 20rem;
    overflow: hidden;
    transform: translateY(14rem);
  }

  #wwj-exploration-story.is-visible,
  #wwj-exploration-story.is-final.is-visible {
    transform: translateY(0);
  }

  .wwj-story-eyebrow {
    margin-bottom: 5rem;
    font-size: 10rem;
  }

  .wwj-story-title {
    margin-bottom: 7rem;
    font-size: 20rem;
  }

  .wwj-story-copy {
    gap: 3rem;
  }

  .wwj-story-copy p {
    font-size: 12rem;
    line-height: 1.55;
  }

  .wwj-modal-intro {
    margin-bottom: 20rem;
    font-size: 12rem;
  }

  html[data-wwj-product="exploration-world"]
    #wwj-rebrand-root
    .wwj-hero-title {
    left: 10vw !important;
    top: 21vh !important;
  }

  html[data-wwj-product="exploration-world"]
    #wwj-rebrand-root
    .wwj-hero-line {
    padding: 0.02em 0.14em 0.09em !important;
    font-size: clamp(40px, 12vw, 58px) !important;
    line-height: 0.98 !important;
  }

  html[data-wwj-product="exploration-world"]
    #wwj-rebrand-root
    .wwj-hero-intro {
    left: 10vw !important;
    top: 59vh !important;
    max-width: 80vw !important;
  }

  html[data-wwj-product="exploration-world"]
    #wwj-rebrand-root
    .wwj-hero-intro strong {
    font-size: 23px !important;
  }

  html[data-wwj-product="exploration-world"]
    #wwj-rebrand-root
    .wwj-hero-intro span {
    font-size: 14px !important;
  }
}
/* =========================================================
   首屏标题最终微调：稍缩小、拉开行距、调整副标题位置
========================================================= */

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-title {
  left: 29.5vw !important;
  top: 25.5vh !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-line {
  padding: 0.04em 0.16em 0.11em !important;
  font-size: clamp(42px, 4.65vw, 84px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0.06em !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-line
  + .wwj-hero-line {
  margin-top: 5px !important;
}

/* 下方品牌名与标语，移到本子较干净的位置 */
html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-intro {
  left: 29.8vw !important;
  top: 63.5vh !important;
  gap: 5px !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-intro strong {
  font-size: clamp(22px, 1.55vw, 30px) !important;
  line-height: 1.2 !important;
}

html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-hero-intro span {
  font-size: clamp(13px, 0.82vw, 16px) !important;
  line-height: 1.5 !important;
}

/* 手册按钮略微收小 */
html[data-wwj-product="exploration-world"]
  #wwj-rebrand-root
  .wwj-notebook-prompt {
  font-size: clamp(15px, 1vw, 19px) !important;
  padding: 8px 15px 10px !important;
}
/* =========================================================
   场景白色说明框位置微调：避开主视线
========================================================= */

html[data-wwj-product="exploration-world"] #wwj-exploration-story {
  left: 18rem !important;
  top: 16vh !important;
  bottom: auto !important;
  width: min(340rem, 26vw) !important;
  padding: 20rem 22rem 20rem 24rem !important;
  background: rgba(250, 250, 250, 0.94) !important;
  border-left: 2rem solid #101416 !important;
}

/* 如果是最终场景，仍保持右侧展示逻辑 */
html[data-wwj-product="exploration-world"] #wwj-exploration-story.is-final {
  top: 50% !important;
  right: 7vw !important;
  left: auto !important;
  bottom: auto !important;
  width: min(460rem, 38vw) !important;
}

/* 白框里的标题和正文再稍微紧凑一点 */
html[data-wwj-product="exploration-world"] .wwj-story-eyebrow {
  margin: 0 0 6rem !important;
  font-size: 11rem !important;
}

html[data-wwj-product="exploration-world"] .wwj-story-title {
  margin: 0 0 10rem !important;
  font-size: 25rem !important;
  line-height: 1.28 !important;
}

html[data-wwj-product="exploration-world"] .wwj-story-copy {
  gap: 5rem !important;
}

html[data-wwj-product="exploration-world"] .wwj-story-copy p {
  font-size: 14rem !important;
  line-height: 1.6 !important;
}

/* 移动端单独处理，避免超出屏幕 */
@media (max-width: 767px) {
  html[data-wwj-product="exploration-world"] #wwj-exploration-story,
  html[data-wwj-product="exploration-world"] #wwj-exploration-story.is-final {
    top: 12vh !important;
    left: 12rem !important;
    right: auto !important;
    bottom: auto !important;
    width: min(calc(100vw - 24rem), 300rem) !important;
    max-height: none !important;
    padding: 14rem 16rem 14rem 18rem !important;
  }

  html[data-wwj-product="exploration-world"] .wwj-story-title {
    font-size: 18rem !important;
  }

  html[data-wwj-product="exploration-world"] .wwj-story-copy p {
    font-size: 12rem !important;
    line-height: 1.5 !important;
  }
}
