/* 绫波丽 × 真希波：色值、标题字体、磨砂卡片与克制的点缀。改颜色请同时改 _config.yml 的 rei_theme.colors */

@font-face {
  font-family: "ZCOOL KuaiLe";
  src: url("/fonts/zcool-kuaile/ZCOOLKuaiLe-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "LXGW WenKai GB Screen";
  src: url("/fonts/lxgw-wenkai/LXGWWenKaiGBScreen-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito/Nunito-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --rei-ice: #7EB8C9;
  --rei-ice-deep: #3D6E82;
  --rei-ice-pale: #D5E8EE;
  --rei-silver: #E8EEF2;
  --rei-white: #F5F7FA;
  --rei-accent: #C41E3A;
  --rei-nerv: #C45C26;
  --rei-text: #2A3340;
  --rei-bg: #F5F7FA;
  --rei-card-alpha: 0.72;
  --rei-mari-pink: #C9849C;
  --rei-mari-pink-deep: #8A3E5A;
  --rei-mari-green: #5E8A6C;
  --rei-mari-green-deep: #3A6B4C;
  --rei-font: "Nunito", "LXGW WenKai GB Screen", sans-serif;
  --rei-title-font: "ZCOOL KuaiLe", "站酷快乐体", var(--rei-font);
  --rei-page-wash: #D7E8EE;
  --rei-page-wash-end: #EDE4EA;
  --theme-color: var(--rei-ice);
  --font-color: var(--rei-text);
  --global-font: var(--rei-font);
}

html[data-theme="dark"] {
  --rei-bg: #0B1C2C;
  --rei-bg-deep: #06101C;
  --rei-text: #E6EDF2;
  --rei-silver: #C5D0D8;
  --rei-ice: #6AA3B5;
  --rei-mari-pink: #D4A0B0;
  --rei-mari-pink-deep: #D4A0B0;
  --rei-mari-green: #8FB89A;
  --rei-mari-green-deep: #8FB89A;
  --font-color: #E6EDF2;
  --rei-page-wash: #0B1C2C;
  --rei-page-wash-end: #06101C;
}

/* 不要给 body 铺实底，否则会盖住 z-index:-999 的 #web_bg 背景图 */
html, body {
  font-family: var(--rei-font) !important;
  letter-spacing: 0.01em;
  background-color: transparent;
}

/* 全站底：预模糊小图（art07 日 / art06 夜 / 摄影页 art04），固定铺开，不用大面积 CSS filter */
#web_bg {
  background-color: var(--rei-page-wash) !important;
  background-image: var(--rei-page-blur, var(--default-bg)) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}
html[data-theme="dark"] #web_bg {
  background-image: var(--rei-page-blur-dark, var(--darkmode-bg)) !important;
  background-color: #0B1C2C !important;
}
html.is-photo-page #web_bg {
  background-image: var(--rei-page-blur-photo, var(--rei-page-blur)) !important;
}
html.is-photo-page[data-theme="dark"] #web_bg {
  background-image: var(--rei-page-blur-photo-dark, var(--rei-page-blur-dark)) !important;
}
@media screen and (max-width: 800px) {
  #web_bg {
    background-attachment: scroll !important;
  }
}

#site-name,
#content-inner,
.layout,
#aside-content,
#article-container,
#page-header {
  font-family: var(--rei-font) !important;
}

/* 横幅遮罩（保证叠字可读）+ 顶部 NERV / 粉绿细线（纯 CSS，无官方标志） */
#page-header.full_page::before,
#page-header:not(.full_page):not(.not-top-img)::before {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  background:
    linear-gradient(90deg, var(--rei-nerv) 0 28px, transparent 28px 100%) top / 100% 2px no-repeat,
    linear-gradient(90deg,
      var(--rei-ice) 0 36px,
      var(--rei-mari-pink) 36px 48px,
      var(--rei-mari-green) 48px 60px,
      color-mix(in srgb, var(--rei-ice) 45%, transparent) 60px 100%) top 2px left 0 / 100% 3px no-repeat,
    linear-gradient(180deg, rgba(11, 28, 44, 0.22) 0%, rgba(11, 28, 44, 0.40) 48%, rgba(11, 28, 44, 0.16) 78%, transparent 100%);
  opacity: 1;
  pointer-events: none;
  z-index: 2;
}
/* 全站强制夜间：去掉日夜切换入口；横幅白波浪改为下面的渐变过渡 */
#nightmode-button,
#nav .sun_moon,
#rightside a.icon-V[onclick*="switchNightMode"],
#rightMenu a[href="javascript:switchNightMode();"],
.main-hero-waves-area,
.waves-area {
  display: none !important;
}

/* 横幅底部渐变接到内容区底色：日间冰蓝→淡粉，夜间 #0B1C2C */
#page-header.full_page::after,
#page-header:not(.full_page):not(.not-top-img)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48%;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--rei-page-wash) 0%, transparent) 0%,
    color-mix(in srgb, var(--rei-page-wash) 55%, transparent) 55%,
    var(--rei-page-wash) 100%
  );
  pointer-events: none;
  z-index: 3;
}
#page-header #nav,
#page-header #site-info,
#page-header #page-site-info,
#page-header #scroll-down,
#page-header .post-info {
  position: relative;
  z-index: 5;
}
#page-header.full_page #site-info,
#page-header #scroll-down {
  position: absolute;
  z-index: 5;
}

/* 半透明磨砂卡片，多留白 */
#aside-content .card-widget,
#recent-posts > .recent-post-item,
#page,
#post,
.layout > div:not(#aside-content) > div,
.photo-page-lead,
.rei-song-placeholder,
.aplayer {
  background: color-mix(in srgb, var(--rei-white) calc(var(--rei-card-alpha) * 100%), transparent) !important;
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid color-mix(in srgb, var(--rei-ice) 28%, transparent);
  box-shadow: 0 8px 28px rgba(20, 40, 60, 0.06) !important;
}
html[data-theme="dark"] #aside-content .card-widget,
html[data-theme="dark"] #recent-posts > .recent-post-item,
html[data-theme="dark"] #page,
html[data-theme="dark"] #post,
html[data-theme="dark"] div#page,
html[data-theme="dark"] div#post,
html[data-theme="dark"] div#archive,
html[data-theme="dark"] .layout > div:not(#aside-content) > div,
html[data-theme="dark"] #article-container,
html[data-theme="dark"] .photo-page-lead,
html[data-theme="dark"] .photo-group,
html[data-theme="dark"] .photo-empty,
html[data-theme="dark"] .ft-links-empty,
html[data-theme="dark"] .rei-song-placeholder,
html[data-theme="dark"] .aplayer {
  background: color-mix(in srgb, #0B1C2C calc(var(--rei-card-alpha, 0.72) * 100%), transparent) !important;
  border-color: color-mix(in srgb, var(--rei-ice) 22%, transparent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28) !important;
  color: var(--rei-text, #E6EDF2);
}

/* 文章版权卡、分享栏：夜间改成与卡片一致的深色毛玻璃，盖掉主题里写死的浅色渐变 */
html[data-theme="dark"] #post .post-copyright,
html[data-theme="dark"] #post .tag_share,
html[data-theme="dark"] #post .post_share,
html[data-theme="dark"] #post .social-share {
  background: color-mix(in srgb, #0B1C2C 72%, transparent) !important;
  border-color: color-mix(in srgb, var(--rei-ice) 22%, transparent) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28) !important;
  color: var(--rei-text, #E6EDF2) !important;
  text-shadow: none !important;
  animation: none !important;
}
html[data-theme="dark"] #post .post-copyright .post-copyright-meta,
html[data-theme="dark"] #post .post-copyright .post-copyright-info,
html[data-theme="dark"] #post .post-copyright .post-copyright-info a,
html[data-theme="dark"] #post .post-copyright .post-copyright-cc-info,
html[data-theme="dark"] #post .post-copyright .post-copyright-cc-info a,
html[data-theme="dark"] #post .post-copyright__title,
html[data-theme="dark"] #post .post-copyright__notice {
  color: var(--rei-text, #E6EDF2) !important;
}
html[data-theme="dark"] #post .post-copyright:before {
  color: color-mix(in srgb, var(--rei-ice) 40%, #8aa0ad) !important;
  opacity: 0.18;
}
html[data-theme="dark"] #post .tag_share .post-meta__tags,
html[data-theme="dark"] #post .social-share .social-share-icon {
  border-color: color-mix(in srgb, var(--rei-ice) 40%, transparent) !important;
  color: var(--rei-silver, #C5D0D8) !important;
  background: transparent !important;
}

#recent-posts > .recent-post-item,
#aside-content .card-widget,
#page,
#post {
  border-radius: 6px;
}

/* 首页单曲占位 / 播放器 */
.rei-song-placeholder,
.rei-home-song {
  margin: 0 0 1.2rem;
  padding: 1.15rem 1.3rem 1.2rem;
  border-radius: 6px;
  border-top: 2px solid var(--rei-accent);
}
.rei-song-placeholder {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 88px;
  opacity: 0.92;
}
.rei-song-placeholder__mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--rei-ice) 50%, transparent);
  position: relative;
}
.rei-song-placeholder__mark::after {
  content: "";
  position: absolute;
  left: 17px; top: 13px;
  border-style: solid;
  border-width: 9px 0 9px 14px;
  border-color: transparent transparent transparent var(--rei-accent);
  opacity: 0.85;
}
.rei-song-placeholder__title {
  margin: 0 0 .2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--rei-text);
  letter-spacing: 0.08em;
}
.rei-song-placeholder__meta {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.7;
}

/* APlayer：冰蓝 + 红色点缀，不要网易云红 */
body .aplayer {
  border-radius: 6px !important;
  margin: 0 0 1.2rem !important;
}
body .aplayer .aplayer-info .aplayer-music .aplayer-title { color: var(--rei-text); }
body .aplayer .aplayer-bar-wrap .aplayer-bar .aplayer-played,
body .aplayer .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb,
body .aplayer .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {
  background: var(--rei-ice) !important;
}
body .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {
  background: color-mix(in srgb, var(--rei-ice) 35%, transparent) !important;
}
body .aplayer .aplayer-icon:hover path { fill: var(--rei-accent) !important; }

/* 链接与强调略偏冰蓝，悬停带一点红 */
#article-container a, #content-inner a { color: var(--rei-ice-deep); }
html[data-theme="dark"] #article-container a,
html[data-theme="dark"] #content-inner a { color: var(--rei-ice); }
#article-container a:hover, #content-inner a:hover { color: var(--rei-mari-pink-deep); }

/* 插画横幅上的标题：浅色字 + 深阴影，保证可读 */
#page-header:not(.not-top-img) #site-title { color: #F5F7FA; text-shadow: 0 2px 18px rgba(6,16,28,.75); }
#page-header:not(.not-top-img) #site-subtitle,
#page-header:not(.not-top-img) #subtitle { color: #E6EDF2; text-shadow: 0 1px 12px rgba(6,16,28,.65); }
html[data-theme="dark"] #page-header:not(.not-top-img) #site-title { color: #F5F7FA; text-shadow: 0 2px 18px rgba(6,16,28,.8); }
html[data-theme="dark"] #page-header:not(.not-top-img) #site-subtitle,
html[data-theme="dark"] #page-header:not(.not-top-img) #subtitle { color: #D5E8EE; }


/* 标题：站酷快乐体。导航、侧栏、页脚、正文走 --rei-font（Nunito + 霞鹜文楷） */
#site-title,
#page-name,
#content-inner h1,
#content-inner h2,
#content-inner h3,
#article-container h1,
#article-container h2,
#article-container h3,
.article-title,
.article-title-link,
#page-header h1,
#page-header .page-title {
  font-family: var(--rei-title-font) !important;
  font-weight: 400;
}

/* 首页大标题容器定位（保留）。
   原「细框圆眼镜（真希波）」画在 #site-info::before，居中后正好落在
   「装杯大王的小窝」的「王」字上方，看起来像字形的一部分。2026-11-12 去掉。 */
#page-header.full_page #site-info {
  position: absolute;
  z-index: 5;
}
#page-header.full_page #site-info::before {
  content: none !important;
  display: none !important;
}

/* 原「水手领式小折线」，画在 #site-info::after，位于首页大标题和副标题下方。
   2026-11-12 按要求去掉。 */
#page-header.full_page #site-info::after {
  content: none !important;
  display: none !important;
}

/* 卡片一角极淡的格纹，不抢内容 */
#aside-content .card-widget,
#recent-posts > .recent-post-item,
.rei-song-placeholder {
  background-image:
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--rei-mari-pink) 14%, transparent) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--rei-mari-green) 12%, transparent) 0 1px, transparent 1px 9px);
  background-size: 48px 48px;
  background-repeat: no-repeat;
  background-position: right top;
}

/* 单曲占位卡顶边：红 + 粉绿细线，呼应 8 号机 */
.rei-song-placeholder,
.rei-home-song {
  border-top: 2px solid var(--rei-accent);
  box-shadow: inset 0 3px 0 color-mix(in srgb, var(--rei-mari-pink) 55%, transparent),
              0 8px 28px rgba(20, 40, 60, 0.06) !important;
}


/* ---------- 用户插画：横幅、封面裁切、页脚/404 平铺、关于页立绘 ---------- */
#page-header.full_page {
  background-image:
    linear-gradient(180deg, rgba(11, 28, 44, 0.08) 0%, rgba(11, 28, 44, 0.08) 100%),
    var(--rei-hero) !important;
  background-size: cover, cover !important;
  background-position: center, var(--rei-hero-pos, center 46%) !important;
  background-repeat: no-repeat !important;
}
html[data-theme="dark"] #page-header.full_page {
  background-image:
    linear-gradient(180deg, rgba(6, 16, 28, 0.12) 0%, rgba(6, 16, 28, 0.12) 100%),
    var(--rei-hero-dark, var(--rei-hero)) !important;
  background-position: center, var(--rei-hero-dark-pos, center 28%) !important;
}

/* 摄影页横幅：竖图 art04，偏右上保留人物头部 */
#page-header.is-photo-banner {
  background-image:
    linear-gradient(180deg, rgba(11, 28, 44, 0.08), rgba(11, 28, 44, 0.08)),
    var(--rei-photo-banner) !important;
  background-size: cover, cover !important;
  background-position: center, var(--rei-photo-banner-pos, 62% 30%) !important;
  background-repeat: no-repeat !important;
}

/* 文章页竖图封面做横幅时，背景定位偏上，避免切到头 */
#page-header.post-bg {
  background-size: cover !important;
  background-position: center 22% !important;
}

/* 首页/列表封面：竖图同样偏上 */
.recent-post-item .post_cover img,
#recent-posts .post_bg,
.card-widget img,
.article-cover img {
  object-position: center 18%;
}

#footer {
  background-color: #0B1C2C !important;
  background-image:
    linear-gradient(180deg, rgba(11, 28, 44, 0.78) 0%, rgba(6, 16, 28, 0.86) 100%),
    var(--rei-footer-tile) !important;
  background-size: auto, 280px auto !important;
  background-repeat: repeat !important;
  background-position: center, 0 0 !important;
}
html[data-theme="dark"] #footer {
  background-image:
    linear-gradient(180deg, rgba(6, 16, 28, 0.78) 0%, rgba(6, 16, 28, 0.90) 100%),
    var(--rei-footer-tile-dark, var(--rei-footer-tile)) !important;
}
#footer:before {
  background-color: transparent !important;
}

.error404,
#body-wrap.error404 {
  background-color: #0B1C2C;
  background-image:
    linear-gradient(180deg, rgba(11, 28, 44, 0.72), rgba(6, 16, 28, 0.84)),
    var(--rei-footer-tile);
  background-size: auto, 280px auto;
  background-repeat: repeat;
}
html[data-theme="dark"] .error404,
html[data-theme="dark"] #body-wrap.error404 {
  background-image:
    linear-gradient(180deg, rgba(6, 16, 28, 0.72), rgba(6, 16, 28, 0.88)),
    var(--rei-footer-tile-dark, var(--rei-footer-tile));
}
.error404 .error-content,
.error404 .error-info,
.error404 .error_title,
.error404 .error_subtitle {
  color: #E6EDF2;
  text-shadow: 0 1px 12px rgba(6, 16, 28, 0.7);
}

.about-standee {
  margin: 0 auto 1.6rem;
  max-width: 360px;
  text-align: center;
}
.about-standee img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  background: #eceaea;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--rei-ice) 28%, transparent);
  box-shadow: 0 8px 28px rgba(20, 40, 60, 0.08);
}
.ab2-avatar {
  padding: 0 !important;
  overflow: hidden;
  background: #fff !important;
}
.ab2-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* 侧栏歌卡：与其他侧栏卡片同一套深色毛玻璃，窄屏随侧栏排在文章列表之后 */
#aside-content .card-song,
#aside-content .rei-song-placeholder,
#aside-content .rei-home-song {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 20px;
  margin-bottom: 0;
  padding: 20px 24px;
  min-height: 0;
  box-sizing: border-box;
  border-top-color: color-mix(in srgb, var(--rei-ice) 22%, transparent);
  box-shadow: 0 8px 28px rgba(20, 40, 60, 0.06) !important;
}
html[data-theme="dark"] #aside-content .card-song,
html[data-theme="dark"] #aside-content .rei-song-placeholder,
html[data-theme="dark"] #aside-content .rei-home-song {
  background: color-mix(in srgb, #0B1C2C 72%, transparent) !important;
  border-color: color-mix(in srgb, var(--rei-ice) 22%, transparent) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28) !important;
  color: var(--rei-text, #E6EDF2);
}
#aside-content .rei-song-placeholder__title {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* 作者卡名字上的「马克笔 / 午夜玻璃条」画在 .author-info__name::before。
   名字本身是 position:static，绝对定位参照到了 position:relative 的 .author_top，
   于是这条带边框和底色的长条被拉成整卡宽度，正好落在简介
   「装杯大王的小窝 · 二次元摄影」外面。按要求去掉框，只留文字；名字也不再带条。 */
#aside-content > .card-widget.card-info .author-info__name::before,
[data-theme="dark"] #aside-content > .card-widget.card-info .author-info__name::before {
  content: none !important;
  display: none !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* 播放器始终撑满所在歌卡内宽。原先只写在 max-width:900px 里；
   侧栏堆叠断点也是 900px，672 会命中，但把 width:100% 提到查询外，
   避免个别平板视口或缓存旧规则时再缩回固有宽度。桌面侧栏内宽约 280px，
   100% 仍是满卡，观感与改前一致。封面等比放大仍只在窄屏生效。 */
#aside-content .card-song #rei-aplayer,
#aside-content .rei-home-song #rei-aplayer,
#aside-content .card-song .aplayer,
#aside-content .rei-home-song .aplayer {
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  margin-bottom: 0 !important;
}

@media screen and (max-width: 900px) {
  #recent-posts > #rei-home-song,
  #recent-posts > .rei-song-placeholder,
  #recent-posts > .rei-home-song {
    display: none !important;
  }

  /* 窄屏：封面按约 30%（与桌面侧栏 84/280 的比例一致）等比放大，进度条随剩余宽度伸展。 */
  #aside-content .card-song .aplayer .aplayer-body,
  #aside-content .rei-home-song .aplayer .aplayer-body {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }
  #aside-content .card-song .aplayer .aplayer-pic,
  #aside-content .rei-home-song .aplayer .aplayer-pic {
    float: none;
    flex: 0 0 30%;
    width: 30%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  #aside-content .card-song .aplayer .aplayer-info,
  #aside-content .rei-home-song .aplayer .aplayer-info {
    float: none;
    flex: 1 1 auto;
    margin-left: 0;
    height: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
  }
  #aside-content .card-song .aplayer .aplayer-info .aplayer-music,
  #aside-content .rei-home-song .aplayer .aplayer-info .aplayer-music {
    margin-bottom: 8px;
  }
}

/* 页脚格言语录：约 8 秒淡入淡出；减少动效时只换句，不做动画 */
#footer-quote .footer-quote__line {
  margin: 0;
  transition: opacity 0.55s ease;
}
#footer-quote.is-fading .footer-quote__line {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  #footer-quote .footer-quote__line {
    transition: none;
  }
}
