/* 镜衍都市 · 宇宙版式（可选）
   ------------------------------------------------------------
   由 story-mode.js 在正文出现 .pm-mode-hero 时给 html/body 加 pm-story-on。
   默认不启用：没有标记的页面仍是原来的书页（injectCSS 那套纸质主题）。
   本文件只做「书页 → 宇宙」的覆盖，全部选择器都带 .pm-story-on，
   所以不启用时一条规则都不命中。
   ------------------------------------------------------------ */

/* ---------- 整页底：透明，底图从下面透上来 ---------- */
html.pm-dlc-on.pm-story-on,
html.pm-dlc-on.pm-story-on body {
  background-color: transparent !important;
  background-image: none !important;
}
html.pm-dlc-on.pm-story-on body.pm-has-bg {
  background-color: transparent !important;
  background-image: none !important;
}
html.pm-dlc-on.pm-story-on body::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* ---------- 让出顶部：面包屑、标题带、分隔线都收掉 ---------- */
html.pm-story-on .v-main__wrap > header.v-toolbar,
html.pm-story-on .v-main__wrap > .v-divider,
html.pm-story-on .v-main .container.grey,
html.pm-story-on .v-main .container.grey.darken-4-l3,
html.pm-story-on .v-main .page-header-section {
  display: none !important;
}

html.pm-dlc-on.pm-story-on .v-main .container,
html.pm-story-on .v-main .container.pl-5,
html.pm-story-on .v-main .layout.row {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  max-width: none !important;
}

/* injectCSS 用 body.pm-dlc-on #root .v-application .grey.darken-4-l3 (1,4,1)
   把容器刷成奶黄底，这里必须抬到 (1,5,1) 才压得住。 */
body.pm-dlc-on.pm-story-on #root .v-application .grey.darken-4-l3,
body.pm-dlc-on.pm-story-on #root .v-application .grey.darken-4,
body.pm-dlc-on.pm-story-on #root .v-application .grey,
body.pm-dlc-on.pm-story-on #root .v-application .v-main .container.pl-5,
body.pm-dlc-on.pm-story-on #root .v-application .v-main__wrap {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  color: #3d3424 !important;
}
html.pm-story-on .v-main .container.pl-5 { padding: 0 !important; }
html.pm-story-on .v-main .layout.row { margin: 0 !important; }
html.pm-story-on .v-main .page-col-content {
  flex: 1 1 100% !important;
  max-width: 100% !important;
}
/* 主视觉钻到半透明导航条底下 */
html.pm-story-on .v-main,
html.pm-story-on .v-main__wrap { padding-top: 0 !important; }
/* 注意：上面 .v-main/.v-main__wrap 的透明底在上一段已声明，
   这里只补 padding，别重复写 background。 */

/* 上传的底图留在整页底层，阅读栏不再铺实心纸。 */
html.pm-story-on #pm-page-bg { display: block !important; z-index: 0; }
html.pm-dlc-on.pm-story-on body.pm-has-bg #root .v-application,
html.pm-dlc-on.pm-story-on body.pm-has-bg .v-application--wrap,
html.pm-dlc-on.pm-story-on body.pm-has-bg .v-main,
html.pm-dlc-on.pm-story-on body.pm-has-bg .v-main__wrap {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}
html.pm-story-on body.pm-has-bg .v-main .container.pl-5,
html.pm-story-on body.pm-has-bg #root .v-application .v-main .container.pl-5,
html.pm-story-on body.pm-has-bg #root .v-application .grey.darken-4-l3,
html.pm-story-on body.pm-has-bg #root .w-note,
html.pm-story-on body.pm-has-bg #root .w-note-glow {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
html.pm-story-on .pm-bg-tools button {
  background: rgba(255, 250, 243, .94) !important;
  color: #8f6230 !important;
  border-color: rgba(143, 98, 48, .4) !important;
}

/* ---------- 主视觉 ---------- */
html.pm-story-on .pm-hero {
  position: relative;
  display: block;
  width: 100%;
  height: min(88vh, 760px);
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  background: transparent;
}
html.pm-story-on .pm-hero-bg {
  position: absolute;
  inset: 0;
  background-color: transparent;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .45s ease;
}
html.pm-story-on .pm-hero.is-ready .pm-hero-bg { opacity: 1; }
html.pm-story-on .pm-hero-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
}
html.pm-story-on .pm-hero-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  width: min(660px, 88vw);
  margin: 0 auto;
  text-align: center;
}
html.pm-story-on .pm-hero-t {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-family: "Crimson Text", "Source Han Serif SC", "Noto Serif SC",
    "Songti SC", "SimSun", Georgia, serif !important;
  font-size: clamp(2rem, 5vw, 3.75rem) !important;
  font-weight: 500;
  line-height: 1.15 !important;
  letter-spacing: .14em;
  text-indent: .14em;
  color: #fffdf8 !important;
  text-shadow: 0 2px 18px rgba(40, 24, 8, .55);
}
html.pm-story-on .pm-hero-s {
  margin: 16px 0 0 !important;
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: .08em;
  color: #ffe3a8 !important;
  text-shadow: 0 1px 12px rgba(40, 24, 8, .5);
}
html.pm-story-on .pm-hero-m {
  margin: 10px 0 0 !important;
  font-size: .75rem;
  letter-spacing: .1em;
  color: #fff6e4 !important;
  text-shadow: 0 1px 10px rgba(40, 24, 8, .45);
}
html.pm-story-on .pm-hero-hint {
  display: inline-block;
  margin-top: 30px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .7rem;
  letter-spacing: .4em;
  text-indent: .4em;
  color: #fff6e4;
  text-shadow: 0 1px 8px rgba(40, 24, 8, .4);
  cursor: pointer;
  animation: pmHeroHint 2.6s ease-in-out infinite;
}
html.pm-story-on .pm-hero-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 17px;
  margin: 8px auto 0;
  background: linear-gradient(#ffe3a8, rgba(255, 227, 168, 0));
}
@keyframes pmHeroHint {
  0%, 100% { opacity: .55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}

/* ---------- 正文窄栏：把书页的羊皮纸整层撤掉 ---------- */
body.pm-dlc-on.pm-story-on #root .v-application .v-main .contents,
html.pm-dlc-on.pm-story-on .v-main .contents,
html.pm-story-on .v-main .contents {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 660px !important;
  margin: 0 auto !important;
  padding: 56px 36px 120px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #3d3424 !important;
  font-family: "Crimson Text", "Source Han Serif SC", "Noto Serif SC",
    "Songti SC", "SimSun", Georgia, serif !important;
  font-size: 18px;
  line-height: 1.58;
}
/* 书页的角花与纸张纹理一并撤掉 */
html.pm-story-on .v-main .contents::before { content: none !important; }
html.pm-dlc-on.pm-story-on .v-main .contents > div {
  background: transparent !important;
  background-image: none !important;
  max-width: none !important;
}

html.pm-story-on .v-main .contents p,
html.pm-story-on .v-main .contents li,
html.pm-story-on .v-main .contents dd,
html.pm-story-on .v-main .contents td,
html.pm-story-on .v-main .contents th {
  color: #3d3424 !important;
  font-family: inherit !important;
  font-size: 18px;
  line-height: 1.58;
}
html.pm-story-on .v-main .contents p { margin: 0 0 1.05em !important; }
html.pm-story-on .v-main .contents li { margin: 0 0 .4em; }
html.pm-story-on .v-main .contents ul,
html.pm-story-on .v-main .contents ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}
html.pm-story-on .v-main .contents li::marker { color: #a56b2d !important; }

/* 标题：金线代替书页的赭石短条 */
html.pm-story-on .v-main .contents h1,
html.pm-story-on .v-main .contents h2,
html.pm-story-on .v-main .contents h3,
html.pm-story-on .v-main .contents h4 {
  font-family: inherit !important;
  color: #8f6230 !important;
  font-weight: 500;
  letter-spacing: .1em;
  line-height: 1.35;
  border: 0 !important;
  background: none !important;
}
html.pm-story-on .v-main .contents h1 { font-size: 1.7rem; margin: 0 0 .8em !important; }
html.pm-story-on .v-main .contents h2 { font-size: 1.36rem; margin: 2.4em 0 .9em !important; padding: 0 !important; }
html.pm-story-on .v-main .contents h3 { font-size: 1.06rem; margin: 2em 0 .7em !important; color: #a56b2d !important; }
html.pm-story-on .v-main .contents h4 { font-size: 1rem; margin: 1.8em 0 .6em !important; color: #a56b2d !important; }

/* 书页给标题加的居中金条（::after）要收掉，否则标题下会多一条短条。
   :not(#pm-story-guard) 是为了把特异性提到 ID 级，压过 injectCSS 里的同款规则。 */
html.pm-story-on .v-main .contents:not(#pm-story-guard) h1::after,
html.pm-story-on .v-main .contents:not(#pm-story-guard) h2::after,
html.pm-story-on .v-main .contents:not(#pm-story-guard) h3::after,
html.pm-story-on .v-main .contents:not(#pm-story-guard) h4::after,
html.pm-story-on .v-main .contents:not(#pm-story-guard) h5::after,
html.pm-story-on .v-main .contents:not(#pm-story-guard) h6::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html.pm-story-on .v-main .contents:not(#pm-story-guard) h2::before,
html.pm-story-on .v-main .contents:not(#pm-story-guard) h3::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* 插图：满栏宽、无框 */
html.pm-story-on .v-main .contents img,
html.pm-story-on .v-main .contents video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 2em 0 !important;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent !important;
}

html.pm-story-on .v-main .contents blockquote {
  margin: 1.4em 0 1.6em !important;
  padding: .1em 0 .1em 1.1em !important;
  border: 0 !important;
  border-left: 2px solid #c4893a !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  background: none !important;
  color: #5c4a34 !important;
  font-style: italic;
}
html.pm-story-on .v-main .contents blockquote p {
  color: #5c4a34 !important;
  margin-bottom: .8em !important;
}
html.pm-story-on .v-main .contents blockquote p:last-child { margin-bottom: 0 !important; }

html.pm-story-on .v-main .contents hr {
  height: 0 !important;
  margin: 2.2em 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(165, 107, 45, .35) !important;
  background: none !important;
}

html.pm-story-on .v-main .contents a {
  color: #2f7a74 !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 122, 116, .45);
  text-underline-offset: .18em;
}
html.pm-story-on .v-main .contents a:hover {
  color: #1d5c57 !important;
  border-bottom-color: rgba(29, 92, 87, .7);
}

html.pm-story-on .v-main .contents code {
  padding: .05em .35em;
  background: rgba(143, 98, 48, .1) !important;
  color: #3d3424 !important;
  border: 0 !important;
  font-size: .92em;
}
html.pm-story-on .v-main .contents pre {
  margin: 1.4em 0;
  padding: 14px 16px;
  overflow: auto;
  background: transparent !important;
  border: 0 !important;
  border-left: 2px solid #c4893a !important;
  border-radius: 0;
  box-shadow: none !important;
  color: #3d3424 !important;
}
html.pm-story-on .v-main .contents pre code {
  background: transparent !important;
  color: #3d3424 !important;
}

html.pm-story-on .v-main .contents table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: .95em;
}
html.pm-story-on .v-main .contents th,
html.pm-story-on .v-main .contents td {
  padding: 8px 10px;
  border: 0 !important;
  border-bottom: 1px solid rgba(165, 107, 45, .28) !important;
  background: transparent !important;
  text-align: left;
}
html.pm-story-on .v-main .contents th {
  color: #8f6230 !important;
  font-weight: 500;
  letter-spacing: .08em;
}
html.pm-story-on .v-main .contents tbody tr:nth-child(even) td,
html.pm-story-on .v-main .contents tbody tr:hover td {
  background: transparent !important;
}

html.pm-story-on .v-main .contents details {
  background: transparent !important;
  border: 0 !important;
  border-left: 2px solid rgba(196, 137, 58, .55) !important;
  border-radius: 0;
  padding: .4em .9em !important;
}
html.pm-story-on .v-main .contents details > summary {
  color: #8f6230 !important;
  font-weight: 500;
}

/* 注释块 / 语义色块跟着换深底 */
html.pm-story-on .v-main .contents .w-note {
  background: transparent !important;
  border-color: rgba(165, 107, 45, .35) !important;
  color: #3d3424 !important;
}
html.pm-story-on .v-main .contents .w-note-by { color: #7a6244 !important; }
html.pm-story-on .v-main .contents .w-lore-box,
html.pm-story-on .v-main .contents .w-box {
  background: transparent !important;
  color: #3d3424 !important;
}

/* ---------- 页内切换块（.pm-tab）换金线 ---------- */
html.pm-story-on .pm-swap .pm-switch button {
  color: #7a6244 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(165, 107, 45, .28) !important;
  border-radius: 0;
  box-shadow: none !important;
}
html.pm-story-on .pm-swap .pm-switch button:hover { color: #8f6230 !important; }
html.pm-story-on .pm-swap .pm-switch button.is-on {
  color: #3d3424 !important;
  border-bottom-color: #c4893a !important;
}

/* ---------- 顶栏与页脚 ---------- */
html.pm-dlc-on.pm-story-on header.v-app-bar,
html.pm-dlc-on.pm-story-on .nav-header,
html.pm-dlc-on.pm-story-on .nav-header.black,
html.pm-dlc-on.pm-story-on .v-app-bar.v-toolbar {
  background: rgba(255, 250, 243, .82) !important;
  background-color: rgba(255, 250, 243, .82) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(165, 107, 45, .28) !important;
  box-shadow: none !important;
}
html.pm-dlc-on.pm-story-on .nav-header .subheading,
html.pm-dlc-on.pm-story-on .v-toolbar__title,
html.pm-dlc-on.pm-story-on .nav-header .v-btn,
html.pm-dlc-on.pm-story-on .nav-header .v-icon,
html.pm-dlc-on.pm-story-on .nav-header .v-toolbar__content {
  color: #3d3424 !important;
}
html.pm-dlc-on.pm-story-on .nav-header .v-input__slot,
html.pm-dlc-on.pm-story-on .nav-header .v-text-field__slot {
  background: rgba(255, 252, 245, .9) !important;
  box-shadow: inset 0 0 0 1px rgba(165, 107, 45, .28) !important;
}
html.pm-dlc-on.pm-story-on .nav-header input,
html.pm-dlc-on.pm-story-on .nav-header .v-label { color: #3d3424 !important; }
html.pm-dlc-on.pm-story-on .nav-header .v-input__slot::before,
html.pm-dlc-on.pm-story-on .nav-header .v-input__slot::after { border-color: rgba(165, 107, 45, .45) !important; }
html.pm-dlc-on.pm-story-on .pm-back {
  color: #8f6230;
  border-color: rgba(143, 98, 48, .45);
}
html.pm-dlc-on.pm-story-on .pm-views { color: #7a6244 !important; }
html.pm-story-on .v-footer,
html.pm-story-on .pm-icp a {
  background: transparent !important;
  color: #7a6244 !important;
}
html.pm-dlc-on.pm-story-on ::selection {
  background: rgba(196, 137, 58, .35);
  color: #3d3424;
}

/* ---------- 小屏 ---------- */
@media (max-width: 800px) {
  html.pm-story-on .pm-hero { height: 62vh; min-height: 320px; }
  html.pm-story-on .pm-hero-inner { bottom: 9%; width: 88vw; }
  html.pm-story-on .pm-hero-s { font-size: .88rem; }
  html.pm-story-on .pm-hero-hint { margin-top: 20px; }
  html.pm-dlc-on.pm-story-on .v-main .contents,
  html.pm-story-on .v-main .contents {
    max-width: none !important;
    padding: 36px 20px 84px !important;
  }
  html.pm-story-on .v-main .contents p,
  html.pm-story-on .v-main .contents li,
  html.pm-story-on .v-main .contents td,
  html.pm-story-on .v-main .contents th { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html.pm-story-on .pm-hero-bg { transition: none; }
  html.pm-story-on .pm-hero-hint { animation: none; }
}
@media print {
  html.pm-story-on .pm-hero { display: none !important; }
}

/* ---------- 版式标记本身不占位 ---------- */
html .pm-mode-hero,
html .pm-mode-book { display: none !important; }

/* ---------- 编辑器预览：跟着切 ----------
   预览有两层：外层 .editor-markdown-preview（底色/边框），
   内层 .editor-markdown-preview-content（滚动区），内层里才是 .contents。
   现有书页样式主要写在外层，所以这里两层都接管。 */
html.pm-dlc-on .editor-markdown-preview.is-pm-hero,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero .contents {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero {
  padding: 32px 0 !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero .contents,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero .contents,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero > div,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero > div {
  max-width: 660px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #3d3424 !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero p,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero li,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero dd,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero td,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero th,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero p,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero li,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero td,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero th {
  color: #3d3424 !important;
  font-family: "Crimson Text", "Source Han Serif SC", "Noto Serif SC",
    "Songti SC", "SimSun", Georgia, serif !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero h1,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero h2,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero h3,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero h4,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero h1,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero h2,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero h3,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero h4 {
  color: #8f6230 !important;
  border: 0 !important;
  font-family: "Crimson Text", "Source Han Serif SC", "Noto Serif SC",
    "Songti SC", "SimSun", Georgia, serif !important;
}
/* 预演里的短金条也收掉，否则深底上会很突兀 */
html.pm-dlc-on .editor-markdown-preview.is-pm-hero:not(#pm-story-guard) h1::after,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero:not(#pm-story-guard) h2::after,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero:not(#pm-story-guard) h3::after,
html.pm-dlc-on .editor-markdown-preview.is-pm-hero:not(#pm-story-guard) h4::after,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero:not(#pm-story-guard) h1::after,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero:not(#pm-story-guard) h2::after,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero:not(#pm-story-guard) h3::after,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero:not(#pm-story-guard) h4::after {
  content: none !important;
  display: none !important;
  background: none !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero a,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero a {
  color: #2f7a74 !important;
  border-bottom-color: rgba(47, 122, 116, .45) !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero blockquote,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero blockquote {
  background: none !important;
  border: 0 !important;
  border-left: 2px solid #c4893a !important;
  color: #5c4a34 !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero pre,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero pre {
  background: transparent !important;
  border: 0 !important;
  border-left: 2px solid #c4893a !important;
  color: #3d3424 !important;
}
html.pm-dlc-on .editor-markdown-preview.is-pm-hero hr,
html.pm-dlc-on .editor-markdown-preview-content.is-pm-hero hr {
  background: none !important;
  border-top: 1px solid rgba(165, 107, 45, .35) !important;
}
