/* ============================================================
   守叶的博客 —— 「三日间的幸福」× Firefly(Fuwari) 布局
   布局：图标导航栏 + 左侧组件栏 + 右主列卡片 + 右侧悬浮（设置球/唱片）
   氛围：明亮蓝天 / 巨大积雨云 / 淡淡忧郁与透明感
   ============================================================ */

/* ---------- 基础与排版（--glass-alpha / --pain-red / 字号均可运行时调节） ---------- */

:root {
  --ink: #2c3e50;                    /* 正文主色：冷调蓝灰 */
  --ink-soft: rgba(44, 62, 80, 0.6); /* 次要文字 */
  --pain-red: hsl(6 68% 55%);        /* 强调色「疼痛红」，色相可通过设置球调节 */
  --hue: 6;                          /* 当前色相数值（设置球写入）。任何想跟着色相走的颜色，
                                        写成 hsl(var(--hue) 饱和度 亮度) 即可 —— 首页 hero 文案就是这么做的 */
  --glass-alpha: 0.5;                /* 卡片背景透明度（设置球可调） */
  --glass-bg: rgb(255 255 255 / var(--glass-alpha));
  --glass-bg-hover: rgb(255 255 255 / calc(var(--glass-alpha) + 0.1));
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
  --radius: 12px;
  --serif: 'Noto Serif SC', serif;
  --sans: 'Noto Sans SC', sans-serif;
  --body-font: 'Noto Serif SC', serif;
  --navbar-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* hidden 属性优先级兜底：防止组件样式里的 display 使隐藏失效 */
[hidden] {
  display: none !important;
}

html {
  font-size: 20px;
}

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 2.2;
  letter-spacing: 0.5px;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
}

button {
  font-family: inherit;
  cursor: pointer;
}

.nav-icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
}

/* ---------- 背景系统：每页一张专属背景（图片 / 视频动态壁纸） ---------- */

.bg-single,
.bg-video {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  animation: bgFadeIn 1.6s ease-out;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 兜底色：视频首帧解码出来之前（或视频加载失败时）这里是一片透明，
     会直接露出浏览器白底；而首页封面底部是羽化透明的，白底会透出来很难看。
     填一层与主题同调的淡天色，任何时候都不会露白。 */
  background-color: #a8c2d6;
  /* 注意：不强制提升合成层（will-change/translateZ），部分显卡驱动下
     全屏视频 + 强制合成层是已知的 GPU 渲染崩溃诱因；视频已压缩至 1.2Mbps，
     交给浏览器默认合成策略即可 */
}

@keyframes bgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 轻薄遮罩：只压一层极淡蓝灰，让壁纸透出来 */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(44, 62, 80, 0.10), rgba(44, 62, 80, 0.22));
  pointer-events: none;
}

@media (max-width: 768px) {
  .bg-single { background-attachment: scroll; }
}

/* ---------- 入场动效 ---------- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  opacity: 0;
  animation: fadeInUp 1.2s ease-out forwards;
}

.post-list .post-card:nth-child(1) { animation-delay: 0.15s; }
.post-list .post-card:nth-child(2) { animation-delay: 0.30s; }
.post-list .post-card:nth-child(3) { animation-delay: 0.45s; }
.post-list .post-card:nth-child(4) { animation-delay: 0.60s; }
.post-list .post-card:nth-child(5) { animation-delay: 0.75s; }
.post-list .post-card:nth-child(n+6) { animation-delay: 0.90s; }

/* ---------- 通用毛玻璃（清晰度优化：低模糊 + 可控透明度） ---------- */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* 视频壁纸页：backdrop-filter 对动态画面每帧重采样是 Edge 卡顿主因，
   视频页把模糊半径减半并关闭饱和通道，滚动流畅度显著提升 */
.has-video-bg .glass {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* 屏外卡片跳过渲染，改善长列表滚动 */
.post-card,
.article-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}

/* ---------- 首页信笺封面：整块随滚动淡出（底部保持不透明） ---------- */

/* 这里刻意不再给封面底部做「羽化透明」。
   之前用 mask-image 把海报底边化进后面的动态壁纸，结果是底部那条带子会
   一直透出后面流动的下雪画面，跟静止的信笺凑在一起非常突兀。
   现在的做法是「整块一起淡」：封面作为一个整体，透明度和滚动位置挂钩，
   从 1 一路降到 0（淡出曲线在 assets/js/main.js 的「封面淡出」模块里）。
   于是底色与文字同步退场，不会有「一部分已经透明、一部分还很实」的割裂感。

   ★ 微调入口：淡出快慢在 main.js 的 COVER_FADE_END（默认滚过 0.8 屏时全透明）。 */

/* 注意选择器必须写成 .layout.layout-below-cover（两个类，特异性 0-2-0）：
   .layout 的 padding 简写在文件更后面（主布局那一节），
   同特异性下后写的赢，只用 .layout-below-cover 会被那条简写整个覆盖掉，
   padding-top 永远停在 32px —— 这就是「改了数值一点变化都没有」的真凶。 */
.layout.layout-below-cover {
  /* 封面是流内元素（占文档第一屏），滚完封面正文自然接上，无需 margin 补偿 */
  /* ★ 微调入口：末尾数值 = 导航条底部到「守叶的博客」大标题（hero）之间的留白。
     推荐 20~120：太小会贴着导航条；太大（>300）会显得空旷 */
  padding-top: calc(var(--navbar-h) + 30px);
}

/* 封面与正文之间不再放空白占位区：封面淡出的同时正文就顶上来，中间不夹空气。
   如果哪天想重新留一口气，把下面这行注释打开即可（纯占位，不影响其它逻辑）：
     .cover-gap { height: 40vh; } */

.site-cover {
  /* 流内全屏海报：随页面 1:1 滚走（不用 fixed + margin-top:100vh 那种「空白带」方案）。
     整块不透明度由 JS 按滚动位置写进 element.style.opacity，
     见 main.js 的「封面淡出」模块（★ COVER_FADE_END 控制快慢）。 */
  position: relative;
  width: 100%;
  height: 100vh;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 淡透之后不再拦截鼠标：否则这块 100vh 的透明区域会压住已经滚上来的内容 */
.site-cover.cover-faded {
  pointer-events: none;
}

/* 封面背景：略微模糊（放大 1.02 防止模糊露边）；图片由模板内联注入 */
.site-cover-bg {
  position: absolute;
  inset: -3%;
  background-size: cover;
  background-position: center;
  filter: blur(3px) saturate(1.05);
  transform: scale(1.02);
}

/* 薄薄一层暗色，衬托文字 */
.site-cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(30, 42, 56, 0.30),
    rgba(30, 42, 56, 0.42));
}

/* 封面背景：略微模糊（放大 1.02 防止模糊露边）；图片由模板内联注入。
   注意这里不再挂任何 mask：底边必须保持实心，淡出交给整块的 opacity。 */
.site-cover-bg {
  position: absolute;
  inset: -3%;
  background-size: cover;
  background-position: center;
  filter: blur(3px) saturate(1.05);
  transform: scale(1.02);
}

/* 薄薄一层暗色，衬托文字 */
.site-cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(30, 42, 56, 0.30),
    rgba(30, 42, 56, 0.42));
}

.site-cover-letter {
  position: relative;
  max-width: 660px;
  padding: 0 32px;
  text-align: center;
  animation: coverQuoteIn 2.2s ease-out both;
}

/* 信头：像一封信的开场 */
.cover-letterhead {
  margin: 0 0 38px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 14px;
  text-indent: 14px; /* 视觉补偿末字距 */
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 12px rgba(20, 30, 42, 0.6);
}

.cover-letterhead::after {
  content: "";
  display: block;
  width: 6.5em; /* 约六个字长，随字号缩放 */
  height: 1px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.site-cover-quote {
  margin: 0;
  text-align: justify;
  text-align-last: center; /* 末行居中，与 cite 呼应 */
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 2px 18px rgba(20, 30, 42, 0.55);
}

/* 楷体信笺：优先系统楷体，缺失时回落衬线 */
.site-cover-quote p {
  margin: 0 0 32px;
  font-family: 'KaiTi', '楷体', STKaiti, 'Noto Serif SC', serif;
  font-size: 1.32rem;
  line-height: 2.7;
  letter-spacing: 2.5px;
  text-indent: 2em; /* 书信首行缩进 */
}

/* 段首装饰引号（疼痛红点缀） */
.site-cover-quote p::before {
  content: "「";
  color: var(--pain-red);
  margin-right: 2px;
  text-shadow: 0 1px 10px rgba(20, 30, 42, 0.5);
}

/* 段尾呼应的闭引号 */
.site-cover-quote p::after {
  content: "」";
  color: var(--pain-red);
  margin-left: 2px;
  text-shadow: 0 1px 10px rgba(20, 30, 42, 0.5);
}

.site-cover-quote cite {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.78);
  /* 落款位于羽化区，往下滑时背后会换成明亮的壁纸，需要一点阴影兜住可读性 */
  text-shadow: 0 1px 12px rgba(20, 30, 42, 0.65);
}

.site-cover-quote cite::before,
.site-cover-quote cite::after {
  content: "";
  width: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

@keyframes coverQuoteIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 下拉提示：一根细竖线 + 一枚轻轻下坠的小箭头，不放文字、不加底板。
   主题是「日系极简 + 疼痛」，一个圆角胶囊按钮压上去确实突兀；
   改成一条从虚到实的线，暗示「页面还有下文」，跟信笺的竖排感也呼应。
   因为封面底部会羽化透出明亮壁纸，线本身用 drop-shadow 兜住可见度。 */
.site-cover-hint {
  position: absolute;
  bottom: clamp(20px, 4vh, 44px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  padding: 6px 18px 4px;
  color: rgba(255, 255, 255, 0.92);
  /* 双圈投影给这条 1px 细线兜底：它正好落在羽化透明的区域上，
     背后是会动的明亮壁纸，白线不加暗晕会直接消失 */
  filter: drop-shadow(0 0 2px rgba(20, 30, 42, 0.85)) drop-shadow(0 2px 9px rgba(20, 30, 42, 0.65));
  transition: color 0.35s ease, transform 0.35s ease;
}

/* 竖线：上端几乎隐去，向下渐渐凝实，像一笔落下的墨 */
.site-cover-hint::before {
  content: "";
  width: 2px;
  height: clamp(30px, 6vh, 56px);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 45%,
    rgba(255, 255, 255, 0.95) 100%);
}

/* 文字保留在 DOM 里（无障碍/SEO），视觉上隐去 */
.site-cover-hint span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-cover-hint:hover {
  color: #fff;
  /* 悬停时整体往下探一点，暗示「还有下文」 */
  transform: translateX(-50%) translateY(4px);
}

.site-cover-hint .nav-icon {
  width: 0.95em;
  height: 0.95em;
  animation: coverHintDrop 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes coverHintDrop {
  0%, 100% { transform: translateY(-3px); opacity: 0.45; }
  50%      { transform: translateY(4px);  opacity: 1; }
}

@media (max-width: 640px) {
  .site-cover-letter { max-width: 88vw; }
  .site-cover-quote p { font-size: 1.08rem; line-height: 2.4; letter-spacing: 1.5px; }
  .cover-letterhead { font-size: 0.8rem; letter-spacing: 10px; text-indent: 10px; }
}

/* ---------- 首页 hero：滑动浮现（JS 读滚动位置驱动，两种模式） ----------

   两种模式，由 main.js 里一个开关 HERO_SPLIT 切换，CSS 这边只是两套样式：

   ① 丝滑模式（默认，HERO_SPLIT = false）
      整块当成一个元素：透明度 + 上浮一起连续变化，中途没有任何卡点。
      观感等同于之前那版 animation-timeline: view()，区别是进度由 JS 算，
      可以读出来验证（那版跑在合成器上，永远读不到真实进度）。

   ② 分层模式（HERO_SPLIT = true）
      标题 → 引言 → 副题依次浮现，各读自己的变量。
      层次更清楚，但中间态会出现「标题已经清楚了、引言还虚着」的割裂感，
      不够「整块丝滑」——这就是为什么默认关掉。

   两种模式都只是「读」滚动位置来算透明度，不接管滚轮、不吸附、不改滚动速度，
   手感和原生滚动完全一致（和被否掉的 scroll-snap 有本质区别）。

   ★ 想调「浮得快慢」：main.js 里 paintHero 的 from / to
   ★ 想调「浮起多少距离」：本文件下面的 30px（丝滑）/ 26·20·14px（分层）

   兜底：只有 JS 真跑起来才会给 .hero 加 .hero-reveal；
   脚本被禁用、报错、或用户开了「减少动态效果」时都不加，
   文案就是满不透明满位移——绝不会因为动画停在起始帧而消失。 */
.hero.hero-reveal {
  /* 容器自己的「加载即播」入场动画关掉，浮现完全交给 JS 变量。
     ⚠️ 下面这句 opacity 不是冗余，是必须的：
     .fade-in-up 的基础样式就是 opacity: 0（靠 animation 的 forwards 才升到 1），
     一旦 animation: none 把动画关掉，元素就永久停在 0——子元素哪怕全不透明，
     整体看上去还是一片空白。这个坑实测踩过：变量读到 1.0000，画面却什么都没有。 */
  animation: none;
  opacity: var(--hp-title, 1);
  transform: translateY(calc((1 - var(--hp-title, 1)) * 30px));
  will-change: opacity, transform;
}

/* ---- 分层模式：加 .hero-split 后容器交还给子元素，三段各走各的 ---- */
.hero.hero-reveal.hero-split {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.hero.hero-reveal.hero-split .hero-title,
.hero.hero-reveal.hero-split .hero-quote,
.hero.hero-reveal.hero-split .hero-sub {
  will-change: opacity, transform;
}

.hero.hero-reveal.hero-split .hero-title {
  opacity: var(--hp-title, 1);
  transform: translateY(calc((1 - var(--hp-title, 1)) * 26px));
}

.hero.hero-reveal.hero-split .hero-quote {
  opacity: var(--hp-quote, 1);
  transform: translateY(calc((1 - var(--hp-quote, 1)) * 20px));
}

.hero.hero-reveal.hero-split .hero-sub {
  opacity: var(--hp-sub, 1);
  transform: translateY(calc((1 - var(--hp-sub, 1)) * 14px));
}

/* 落定后收掉 will-change，别让它长期占着合成层 */
.hero.hero-reveal.hero-reveal-done,
.hero.hero-reveal.hero-reveal-done .hero-title,
.hero.hero-reveal.hero-reveal-done .hero-quote,
.hero.hero-reveal.hero-reveal-done .hero-sub {
  will-change: auto;
}

/* 首页「跳正文」落点补偿：让 #hero 停在导航条下方一点，而不是被导航条压住 */
.hero {
  scroll-margin-top: calc(var(--navbar-h) + 12px);
}

/* ---------- 顶部导航栏（Firefly 式：图标 + 文字 + 下拉菜单） ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.navbar-inner {
  max-width: 1120px;
  height: var(--navbar-h);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.4s ease;
  white-space: nowrap;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pain-red);
  box-shadow: 0 0 10px color-mix(in srgb, var(--pain-red) 60%, transparent);
}

.nav-brand:hover {
  color: var(--pain-red);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar { display: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 1px;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.4s ease, background 0.4s ease;
}

.nav-link:hover {
  color: var(--pain-red);
  background: rgba(255, 255, 255, 0.55);
}

.nav-link.active {
  color: var(--pain-red);
  background: rgba(255, 255, 255, 0.6);
}

/* 下拉菜单 */
.nav-dropdown {
  position: relative;
}

.nav-chevron {
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-chevron,
.nav-dropdown:focus-within .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 160px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-dropdown-item:hover {
  background: color-mix(in srgb, var(--pain-red) 8%, transparent);
  color: var(--pain-red);
}

/* 导航右侧功能按钮 */
.nav-actions {
  display: flex;
  gap: 4px;
}

.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--ink-soft);
  transition: color 0.4s ease, background 0.4s ease;
}

.nav-action:hover {
  color: var(--pain-red);
  background: rgba(255, 255, 255, 0.55);
}

.nav-action.playing {
  color: var(--pain-red);
  animation: musicPulse 1.6s ease-in-out infinite;
}

/* 静音态：在原图标上叠一条 \ 方向斜杠（左上 → 右下），疼痛红 */
.nav-action.muted {
  position: relative;
  animation: none;
}

.nav-action.muted::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  top: 50%;
  border-top: 2px solid var(--pain-red);
  transform: rotate(45deg);   /* 横线顺时针转 45° = \ 方向 */
  pointer-events: none;
}

/* 唱片封面禁止被原生拖拽（长按拖动由 JS 接管） */
.vinyl-disc img {
  -webkit-user-drag: none;
  user-select: none;
}

/* 自动播放被浏览器拦截时的提示脉动（等待首次交互） */
.nav-action.wants-play {
  color: var(--pain-red);
  animation: musicPulse 1.2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* 搜索面板 */
.search-panel {
  position: absolute;
  top: calc(var(--navbar-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

#searchInput {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(44, 62, 80, 0.15);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease;
}

#searchInput:focus {
  border-color: color-mix(in srgb, var(--pain-red) 50%, transparent);
}

.search-results {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.search-results li a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.search-results li a:hover {
  background: color-mix(in srgb, var(--pain-red) 7%, transparent);
}

.sr-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}

.sr-date {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

.sr-summary {
  font-size: 0.8rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- 主布局：左栏 + 右主列 ---------- */

.layout {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* ---------- 左侧边栏 ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--navbar-h) + 24px);
}

.side-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.side-card-head h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 2px;
  flex: 1;
}

.side-card-icon {
  color: var(--pain-red);
  opacity: 0.75;
}

/* 个人资料卡片 */
.profile-card {
  padding: 32px 24px 24px;
  text-align: center;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.15);
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.85), rgba(74, 104, 135, 0.75));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s ease;
}

.profile-avatar:hover {
  transform: rotate(360deg);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar span {
  font-family: var(--serif);
  font-size: 2rem;
  color: #fff;
  letter-spacing: 0;
}

.profile-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: 3px;
}

.profile-bio {
  margin: 0 0 16px;
  font-size: 0.8rem;
  line-height: 2;
  color: var(--ink-soft);
}

.profile-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.profile-links a:hover {
  color: var(--pain-red);
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(44, 62, 80, 0.1);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
}

.stat-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--ink-soft);
}

/* 公告卡片 */
.announce-card {
  padding: 18px 20px;
}

.announce-close {
  display: inline-flex;
  border: none;
  background: none;
  padding: 4px;
  border-radius: 6px;
  color: var(--ink-soft);
  transition: color 0.3s ease, background 0.3s ease;
}

.announce-close:hover {
  color: var(--pain-red);
  background: color-mix(in srgb, var(--pain-red) 8%, transparent);
}

.announce-content {
  margin: 0 0 10px;
  font-size: 0.85rem;
  line-height: 2;
  color: var(--ink-soft);
}

.announce-link {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 62, 80, 0.25);
  padding-bottom: 1px;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.announce-link:hover {
  color: var(--pain-red);
  border-bottom-color: var(--pain-red);
}

/* 音乐播放器卡片 */
.music-card {
  padding: 18px 20px;
}

.music-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.music-cover {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.8), rgba(74, 104, 135, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}

.music-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-cover .nav-icon {
  width: 1.4em;
  height: 1.4em;
}

.music-info {
  min-width: 0;
}

.music-name {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(44, 62, 80, 0.12);
  cursor: pointer;
  margin-bottom: 10px;
}

.music-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--pain-red);
  transition: width 0.2s linear;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.music-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--ink-soft);
  padding: 6px;
  border-radius: 50%;
  transition: color 0.3s ease, background 0.3s ease;
}

.music-controls button:hover {
  color: var(--pain-red);
  background: color-mix(in srgb, var(--pain-red) 8%, transparent);
}

.music-play {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--ink) !important;
}

.music-play:hover {
  color: var(--pain-red) !important;
  background: rgba(255, 255, 255, 0.85) !important;
}

.music-hint {
  animation: hintShake 0.5s ease;
}

@keyframes hintShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}

/* 标签云卡片 */
.tags-card {
  padding: 18px 20px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.tag-chip:hover {
  color: var(--pain-red);
  background: color-mix(in srgb, var(--pain-red) 8%, transparent);
  border-color: color-mix(in srgb, var(--pain-red) 30%, transparent);
}

/* 站点统计卡片 */
.stats-card {
  padding: 18px 20px;
}

.stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stats-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.stats-list li + li {
  border-top: 1px dashed rgba(44, 62, 80, 0.12);
}

.stats-list b {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
}

/* ---------- 主内容列 ---------- */

.site-main {
  min-width: 0; /* grid 子项防溢出 */
}

/* ---------- 首页：主视觉区 ----------

   配色跟「设置球」的色相走：三处颜色都写成 hsl(var(--hue) …)，
   --hue 由 main.js 的 applySettings 与 baseof 的防闪脚本写入。
   亮度刻意保持很高（84~94%）——这里压着深色动态壁纸，
   颜色一深沉就糊成一片；低亮度只用来染色相、不用来压暗。
   ★ 想让它更明显/更克制：调下面的饱和度（62/78/38）与亮度（92/91/84）。
     饱和↑ 更艳；亮度↓ 更深但更容易看不清。 */

.hero {
  text-align: center;
  padding: 48px 0 56px;
}

.hero-title {
  margin: 0 0 24px;
  font-size: 2.2rem;
  letter-spacing: 8px;
  color: hsl(var(--hue, 6) 72% 88%);
  text-shadow: 0 2px 20px hsl(var(--hue, 6) 34% 14% / 0.55);
}

.hero-quote {
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 2;
  letter-spacing: 2px;
  margin: 0 0 12px;
  color: hsl(var(--hue, 6) 88% 85%);
  text-shadow: 0 2px 20px hsl(var(--hue, 6) 34% 14% / 0.55);
}

.hero-sub {
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  color: hsl(var(--hue, 6) 42% 78%);
  text-shadow: 0 1px 12px hsl(var(--hue, 6) 34% 14% / 0.45);
  margin: 0;
}

/* ---------- 文章卡片 ---------- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.post-card {
  padding: 32px 36px;
  transition: all 0.5s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  background: var(--glass-bg-hover);
}

.post-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.post-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.4s ease;
}

.post-title a:hover {
  color: var(--pain-red);
}

.post-date {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.post-summary {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.read-more {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 62, 80, 0.25);
  padding-bottom: 2px;
  transition: color 0.4s ease, border-color 0.4s ease, text-shadow 0.4s ease;
}

.read-more:hover {
  color: var(--pain-red);
  border-bottom-color: var(--pain-red);
  text-shadow: 0 0 12px color-mix(in srgb, var(--pain-red) 35%, transparent);
}

.post-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  text-shadow: 0 1px 12px rgba(44, 62, 80, 0.4);
}

/* ---------- 列表页头 / 通用页面卡片 ---------- */

.list-header {
  text-align: center;
  padding: 40px 0 48px;
}

.list-title {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(44, 62, 80, 0.45);
}

.list-description {
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.page-card {
  margin-bottom: 24px;
}

/* ---------- 友链页 ---------- */

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.friend-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  text-decoration: none;
  transition: all 0.4s ease;
}

.friend-card:hover {
  transform: translateY(-4px);
  background: var(--glass-bg-hover);
}

.friend-avatar {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.8), rgba(74, 104, 135, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-avatar span {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: #fff;
}

/* 链接页：图标型头像（复用友链卡片圆形底座） */
.friend-avatar-icon {
  width: 1.7em;
  height: 1.7em;
  color: #fff;
  vertical-align: 0;
}

.friend-info h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: color 0.4s ease;
}

.friend-card:hover .friend-info h2 {
  color: var(--pain-red);
}

.friend-info p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- 留言墙 ---------- */

.gb-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.gb-form input,
.gb-form textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(44, 62, 80, 0.15);
  border-radius: 8px;
  outline: none;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.gb-form input:focus,
.gb-form textarea:focus {
  border-color: color-mix(in srgb, var(--pain-red) 50%, transparent);
}

.gb-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gb-hint {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.gb-submit {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 2px;
  padding: 8px 24px;
  border: none;
  border-radius: 8px;
  color: #fff;
  background: var(--pain-red);
  transition: filter 0.3s ease;
}

.gb-submit:hover {
  filter: brightness(1.1);
}

.gb-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gb-empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.gb-item {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  margin-bottom: 12px;
}

.gb-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.gb-meta b {
  font-family: var(--sans);
  letter-spacing: 1px;
  color: var(--pain-red);
}

.gb-meta time {
  font-family: var(--sans);
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.gb-item p {
  margin: 0;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 我的页 ---------- */

.me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.me-card {
  padding: 20px 24px;
}

.me-card h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 3px;
  color: var(--pain-red);
}

.me-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.me-card li {
  padding: 4px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.me-playlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.me-playlist li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.85rem;
}

.me-playlist li + li {
  border-top: 1px dashed rgba(44, 62, 80, 0.12);
}

.me-song {
  font-family: var(--sans);
  color: var(--ink);
}

.me-artist {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* ---------- 关于页 ---------- */

.about-stats {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(44, 62, 80, 0.12);
}

/* ---------- 正文页 ---------- */

.article-subtitle {
  margin: -6px 0 10px;
  font-size: 0.92rem;
  letter-spacing: 2px;
  color: var(--ink-soft);
}

/* 卡片副标题（首页/列表共用） */
.post-subtitle {
  margin: -4px 0 10px;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  line-height: 1.9;
  color: var(--ink-soft);
}

/* Markdown 排版辅助（shortcode 产物） */
.md-spacer {
  pointer-events: none;
}

/* 对话记录：每行独立成行，行距紧凑 */
.chat-log {
  margin: 0.5em 0 1.5em;
}
.chat-log .chat-line {
  margin: 0 0 0.5em;
  line-height: 1.7;
  letter-spacing: 0.5px;
}

.article-card {
  padding: 48px 44px;
}

.article-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(44, 62, 80, 0.12);
}

.article-title {
  margin: 0 0 12px;
  font-size: 1.6rem;
  letter-spacing: 2px;
  line-height: 1.6;
}

.article-meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 2px;
  color: var(--ink-soft);
}

.meta-sep {
  margin: 0 10px;
  opacity: 0.5;
}

/* 正文排版：大留白、大段距 */
/* body 全局行高 2.2（20px 字号 → 44px 行盒），正文单独收一档：
   1.7 → 34px 行盒，比原来少 10px */
.article-content {
  line-height: 1.7;
}

.article-content p {
  margin: 0 0 2em;
}

.article-content h2,
.article-content h3 {
  margin: 2.4em 0 1em;
  padding-left: 12px;
  border-left: 3px solid color-mix(in srgb, var(--pain-red) 35%, transparent);
  line-height: 1.6;
}

.article-content h2 { font-size: 1.3rem; }
.article-content h3 { font-size: 1.1rem; }

.article-content blockquote {
  margin: 2em 0;
  padding: 16px 20px;
  background: rgba(44, 62, 80, 0.06);
  border-left: 2px solid rgba(44, 62, 80, 0.3);
  border-radius: 0 8px 8px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content img {
  display: block;
  max-width: 100%;
  margin: 2em auto;
  border-radius: 8px;
}

.article-content a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 62, 80, 0.3);
  transition: color 0.4s ease, border-color 0.4s ease;
}

.article-content a:hover {
  color: var(--pain-red);
  border-bottom-color: var(--pain-red);
}

.article-content hr {
  border: none;
  width: 40px;
  height: 1px;
  background: rgba(44, 62, 80, 0.3);
  margin: 3em auto;
}

.article-content code {
  font-size: 0.88em;
  background: rgba(44, 62, 80, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- 上一篇 / 下一篇 ---------- */

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(44, 62, 80, 0.12);
}

.post-nav a {
  display: flex;
  flex-direction: column;
  max-width: 48%;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.4s ease;
}

.post-nav a:hover {
  color: var(--pain-red);
}

.nav-next {
  margin-left: auto;
  text-align: right;
}

.nav-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.nav-title {
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  text-align: center;
  padding: 32px 24px 40px;
}

.site-footer p {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 8px rgba(44, 62, 80, 0.35);
}

/* ---------- 右侧悬浮：设置球 ---------- */

.display-ball {
  position: fixed;
  top: calc(var(--navbar-h) + 24px);
  right: 22px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: grab; /* 可拖动 */
  user-select: none;
  -webkit-user-select: none;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.4s ease, transform 0.4s ease;
}

.display-ball:hover {
  color: var(--pain-red);
  transform: rotate(45deg);
}

.display-panel {
  position: fixed;
  top: calc(var(--navbar-h) + 80px);
  right: 22px;
  z-index: 91;
  width: 240px;
  padding: 18px 20px;
}

.dp-item {
  margin-bottom: 14px;
}

.dp-item label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.dp-btns {
  display: flex;
  gap: 8px;
}

.dp-btn {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 6px 0;
  border: 1px solid rgba(44, 62, 80, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  transition: all 0.3s ease;
}

.dp-btn.dp-active {
  color: var(--pain-red);
  border-color: color-mix(in srgb, var(--pain-red) 50%, transparent);
  background: color-mix(in srgb, var(--pain-red) 8%, transparent);
}

.dp-item input[type="range"] {
  width: 100%;
  accent-color: var(--pain-red);
}

.dp-reset {
  width: 100%;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 2px;
  padding: 7px 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink-soft);
  transition: all 0.3s ease;
}

.dp-reset:hover {
  color: var(--pain-red);
  background: color-mix(in srgb, var(--pain-red) 8%, transparent);
}

/* ---------- 右侧悬浮：唱片播放器 ---------- */

.vinyl-widget {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  cursor: grab; /* 可拖动 */
  user-select: none;
  -webkit-user-select: none;
}

.display-ball:active,
.vinyl-widget:active {
  cursor: grabbing;
}

.vinyl-disc {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background:
    radial-gradient(circle at center, #3a3a3a 0 18%, transparent 18%),
    repeating-radial-gradient(circle at center, #2a2a2a 0 2px, #353535 2px 4px);
  box-shadow: 0 6px 24px rgba(44, 62, 80, 0.3);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.vinyl-disc:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(44, 62, 80, 0.4);
}

.vinyl-disc img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.vinyl-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
}

.vinyl-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-bg);
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: inset 0 0 3px rgba(44, 62, 80, 0.5);
}

.vinyl-disc.spinning {
  animation: vinylSpin 8s linear infinite;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 唱片控制面板：绝对定位悬浮在碟片上方，不参与 widget 的 flex 布局——
   保证开/关面板时容器尺寸恒等于碟片尺寸，坐标永不漂移 */
.vinyl-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: flex;
  gap: 14px;
  width: 330px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 16px 18px;
}

.vinyl-cover {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.8), rgba(74, 104, 135, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}

.vinyl-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vinyl-info {
  flex: 1;
  min-width: 0;
}

.vinyl-name {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vinyl-artist {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vinyl-progress {
  height: 4px;
  border-radius: 2px;
  background: rgba(44, 62, 80, 0.12);
  cursor: pointer;
  margin-bottom: 10px;
}

.vinyl-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--pain-red);
  transition: width 0.2s linear;
}

.vinyl-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.vinyl-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--ink-soft);
  padding: 4px;
  border-radius: 50%;
  transition: color 0.3s ease, background 0.3s ease;
}

.vinyl-controls button:hover {
  color: var(--pain-red);
  background: color-mix(in srgb, var(--pain-red) 8%, transparent);
}

.vinyl-volume {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink-soft);
  margin-left: auto;
}

.vinyl-volume input[type="range"] {
  width: 56px;
  max-width: 100%;
  flex: none;
  accent-color: var(--pain-red);
}

/* 自动播放被浏览器拦截时的提示气泡（等待首次交互） */
.vinyl-hint {
  position: absolute;
  right: 84px;
  bottom: 34px;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: #fff;
  background: color-mix(in srgb, var(--pain-red) 82%, transparent);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.25);
  animation: musicPulse 1.6s ease-in-out infinite;
  pointer-events: none;
}

/* 点击复制邮箱后的提示气泡 */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  z-index: 95;
  padding: 8px 22px;
  border-radius: 999px;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: #fff;
  background: color-mix(in srgb, var(--pain-red) 85%, transparent);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.25);
  pointer-events: none;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .navbar-inner { padding: 0 12px; gap: 8px; }
  .nav-brand { font-size: 1rem; letter-spacing: 2px; }
  .nav-link { padding: 8px 8px; letter-spacing: 0; font-size: 0.82rem; }
  .layout { padding: 24px 16px 48px; gap: 24px; }
  .post-card { padding: 28px 24px; }
  .article-card { padding: 36px 24px; }
  .hero { padding: 32px 0 40px; }
  .hero-title { font-size: 1.6rem; letter-spacing: 5px; }
  .hero-quote { font-size: 1rem; }
  .vinyl-panel { width: min(330px, calc(100vw - 44px)); }
  .display-panel { right: 12px; width: min(240px, calc(100vw - 24px)); }
  .display-ball { right: 12px; }
  .vinyl-widget { right: 12px; }
}

/* 小屏手机精调：收窄留白、收敛行高，避免大字号的拥挤感 */
@media (max-width: 640px) {
  body { line-height: 2.0; letter-spacing: 0.3px; }
  .layout { padding: 18px 12px 40px; gap: 18px; }
  .post-card { padding: 22px 18px; }
  .article-card { padding: 28px 20px; }
  .list-header { padding: 24px 0 12px; }
  .list-title { font-size: 1.5rem; letter-spacing: 4px; }
  .post-title { font-size: 1.2rem; }
  .music-card, .announce-card, .tags-card, .stats-card { padding: 18px; }
}

/* ---------- 减少动态偏好降级 ---------- */

@media (prefers-reduced-motion: reduce) {
  .bg-single,
  .bg-video,
  .fade-in-up,
  .nav-action.playing,
  .nav-action.wants-play,
  .site-cover-hint,
  .site-cover-hint .nav-icon,
  .site-cover-quote {
    animation: none;
  }
  .vinyl-disc.spinning {
    animation: none;
  }

  .fade-in-up { opacity: 1; }

  .post-card,
  .post-card:hover,
  .profile-avatar,
  .profile-avatar:hover,
  .display-ball,
  .vinyl-disc,
  .vinyl-disc:hover {
    transition: none;
    transform: none;
  }

  a,
  .nav-link,
  .nav-action,
  .read-more,
  .post-title a {
    transition: none;
  }
}
