/* ============================================================
   小羊的博客 · 黑白主题样式表
   仅使用 --fg / --bg / --line 等变量，无彩色，支持白天+黑夜
   ============================================================ */

:root {
  /* 白天不用纯白：象牙灰打底，长时间看不刺眼 */
  --bg: #f2f1ed;
  --bg-soft: #e8e6e0;
  --fg: #121212;
  --fg-muted: #5f5d57;
  --line: #d9d6d0;
  --line-strong: #121212;
  --code-bg: #e7e5df;
  --sel: #cdcac3;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c0c0c;
  --bg-soft: #171717;
  --fg: #f2f2f2;
  --fg-muted: #9a9a9a;
  --line: #272727;
  --line-strong: #f2f2f2;
  --code-bg: #181818;
  --sel: #3a3a3a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  transition: background-color .25s ease, color .25s ease;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sel); color: var(--fg); }

a { color: inherit; }

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  padding: .1em .36em;
  border-radius: 4px;
  background: var(--code-bg);
  font-size: .9em;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 头部 ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: Georgia, "Songti SC", "Source Han Serif SC", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--fg);
}

.brand-avatar {
  display: block;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1), border-color .25s ease;
}

.brand:hover .brand-avatar {
  transform: rotate(-8deg) scale(1.08);
  border-color: var(--fg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.site-nav a {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.site-nav a:hover {
  color: var(--fg);
  border-color: var(--fg);
  background: var(--bg-soft);
}

/* 当前页不单独高亮：首页和关于同一套样式，aria-current 只留给读屏软件 */

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.icon-btn:hover {
  color: var(--fg);
  border-color: var(--fg);
  background: var(--bg-soft);
}

.icon-btn:focus-visible,
.site-nav a:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon-btn .glyph { font-size: 13px; line-height: 1; }

/* ---------------- 首页 ---------------- */

.hero { padding: 56px 0 8px; }

.hero h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Songti SC", "Source Han Serif SC", serif;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.22;
  letter-spacing: -.01em;
  font-weight: 700;
}

.lede {
  margin: 0 0 8px;
  max-width: 60ch;
  color: var(--fg-muted);
  font-size: 16px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 46px 0 8px;
  color: var(--fg-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.post-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.post-item:last-child { border-bottom: 0; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--fg-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .05em;
}

.post-meta .sep { opacity: .45; }

.tag {
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
}

.post-item h3 {
  margin: 0 0 4px;
  font-family: Georgia, "Songti SC", "Source Han Serif SC", serif;
  font-size: 23px;
  line-height: 1.4;
  font-weight: 700;
}

.post-item h3 a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease;
}

.post-item h3 a:hover { border-bottom-color: var(--fg); }

/* 文章标题前的软件图标 */
.post-item h3.post-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.post-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: cover;
  background: var(--bg-soft);
  box-shadow: 0 0 0 1px var(--line);
}

.post-item p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
}

/* ---------------- 文章页 ---------------- */

.article-head {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 46px 0 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
  margin-bottom: 30px;
}

.article-head h1 {
  margin: 0 0 14px;
  font-family: Georgia, "Songti SC", "Source Han Serif SC", serif;
  font-size: clamp(27px, 5vw, 38px);
  line-height: 1.28;
  font-weight: 700;
}

.prose { max-width: 900px; margin-left: auto; margin-right: auto; }

.prose p { margin: 0 0 1.15em; }

.prose h2 {
  margin: 2.1em 0 .7em;
  font-family: Georgia, "Songti SC", "Source Han Serif SC", serif;
  font-size: 23px;
  line-height: 1.4;
  font-weight: 700;
}

.prose h2::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 2px;
  margin-right: 9px;
  vertical-align: 6px;
  background: var(--fg);
}

.prose h3 {
  margin: 1.6em 0 .5em;
  font-size: 18px;
  font-weight: 700;
}

.prose ul,
.prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }

.prose li { margin: .35em 0; }

.prose li::marker { color: var(--fg-muted); }

.prose blockquote {
  margin: 1.5em 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--line-strong);
  color: var(--fg-muted);
}

.prose code {
  padding: .12em .38em;
  border-radius: 4px;
  background: var(--code-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
}

.prose pre {
  margin: 0 0 1.3em;
  padding: 15px 17px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--code-bg);
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: none;
  font-size: 13.5px;
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--fg-muted);
}

.prose a:hover { text-decoration-color: var(--fg); }

.prose strong { font-weight: 700; }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.4em 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.prose .fill {
  padding: 0 3px;
  border-bottom: 1px dashed var(--fg-muted);
}

/* 文末导航 */
.article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin: 46px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .04em;
}

.article-foot a { color: var(--fg-muted); text-decoration: none; }

.article-foot a:hover { color: var(--fg); }

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

.info-table {
  width: 100%;
  margin: 8px 0 26px;
  border-collapse: collapse;
  font-size: 15px;
}

.info-table th,
.info-table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 108px;
  color: var(--fg-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.note {
  margin: 0 0 26px;
  padding: 12px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--fg-muted);
  font-size: 14px;
}

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

.site-footer {
  margin-top: 64px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .02em;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
}

/* 运行时间：数字等宽，秒数跳动时不会左右抖 */
.site-footer [data-uptime] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

/* ============================================================
   动效
   全部可被 prefers-reduced-motion 关闭
   滚动进入依赖 html.js（没有 JS 时内容直接可见，不会空白）
   ============================================================ */

html { scroll-behavior: smooth; }

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .65s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms),
    transform .65s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---- 头像 ---- */

.avatar-wrap {
  position: relative;
  display: inline-block;
  width: 92px;
  height: 92px;
  margin-bottom: 24px;
  text-decoration: none;
}

.avatar-wrap--lg { width: 108px; height: 108px; margin-bottom: 20px; }

.avatar-float {
  display: block;
  width: 100%;
  height: 100%;
  animation: float 7s ease-in-out infinite;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
  box-shadow: 0 12px 28px -20px rgba(0, 0, 0, .7);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), border-color .25s ease, box-shadow .45s ease;
}

.avatar-wrap:hover .avatar {
  transform: scale(1.06) rotate(2deg);
  border-color: var(--fg);
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .55);
}

.avatar-ring {
  position: absolute;
  inset: -9px;
  border: 1px dashed var(--line);
  border-radius: 50%;
  animation: spin 26s linear infinite;
  pointer-events: none;
}

.avatar-ring::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--fg);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 空状态（还没有文章时） ---- */

.empty-state {
  padding: 34px 26px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  text-align: center;
}

.empty-title {
  margin: 0 0 8px;
  font-family: Georgia, "Songti SC", "Source Han Serif SC", serif;
  font-size: 18px;
  font-weight: 700;
}

.empty-text {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.8;
}

/* ---- 悬浮音乐药丸：碟片 + 上一首 + 播放暂停 + 下一首 ---- */

.player {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 38px;
  padding: 0 11px 0 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color .25s ease;
}

.player:hover { border-color: var(--line-strong); }

/* 碟片 */
.disc {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}

.disc:hover { transform: scale(1.06); }

.disc:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.disc-plate {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #1c1c1c 0 1px, #060606 1px 3px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .16),
    inset 0 0 10px rgba(0, 0, 0, .95);
  /* 暂停时 animation-play-state: paused 会停在当前角度，不会转回来 */
  animation: disc-spin 4.2s linear infinite;
  animation-play-state: paused;
}

.disc.is-playing .disc-plate { animation-play-state: running; }

/* 跟着碟面一起转的高光 */
.disc-sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, .18) 35deg,
    rgba(255, 255, 255, 0) 80deg,
    rgba(255, 255, 255, 0) 180deg,
    rgba(255, 255, 255, .12) 215deg,
    rgba(255, 255, 255, 0) 260deg
  );
}

.disc-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46%;
  height: 46%;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.disc-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #0c0c0c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35);
}

@keyframes disc-spin {
  to { transform: rotate(360deg); }
}

/* 上一首 / 下一首 */
.player-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}

.player-btn:hover {
  color: var(--fg);
  background: var(--bg-soft);
}

.player-btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

/* 播放 / 暂停：实心黑圆，唯一的高对比焦点 */
.player-play {
  width: 28px;
  height: 28px;
  background: var(--fg);
  color: var(--bg);
}

.player-play:hover {
  background: var(--fg);
  color: var(--bg);
  opacity: .85;
}

/* 图标全部用 CSS 画，避免字体差异 */
.ic-play {
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-style: solid;
  border-width: 6px 0 6px 8px;
  border-color: transparent transparent transparent currentColor;
}

.player-play .ic-pause { display: none; }

.player-play.is-playing .ic-play { display: none; }

.player-play.is-playing .ic-pause {
  display: flex;
  gap: 3px;
}

.player-play.is-playing .ic-pause::before,
.player-play.is-playing .ic-pause::after {
  content: "";
  width: 2px;
  height: 10px;
  background: currentColor;
}

.ic-prev,
.ic-next {
  position: relative;
  display: block;
  width: 12px;
  height: 10px;
}

.ic-prev::before,
.ic-prev::after,
.ic-next::before,
.ic-next::after {
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border-style: solid;
}

.ic-prev::before {
  left: 0;
  border-width: 5px 6px 5px 0;
  border-color: transparent currentColor transparent transparent;
}

.ic-prev::after {
  left: 6px;
  border-width: 5px 6px 5px 0;
  border-color: transparent currentColor transparent transparent;
}

.ic-next::before {
  right: 6px;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent currentColor;
}

.ic-next::after {
  right: 0;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent currentColor;
}

/* 「点一下开启声音」提示，浮在药丸下方 */
.disc-hint {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  max-width: 240px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .03em;
  white-space: nowrap;
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.disc-hint.is-on {
  opacity: 1;
  transform: none;
  animation: hint-nudge 2.4s ease-in-out infinite;
}

@keyframes hint-nudge {
  0%, 86%, 100% { transform: translateY(0); }
  90% { transform: translateY(-3px); }
  94% { transform: translateY(0); }
}

/* ---- 轻提示条 ---- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  max-width: min(90vw, 420px);
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 14px 32px -20px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- 滚动时头部加深 ---- */

.site-header { transition: box-shadow .3s ease; }

.site-header.is-stuck { box-shadow: 0 16px 36px -30px rgba(0, 0, 0, .8); }

/* ---- 主题按钮图标旋转 ---- */

.icon-btn .glyph { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }

.icon-btn.is-spinning .glyph { animation: flip .45s cubic-bezier(.2, .7, .2, 1); }

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

/* ---- 文章列表 hover ---- */

.post-item {
  position: relative;
  padding-left: 0;
  transition: padding-left .3s cubic-bezier(.2, .7, .2, 1);
}

.post-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}

.post-item:hover { padding-left: 14px; }

/* 列表项同时要「滚动进入」和「hover 缩进」，这里把两条 transition 合并 */
html.js .post-item[data-reveal] {
  transition:
    opacity .65s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms),
    transform .65s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms),
    padding-left .3s cubic-bezier(.2, .7, .2, 1);
}

.post-item:hover::before { transform: scaleY(1); }

.post-item h3 a {
  background-image: linear-gradient(var(--fg), var(--fg));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size .3s cubic-bezier(.2, .7, .2, 1), border-color .2s ease;
}

.post-item h3 a:hover {
  border-bottom-color: transparent;
  background-size: 100% 1px;
}

/* ---- 阅读进度条 ---- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  pointer-events: none;
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--fg);
}

/* ---- 回到顶部 ---- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.94);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, border-color .2s ease;
}

.to-top:hover { border-color: var(--fg); }

.to-top:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.to-top.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  html.js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------------- 小屏 ---------------- */

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .header-inner { min-height: 60px; gap: 10px; }
  .site-nav { gap: 0; }
  .icon-btn .label { display: none; }
  .icon-btn { padding: 0 10px; }
  .hero { padding-top: 38px; }
  .info-table th { width: 84px; }
  .avatar-wrap { width: 76px; height: 76px; margin-bottom: 18px; }
  .avatar-wrap--lg { width: 88px; height: 88px; }
  .to-top { right: 16px; bottom: 16px; }
  .site-nav a { padding: 5px 6px; }
  .player { height: 34px; padding: 0 9px 0 4px; gap: 2px; }
  .disc { width: 26px; height: 26px; }
  .player-btn { width: 21px; height: 21px; }
  .player-play { width: 24px; height: 24px; }
}

@media (max-width: 400px) {
  .brand { font-size: 0; gap: 0; }
  .brand-avatar { width: 24px; height: 24px; }
}

/* ============================================================
   点歌页 / 铜钟挂件（全局样式）
   放在这里而不是页面内联，因为 assets/route.js 会局部换页，
   换到点歌页时 <head> 里的内联样式不会跟着过来
   ============================================================ */
.music-box{border:1px solid var(--line);border-radius:16px;padding:16px;background:var(--bg-soft)}
.music-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.music-chip{padding:5px 11px;border:1px solid var(--line);border-radius:999px;background:var(--bg);
            color:var(--fg-muted);font:inherit;font-size:12px;cursor:pointer}
.music-chip:hover{border-color:var(--line-strong);color:var(--fg)}
.music-note{margin-top:14px;font-size:12px;color:var(--fg-muted);line-height:1.8}

.tz-card{background:transparent;border:0;padding:0}
.tz-form{display:flex;gap:8px}
.tz-input{flex:1;min-width:0;padding:9px 12px;border:1px solid var(--line);border-radius:9px;
          background:var(--bg);color:var(--fg);font:inherit;font-size:14px;outline:none}
.tz-input:focus{border-color:var(--line-strong)}
.tz-select{padding:9px 8px;border:1px solid var(--line);border-radius:9px;background:var(--bg);
           color:var(--fg);font:inherit;font-size:13px}
.tz-btn{padding:9px 16px;border:1px solid var(--line-strong);border-radius:9px;background:var(--fg);
        color:var(--bg);font:inherit;font-size:14px;cursor:pointer;transition:opacity .2s}
.tz-btn:hover{opacity:.82}
.tz-body{margin-top:4px}
.tz-list{list-style:none;margin:12px 0 0;padding:0;max-height:320px;overflow:auto}
.tz-tip{color:var(--fg-muted);font-size:13px;padding:10px 4px}
.tz-item{display:flex;flex-direction:column;padding:9px 10px;border-radius:10px;cursor:pointer}
.tz-item:hover{background:var(--bg)}
.tz-name{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tz-sub{font-size:12px;color:var(--fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.tz-player{display:flex;align-items:center;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.tz-meta{flex:1;min-width:0}
.tz-title{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tz-artist{font-size:12px;color:var(--fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tz-close{border:0;background:transparent;color:var(--fg-muted);cursor:pointer;font-size:15px}
.tz-audio{width:100%;margin-top:12px;filter:grayscale(1)}
.tz-lyric{margin-top:12px;max-height:160px;overflow:auto;font-size:13px;color:var(--fg-muted);
          line-height:1.9;text-align:center;scrollbar-width:thin}
.tz-lrc.on{color:var(--fg);font-weight:600}

/* 封面位置换成一张会转的黑胶：纯 CSS，不请求图片 */
.tz-disc{position:relative;flex:0 0 auto;width:46px;height:46px;border-radius:50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.055) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% 50%, #2b2b2b 0 28%, #131313 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12), 0 0 0 1px var(--line);
  animation:tz-spin 3.6s linear infinite;animation-play-state:paused;will-change:transform}
.tz-disc::before{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;
  background:conic-gradient(from 0deg, transparent 0 36%, rgba(255,255,255,.16) 50%, transparent 64%)}
.tz-disc::after{content:"";position:absolute;left:50%;top:50%;width:11px;height:11px;
  margin:-5.5px 0 0 -5.5px;border-radius:50%;background:var(--bg-soft);
  border:1px solid var(--line);box-shadow:0 0 0 2px rgba(255,255,255,.07)}
.tz-disc.spinning{animation-play-state:running}
@keyframes tz-spin{to{transform:rotate(360deg)}}

/* 离开点歌页后，右下角的小胶囊（继续播 / 暂停 / 停止） */
.tz-mini{position:fixed;right:22px;bottom:76px;z-index:60;display:flex;align-items:center;gap:8px;
  max-width:min(78vw,320px);height:38px;padding:0 6px 0 5px;border:1px solid var(--line);
  border-radius:999px;background:var(--bg);box-shadow:0 6px 22px rgba(0,0,0,.14)}
.tz-mini-title{flex:1;min-width:0;font-size:13px;color:var(--fg);text-decoration:none;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tz-mini-btn{width:26px;height:26px;flex:0 0 auto;padding:0;border:0;border-radius:50%;background:transparent;
  color:var(--fg);font:inherit;font-size:12px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center}
.tz-mini-btn:hover{background:var(--bg-soft)}
.tz-disc--mini{width:26px;height:26px}
.tz-disc--mini::after{width:7px;height:7px;margin:-3.5px 0 0 -3.5px}

@media (max-width:620px){
  .tz-mini{right:16px;bottom:70px}
  .tz-form{flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){
  .tz-disc{animation:none}
}

/* ---------------- 首页头图（圆角卡片 + 滚动视差） ---------------- */

/* 头图比正文宽，但始终窄于视口，靠负外边距居中，不需要额外裁切 */

.hero--photo {
  --hero-radius: 26px;
  --hero-w: min(100vw - 40px, 1560px);
  position: relative;
  width: var(--hero-w);
  /* 用负外边距居中，不用 transform：transform 会把卡片提成合成层，
     滚动时圆角剪切偶尔失效（就是“一下圆角一下方角”那个 bug） */
  margin: 20px 0 4px calc((100% - var(--hero-w)) / 2);
  padding: 0;
  min-height: clamp(430px, 78vh, 700px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: var(--hero-radius);
  /* clip-path 再兜一层：合成层里也保证是圆角 */
  clip-path: inset(0 round var(--hero-radius));
  background: transparent;
  color: #fff;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* 圆角直接长在图这一层上：背景图一定会被自己的 border-radius 裁，
     就算父级那层 clip 被浏览器丢帧丢了，也还是圆的 */
  border-radius: inherit;
  overflow: hidden;
  background-color: #0c0e11;
  /* 用背景图画，不用 <img>：<img> 带 transform 会被提成合成层，
     重绘时圆角剪切会掉，就是那个“鼠标一动就变方”的 bug */
  /* 路径相对本文件（assets/style.css），所以是 hero.webp 而不是 assets/hero.webp */
  background-image: url("hero.jpg?v=17");
  background-image: image-set(
    url("hero.webp?v=17") type("image/webp"),
    url("hero.jpg?v=17") type("image/jpeg")
  );
  background-size: cover;
  background-position: 60% 50%;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit; /* 遮罩自己也是圆的，父级剪切掉了也不会露直角 */
  background:
    /* 左侧压暗，保证白字压在亮条纹上也读得清 */
    linear-gradient(90deg,
      rgba(8, 10, 14, .74) 0%,
      rgba(8, 10, 14, .38) 42%,
      rgba(8, 10, 14, 0) 72%),
    linear-gradient(180deg,
      rgba(10, 12, 15, .55) 0%,
      rgba(10, 12, 15, .10) 30%,
      rgba(10, 12, 15, .45) 72%,
      rgba(10, 12, 15, .88) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 84px 24px;
}

.hero--photo h1 { color: #fff; }
.hero--photo .lede { color: rgba(255, 255, 255, .84); }
.hero--photo .fill { color: #fff; border-bottom-color: rgba(255, 255, 255, .45); }
.hero--photo .avatar-ring { border-color: rgba(255, 255, 255, .55); }

@media (max-width: 620px) {
  .hero--photo { --hero-w: calc(100vw - 24px); --hero-radius: 18px; min-height: 66vh; margin-top: 14px; }
  .hero-inner { padding: 56px 18px; }
}

/* ---------------- 首页两栏：文章左 / 时钟卡片右 ---------------- */

.home { max-width: 1560px; }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
  margin-top: 46px;
}

.home-main { min-width: 0; }
.home-main .section-label { margin-top: 0; }

/* 宽屏下文章区自己滚：滚到底也不会带着整页动 */
@media (min-width: 961px) {
  .home-main {
    max-height: min(760px, calc(100vh - 170px));
    max-height: min(760px, calc(100svh - 170px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 12px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }

  .home-main::-webkit-scrollbar { width: 8px; }
  .home-main::-webkit-scrollbar-track { background: transparent; }
  .home-main::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 999px;
    border: 2px solid var(--bg);
  }
  .home-main:hover::-webkit-scrollbar-thumb { background: var(--line-strong); }
}

.clock-card {
  --card-radius: 18px;
  position: sticky;
  top: 88px;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: #17171a;
  border: 1px solid #26262b;
  color: #f4f4f5;
  box-shadow: 0 26px 50px -34px rgba(0, 0, 0, .85);
}

.clock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px 11px;
}

.clock-greet {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #d2d2d8;
}

.clock-time {
  margin: 0;
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.clock-date {
  display: flex;
  gap: 8px;
  margin: 6px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8b8b93;
}

.clock-icon {
  font-size: 18px;
  line-height: 1;
  color: #b9a6ff;
  user-select: none;
}

.clock-art {
  display: block;
  width: 100%;
  /* 扁一点：只留一条横幅，不再占半张卡片 */
  aspect-ratio: 2 / 1;
  height: auto;
  object-fit: cover;
  object-position: 50% 16%;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

@media (max-width: 960px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
  }

  .clock-card { position: static; }
}

@media (max-width: 620px) {
  .clock-time { font-size: 32px; }
  .clock-art { aspect-ratio: 5 / 2; }
}

/* ---------------- 页头放到底：小羊贴左，导航和开关贴右 ---------------- */

.site-header .wrap {
  max-width: none;
  padding: 0 18px; /* 只留一点安全边距，不再居中收窄 */
}

@media (max-width: 620px) {
  .site-header .wrap { padding: 0 12px; }
}

/* ============================================================
   手机端
   ============================================================ */

/* 触屏上不要蓝色高亮块，也别让 hover 效果卡在手指离开之后 */
* { -webkit-tap-highlight-color: transparent; }

/* 锚点跳转时给吸顶页头留出位置 */
html { scroll-padding-top: 74px; }

@media (hover: none) {
  .site-nav a:hover { background: transparent; border-color: var(--line); }
  .post-item:hover { padding-left: 0; }
  .post-item:hover::before { transform: scaleY(0); }
  .post-item h3 a:hover { background-size: 0 1px; }
}

@media (max-width: 430px) {
  /* 四个导航项 + 主题按钮，小屏再收一点，别挤成两行 */
  .site-nav a { padding: 6px 9px; font-size: 13.5px; }
  .brand { font-size: 17px; }
  .header-inner { gap: 6px; }
}

@media (max-width: 620px) {
  /* ---- 页头：手指点得着 ---- */
  .header-inner { min-height: 58px; gap: 8px; }
  .site-nav { gap: 5px; }
  .site-nav a { padding: 8px 12px; font-size: 14.5px; }
  .brand { font-size: 18px; gap: 7px; }
  .brand-avatar { width: 24px; height: 24px; }
  .icon-btn { min-height: 36px; padding: 0 11px; }

  /* ---- 头图 ---- */
  .hero--photo {
    --hero-radius: 16px;
    min-height: 66vh;                          /* 老浏览器回退 */
    min-height: clamp(320px, 58svh, 470px);    /* svh：地址栏收起时不会跳 */
    margin-top: 12px;
  }
  .hero-inner { padding: 44px 18px; }
  .hero--photo h1 { font-size: clamp(26px, 8vw, 32px); }
  .hero--photo .lede { font-size: 14.5px; line-height: 1.72; }
  .avatar-wrap { width: 64px; height: 64px; margin-bottom: 14px; }

  /* ---- 两栏收成一列 ---- */
  .home-layout { gap: 30px; margin-top: 32px; }

  /* ---- 时钟卡片：更扁，图片留一条 ---- */
  .clock-card { border-radius: 16px; }
  .clock-top { padding: 12px 14px 10px; }
  .clock-time { font-size: 31px; }
  .clock-art { aspect-ratio: 16 / 7; }

  /* ---- 正文 ---- */
  body { font-size: 15.5px; line-height: 1.75; }
  .post-item { padding: 18px 0; }
  .post-item h3 { font-size: 20px; }
  .post-item h3.post-title { gap: 11px; }
  .post-icon { width: 36px; height: 36px; border-radius: 9px; }
  .prose pre { padding: 12px 14px; }
  .prose pre code { font-size: 12.5px; }

  /* ---- 点歌 ---- */
  .music-box { padding: 13px; border-radius: 14px; }
  .tz-form { gap: 7px; }
  .tz-input { flex: 1 1 100%; }
  .tz-select { flex: 1 1 0; }
  .tz-btn { flex: 1 1 0; }
  .music-chip { padding: 7px 12px; }
  .tz-close { padding: 6px 8px; font-size: 16px; }

  /* ---- 悬浮件别撞在一起 ---- */
  .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; }
  .tz-mini { right: 12px; bottom: 64px; max-width: calc(100vw - 24px); }

  /* ---- 页脚 ---- */
  .site-footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* 刘海屏 / 圆角屏：把内容让开 */
.site-header { padding-top: env(safe-area-inset-top); }

/* ---------------- 右侧悬浮栏：时钟 + 电子乞讨 ---------------- */

.home-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 88px;
}

/* 吸顶交给外层容器 */
.home-side .clock-card { position: static; top: auto; }

.tip-card {
  border-radius: 18px;
  border: 1px solid #26262b;
  background: #17171a;
  color: #f4f4f5;
  padding: 15px 15px 17px;
  text-align: center;
}

.tip-title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.tip-sub {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: .06em;
  color: #8b8b93;
}

.tip-qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
}

/* 右侧悬浮栏：动漫卡片（点进 anime.html） */
.anime-card {
  display: block;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #26262b;
  aspect-ratio: 4 / 3;
  background: #17171a;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 26px 50px -34px rgba(0, 0, 0, .85);
  -webkit-tap-highlight-color: transparent;
}

.anime-card picture { display: block; height: 100%; }

.anime-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .3s ease;
}

.anime-card:hover img { transform: scale(1.04); filter: brightness(.9); }

.anime-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .74), rgba(0, 0, 0, .12) 52%, rgba(0, 0, 0, 0));
}

.anime-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 16px 18px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.3;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}

/* 喂点饭页：微信 / 支付宝并排 */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 10px;
  max-width: 620px;
}

.feed-grid .tip-card { padding: 16px 16px 18px; }

@media (max-width: 620px) {
  .feed-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 320px;
  }
}

@media (max-width: 960px) {
  .home-side { position: static; }
}

/* ---------------- 文章内的下载按钮 ---------------- */

.dl-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 4px 0 34px;
}

.prose .dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease;
}

.prose .dl-btn::after {
  content: "↓";
  font-size: 15px;
  line-height: 1;
}

.prose .dl-btn:hover {
  opacity: .85;
  text-decoration: none;
}

.prose .dl-btn:active { transform: translateY(1px); }

.dl-note {
  color: var(--fg-muted);
  font-size: 12.5px;
  letter-spacing: .01em;
}

@media (max-width: 620px) {
  .prose .dl-btn { width: 100%; justify-content: center; }
  .dl-note { width: 100%; }
}

/* ---------------- 动漫页 ---------------- */

.anime-head { margin-top: 26px; }
.anime-head h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 34px); }
.anime-head .lede { margin: 0; font-size: 15px; color: var(--fg-muted); }

.anime-search { display: flex; gap: 10px; margin: 22px 0 6px; max-width: 540px; }
.anime-input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--fg);
  font-size: 15px;
  font-family: inherit;
}
.anime-input:focus { outline: none; border-color: var(--fg); }
.anime-btn {
  padding: 11px 22px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.anime-btn:hover { opacity: .88; }

.anime-status { min-height: 20px; margin: 8px 0 20px; font-size: 14px; color: var(--fg-muted); }

.anime-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 20px 14px; margin-bottom: 30px; }

.anime-card-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.anime-card-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  transition: border-color .2s ease, transform .2s ease;
}
.anime-card-item:hover img { border-color: var(--fg); transform: translateY(-2px); }
.anime-card-item strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.anime-card-item span { font-size: 12px; color: var(--fg-muted); }

.anime-player { margin: 6px 0 30px; }
.anime-player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--fg-muted);
}
.anime-player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000;
}
.anime-linkbtn {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.anime-linkbtn:hover { border-color: var(--fg); }

.anime-detail { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; margin: 4px 0 30px; }
.anime-detail > div > img { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.anime-title { margin: 0 0 6px; font-size: 20px; }
.anime-meta { margin: 0 0 10px; font-size: 13px; color: var(--fg-muted); }
.anime-blurb { margin: 0 0 14px; max-height: 7.4em; overflow: auto; font-size: 14px; line-height: 1.7; color: var(--fg-muted); }

.anime-lines { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.anime-line {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.anime-line:hover { border-color: var(--fg); }
.anime-line[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.anime-eps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}
.anime-ep {
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
}
.anime-ep:hover { border-color: var(--fg); }
.anime-ep[aria-current="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.anime-ep-more { grid-column: 1 / -1; color: var(--fg-muted); }

@media (max-width: 620px) {
  .anime-detail { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .anime-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
  .anime-eps { max-height: 220px; }
}

.anime-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.anime-chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.anime-chip:hover { border-color: var(--fg); }
.anime-chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.anime-section { margin: 0 0 14px; font-size: 15px; font-weight: 600; letter-spacing: .03em; color: var(--fg-muted); }



/* 看番页：顶部返回条 */
.watch-back { margin: 22px 0 4px; font-size: 14px; }
.watch-back a { color: var(--fg-muted); text-decoration: none; }
.watch-back a:hover { color: var(--fg); border-bottom: 1px solid currentColor; }

/* ---------------- 动漫列表：骨架占位 ---------------- */

.anime-skeleton { pointer-events: none; }

.anime-skeleton .sk-poster,
.anime-skeleton .sk-line,
.anime-chip-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.anime-skeleton .sk-poster { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; }
.anime-skeleton .sk-line { height: 12px; border-radius: 6px; border: 0; }
.anime-skeleton .sk-short { width: 62%; }

.anime-chip-skeleton {
  display: inline-block;
  width: 62px;
  height: 30px;
  border-radius: 999px;
}

/* 一道浅灰扫光，来回跑 */
.anime-skeleton .sk-poster::after,
.anime-skeleton .sk-line::after,
.anime-chip-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(140, 140, 140, .22) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: sk-sweep 1.35s ease-in-out infinite;
}

@keyframes sk-sweep {
  to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .anime-skeleton .sk-poster::after,
  .anime-skeleton .sk-line::after,
  .anime-chip-skeleton::after { animation: none; }
}

/* 看番页：骨架细节 + 开声音提示 */

.anime-skeleton .sk-title { height: 22px; width: 58%; border-radius: 8px; }
.anime-skeleton .sk-meta { height: 12px; width: 34%; }
.anime-skeleton .sk-para { height: 12px; width: 100%; }

.anime-skeleton .sk-eps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.anime-skeleton .sk-ep {
  position: relative;
  overflow: hidden;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.anime-skeleton .sk-ep::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 25%, rgba(140, 140, 140, .22) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: sk-sweep 1.35s ease-in-out infinite;
}

.anime-player { position: relative; }

.watch-unmute {
  position: absolute;
  left: 50%;
  bottom: 66px;
  transform: translateX(-50%);
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.watch-unmute:hover { background: rgba(0, 0, 0, .88); }

@media (prefers-reduced-motion: reduce) {
  .anime-skeleton .sk-ep::after { animation: none; }
}

/* 搜索时把分类按钮整排收掉（flex 会盖掉 [hidden]，这里补一刀） */
.anime-chips[hidden] { display: none; }

/* 工具类页面（动漫 / 看番）在电脑上放宽一点 */
.wrap.wide { max-width: min(1760px, 94vw); }
