/* 真实图片场景 / M1kAovo
   不用新增 SVG 图画；以下所有路径都指向本地 assets/scenes/。
   只改变页面场景，不改变播放器逻辑、相册数据及文章内容。
*/

/* 01 Home · 月下星图：用已有的极光照片替换旧书房 SVG。 */
.hero::before { display: none; }
.hero-art::before { display: none; }
.hero-art img {
  display: block;
  width: min(100%, 690px);
  height: clamp(335px, 40vw, 525px);
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: 55% center;
  border-radius: 0;
  animation: none !important;
  filter: saturate(.88) brightness(.81) contrast(1.05);
  -webkit-mask-image: radial-gradient(ellipse 64% 56% at 55% 50%,
                       #000 54%, rgba(0,0,0,.93) 65%, transparent 100%);
  mask-image: radial-gradient(ellipse 64% 56% at 55% 50%,
              #000 54%, rgba(0,0,0,.93) 65%, transparent 100%);
}
.hero-drawing-note {
  z-index: 2;
  right: 10%;
  color: #dae0d4;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}

/* 02 Gallery · 二次元蓝天：仅在相册目录的标题旁露出一角。
   相册卡片和内页仍然使用各自的封面，不会裁掉原图。 */
.gallery-scene-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(230px, 26vw, 350px);
  border-bottom: 1px solid var(--rule);
  padding-top: 55px;
  padding-bottom: 55px;
}
.gallery-scene-head > .page-kicker,
.gallery-scene-head > h1 { position: relative; z-index: 1; }
.gallery-scene-head .gallery-scene-photo {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  top: 0;
  right: 0;
  width: 57%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 45%;
  opacity: .68;
  filter: saturate(.74);
  -webkit-mask-image: linear-gradient(to right,transparent 0%,
                      black 35%,black 84%,transparent 100%);
  mask-image: linear-gradient(to right,transparent 0%,
              black 35%,black 84%,transparent 100%);
}
:root[data-reader="night"] .gallery-scene-head .gallery-scene-photo {
  opacity: .42;
}

/* 03 Notes & Reading · 月光信纸：真实茶道静物作为微弱纸面映影。
   图片只出现在页头，绝不铺在正文公式或代码后面。 */
.notes-page > .page-heading,
.reading-page > .reading-title {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.notes-page > .page-heading::before,
.reading-page > .reading-title::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: 44%;
  height: 100%;
  pointer-events: none;
  background: url("assets/scenes/Train.jpg") center 55% / cover no-repeat;
  opacity: .16;
  -webkit-mask-image: linear-gradient(to right, transparent 0%,
                      black 55%, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%,
              black 55%, black 88%, transparent 100%);
}
:root[data-reader="night"] .notes-page > .page-heading::before,
:root[data-reader="night"] .reading-page > .reading-title::before {
  opacity: .13;
}

/* 04 About / Projects · 雨窗与静物：直接使用实景照片。 */
.about-picture img {
  display: block;
  object-position: 53% 44%;
  filter: saturate(.74) brightness(.92);
}
.project-picture img {
  display: block;
  object-position: 49% 58%;
  filter: saturate(.86);
}

/* 05 Listen · 真实的专辑封面取代 CSS 假唱片。
   旋转仍由原 music.js 和 CSS 动画控制，播放按钮不受影响。 */
.listen-page .mika-music__disc {
  background: #203944 !important;
  border: 1px solid rgba(38,68,79,.18) !important;
  box-shadow: none !important;
}
.listen-page .mika-music__disc::before,
.listen-page .mika-music__disc::after { display: none !important; }
.listen-page .mika-music__disc img:not([hidden]) {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  border: 0 !important;
  object-fit: cover;
}
.listen-page__inner { position: relative; isolation: isolate; }
.listen-page__inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 20px;
  right: 1%;
  width: 36%;
  height: 360px;
  background: url("assets/scenes/record-atmosphere.webp") center / cover no-repeat;
  opacity: .30;
  -webkit-mask-image: radial-gradient(ellipse at 65% 48%,#000 45%,transparent 79%);
  mask-image: radial-gradient(ellipse at 65% 48%,#000 45%,transparent 79%);
}
:root[data-reader="night"] .listen-page__inner::before { opacity: .16; }

/* 06 Fragments：标题尺寸、页边距与 Notes 的 page-heading 完全共用。
   删除右侧的 '00 COLLECTED' 大数字，数量仍可在筛选器下查看。 */
.fragments-page .fragments-intro.page-heading {
  padding-top: 99px;
  padding-bottom: 62px;
  border: 0;
}
.fragments-page .fragments-intro.page-heading h1 {
  font: 600 clamp(37px, 4.8vw, 62px)/1.3 var(--serif);
  letter-spacing: .01em;
  margin: 18px 0 22px;
}
.fragments-page .fragments-intro.page-heading p {
  font-size: 14px;
  max-width: 720px;
}
.fragments-page .fragments-library {
  padding-top: 0;
}

/* 07 Mobile：保留留白和清晰正文。 */
@media (max-width: 820px) {
  .hero-art img {
    width: min(100%, 650px);
    height: auto;
    max-height: 410px;
    aspect-ratio: 15 / 10;
  }
  .gallery-scene-head .gallery-scene-photo { width: 65%; opacity: .44; }
  .listen-page__inner::before { width: 46%; opacity: .15; }
}
@media (max-width: 570px) {
  .hero-art { min-height: 185px; }
  .hero-art img { max-height: 295px; aspect-ratio: 4 / 3; }
  .gallery-scene-head {
    min-height: 230px;
    padding-top: 42px;
    padding-bottom: 37px;
  }
  .gallery-scene-head .gallery-scene-photo {
    width: 75%;
    opacity: .23;
  }
  .notes-page > .page-heading::before,
  .reading-page > .reading-title::before {
    width: 52%;
    opacity: .08;
  }
  .fragments-page .fragments-intro.page-heading {
    padding-top: 61px;
    padding-bottom: 39px;
  }
  .fragments-page .fragments-intro.page-heading h1 {
    font-size: 37px;
    line-height: 1.35;
  }
  .fragments-page .fragments-intro.page-heading p { font-size: 13px; }
  .listen-page__inner::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art img { animation: none !important; }
}

/* Projects：取消双栏图片，改成单栏文字卡片 */
.project-leading {
  display: block;
  min-height: 0;
}

.project-leading-copy {
  padding: 40px 50px;
}

.project-leading p {
  max-width: 680px;
}

@media (max-width: 570px) {
  .project-leading-copy {
    padding: 28px;
  }
}

/* Notes 专属背景，不影响文章 */
.notes-page > .page-heading::before {
  background-image: url("assets/scenes/Train.jpg");
  opacity: 0.18;
}