/* ============================================================
   九疑派李门古琴 · 前台样式
   全部颜色取自主题变量（includes/theme.php），支持深浅两套
   ============================================================ */

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

:root {
  --wrap: 1200px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 宣纸质感：极淡的双色光晕，深浅主题都用主色，透明度很低 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48rem 32rem at 8% -8%, rgba(var(--primary-rgb), .10), transparent 60%),
    radial-gradient(40rem 28rem at 100% 6%, rgba(var(--accent-rgb), .08), transparent 62%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-d); }
h1, h2, h3, h4 { font-family: var(--hfont); font-weight: var(--hweight); letter-spacing: var(--tracking); line-height: 1.4; margin: 0 0 .6em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------- 头部 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s;
}
.site-header.is-stuck { box-shadow: 0 4px 20px rgba(var(--text-rgb), .07); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 74px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex: 0 0 auto; }
.brand-logo { max-height: 46px; width: auto; }
.brand-mark { display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-family: var(--hfont); font-size: 19px; letter-spacing: .08em; }
.brand-text i { font-style: normal; font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav-root { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 10px 15px; color: var(--text);
  font-size: 14.5px; letter-spacing: .05em; border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-item > a:hover { background: var(--hover); color: var(--primary); }
.nav-item.is-current > a { color: var(--primary); }
.nav-item.is-current > a::after {
  content: ""; display: block; height: 2px; margin-top: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.caret {
  display: inline-block; width: 6px; height: 6px; margin-left: 6px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px); opacity: .6;
}
.submenu {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%) translateY(6px);
  min-width: 172px; list-style: none; margin: 0; padding: 8px;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: all .2s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.submenu a { display: block; padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text); }
.submenu a:hover { background: var(--hover); color: var(--primary); }
.submenu .is-current > a { color: var(--primary); background: var(--hover); }

.site-search { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card-solid); }
.site-search input {
  border: 0; background: transparent; color: var(--text);
  padding: 7px 14px; font-size: 13.5px; width: 130px; outline: none; font-family: inherit;
}
.site-search button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 0 14px 0 6px; font-size: 13px; font-family: inherit;
}
.site-search button:hover { color: var(--primary); }

.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 38px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; padding: 9px 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

/* ---------------- 页面通用 ---------------- */
.section { padding: 54px 0; }
.section.tight { padding: 34px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-title { margin: 0; font-size: clamp(20px, 2.6vw, 26px); }
.sec-title small { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; font-weight: 400; }
.sec-more { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.sec-more:hover { color: var(--primary); }

.breadcrumb { font-size: 13px; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span.sep { margin: 0 7px; opacity: .5; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; font-size: 16px; color: var(--text); margin-bottom: 6px; font-family: var(--hfont); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border-radius: 999px; font-size: 14px;
  background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary);
  cursor: pointer; transition: all .2s; letter-spacing: .04em;
}
.btn:hover { background: var(--primary-d); border-color: var(--primary-d); color: var(--on-primary); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: rgba(var(--primary-rgb), .08); color: var(--primary); }
.btn.sm { padding: 7px 16px; font-size: 13px; }

/* ---------------- Hero / 轮播 ---------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-track { position: relative; min-height: 460px; }
/* 轮播用「交叉淡入淡出」而不是 display 切换。
   原实现是 display:none → block + 位移动画：切换那一瞬旧图已消失、新图才从 opacity 0 开始，
   中间会露出页面底色 —— 浅色主题下就是刺眼的「闪白」。
   现在所有 slide 始终叠放，只切换 opacity，两图有重叠期，衔接顺滑无白闪。 */
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
  will-change: opacity;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
/* 轮播遮罩：固定用「左深右浅」的深色渐变，不跟随主题的 --overlay。
   原因：轮播图上永远叠着白色标题；若跟随浅色主题变成浅色遮罩，
   深色底图会被压成灰白、白字也失去对比（实测踩过）。 */
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.66) 0%, rgba(0,0,0,.40) 46%, rgba(0,0,0,.12) 100%);
}
/* 图上已含文字时：铺一层透明链接，让整张图仍可点击 */
.hero-cover-link { position: absolute; inset: 0; z-index: 2; display: block; }
.hero-inner { position: relative; z-index: 2; padding: 96px 0; max-width: 680px; color: #fff; }
.hero-inner .kicker { font-size: 12px; letter-spacing: .34em; text-transform: uppercase; opacity: .8; margin-bottom: 14px; }
.hero-title { font-size: clamp(28px, 4.4vw, 44px); margin: 0 0 16px; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.3); }
.hero-sub { font-size: clamp(14px, 1.6vw, 16.5px); opacity: .92; margin-bottom: 28px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn { background: var(--primary); color: var(--on-primary); }
.hero-actions .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.5); }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }

.hero-dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 9px; z-index: 3; }
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7);
  background: transparent; cursor: pointer; padding: 0; transition: all .25s;
}
.hero-dots button.is-active { background: #fff; width: 26px; border-radius: 999px; }

/* 无轮播时的替代头图 */
.hero-plain { padding: 78px 0; text-align: center; border-bottom: 1px solid var(--line); }
.hero-plain h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.hero-plain p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ---------------- 通知条 ---------------- */
.notice-bar {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px; margin: 20px auto 0;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--card); font-size: 14px;
}
.notice-bar b { color: var(--primary); flex: 0 0 auto; font-weight: 600; }

/* ---------------- 卡片网格 ---------------- */
.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(var(--primary-rgb), .32); }
.card-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--hover); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-cover img { transform: scale(1.05); }
.card-cover.no-img { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 26px; opacity: .5; }
/* 无封面时的占位字符（琴/集/馆/♪ 等） */
.ph-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--hfont); font-size: 42px; color: var(--primary); opacity: .2;
  letter-spacing: .1em; -webkit-user-select: none; user-select: none;
  background: radial-gradient(circle at 50% 45%, rgba(var(--primary-rgb), .16), transparent 70%);
}
.venue-cover { position: relative; }
.card-tag {
  position: absolute; left: 12px; top: 12px; padding: 3px 10px; font-size: 12px;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 16.5px; margin: 0 0 8px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-desc { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin: 0 0 14px; flex: 1; }
.card-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }

/* 横向列表项 */
.list-item {
  display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px dashed var(--line);
}
.list-item:last-child { border-bottom: 0; }
.list-thumb { flex: 0 0 200px; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; background: var(--hover); }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-main { flex: 1; min-width: 0; }
.list-main h3 { font-size: 17px; margin: 0 0 8px; }
.list-main h3 a { color: var(--text); }
.list-main h3 a:hover { color: var(--primary); }
.list-main p { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }

/* ---------------- 文章页 ---------------- */
.article { max-width: 860px; margin: 0 auto; }
.article-head { text-align: center; padding: 34px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.article-title { font-size: clamp(23px, 3.4vw, 32px); margin: 0 0 14px; }
.article-meta { font-size: 13px; color: var(--muted); display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.article-hero { margin: 0 0 30px; border-radius: var(--radius); overflow: hidden; }
.article-body { font-size: 16px; line-height: 2.05; }
.article-body h2 { font-size: 21px; margin: 2em 0 .7em; padding-left: 12px; border-left: 3px solid var(--accent); }
.article-body h3 { font-size: 18px; margin: 1.6em 0 .6em; }
.article-body img { border-radius: var(--radius-sm); margin: 1.2em auto; }
.article-body blockquote {
  margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--primary);
  background: rgba(var(--primary-rgb), .05); color: var(--muted); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body ul, .article-body ol { padding-left: 1.6em; }
.article-body li { margin: .4em 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 14.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 13px; text-align: left; }
.article-body th { background: var(--hover); }
.article-body pre { background: var(--hover); padding: 14px; border-radius: var(--radius-sm); overflow: auto; }
.article-body a { border-bottom: 1px solid rgba(var(--primary-rgb), .4); }

.article-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; }
.article-nav a { max-width: 46%; }
.article-nav .muted { color: var(--muted); }

/* ---------------- 音乐播放器 ---------------- */
.player {
  display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.player-now { position: sticky; top: 96px; }
.player-cover {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--hover);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-cover.disc { position: relative; }
.player-cover.disc::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: 34%; height: 34%; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0 18%, transparent 19%),
              repeating-radial-gradient(circle, rgba(var(--text-rgb), .16) 0 1px, transparent 1px 5px);
  animation: spin 14s linear infinite; animation-play-state: paused;
}
.player-cover.disc.is-playing::before { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-title { font-size: 19px; margin: 0 0 6px; }
.player-artist { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.player audio { width: 100%; margin-top: 6px; }

.track-list { list-style: none; margin: 0; padding: 0; }
.track {
  display: flex; align-items: center; gap: 16px; padding: 13px 16px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background .2s;
  border: 1px solid transparent;
}
.track:hover { background: var(--hover); }
.track.is-active { background: rgba(var(--primary-rgb), .08); border-color: rgba(var(--primary-rgb), .28); }
.track-no { flex: 0 0 30px; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track.is-active .track-no { color: var(--primary); }
.track-info { flex: 1; min-width: 0; }
.track-name { font-size: 15px; margin: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track.is-active .track-name { color: var(--primary); }
.track-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track-play {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--primary); cursor: pointer; font-size: 10px; line-height: 1;
}
.track.is-active .track-play { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ---------------- 雅集活动 ---------------- */
.activity-item { display: grid; grid-template-columns: 122px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px dashed var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-date { text-align: center; border-right: 1px solid var(--line); padding-right: 22px; }
.activity-date .d { font-family: var(--hfont); font-size: 34px; line-height: 1; color: var(--primary); display: block; }
.activity-date .y { font-size: 12.5px; color: var(--muted); letter-spacing: .1em; }
.activity-cover { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 14px; aspect-ratio: 21/9; background: var(--hover); }
.activity-cover img { width: 100%; height: 100%; object-fit: cover; }
.activity-meta { font-size: 13px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 22px 0; }
.gallery figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--hover); cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery video { width: 100%; aspect-ratio: 16/9; background: #000; }

/* ---------------- 琴馆 ---------------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-bar .lbl { font-size: 13px; color: var(--muted); margin-right: 4px; }
.chip {
  padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; color: var(--text); background: var(--card);
}
.chip:hover { border-color: rgba(var(--primary-rgb), .5); color: var(--primary); }
.chip.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.venue-card { display: flex; flex-direction: column; }
.venue-cover { aspect-ratio: 4/3; overflow: hidden; background: var(--hover); border-radius: var(--radius) var(--radius) 0 0; }
.venue-cover img { width: 100%; height: 100%; object-fit: cover; }
.venue-region { font-size: 12.5px; color: var(--accent); letter-spacing: .08em; }
.venue-contact { font-size: 13px; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.venue-contact div { margin: 2px 0; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 40px 0 10px; font-size: 14px; }
.pager a { padding: 7px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .cur { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------- 页脚 ---------------- */
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, var(--text)); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr auto; gap: 34px; padding: 48px 20px 30px; }
.foot-col h3 { font-size: 17px; margin-bottom: 12px; }
.foot-col h4 { font-size: 14px; margin-bottom: 14px; letter-spacing: .08em; color: var(--text); }
.foot-about p { font-size: 13.5px; color: var(--muted); line-height: 1.9; margin: 0; }
.foot-links, .foot-contact { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.foot-links li, .foot-contact li { margin: 8px 0; color: var(--muted); }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--primary); }
.foot-qr img { width: 104px; border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 5px; background: #fff; }
.foot-note { padding: 0 20px 22px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.foot-bar { border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.foot-bar .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; padding: 18px 20px; }
.foot-bar a { color: var(--muted); }
.foot-bar a:hover { color: var(--primary); }
.foot-admin { margin-left: auto; opacity: .6; }

.to-top {
  position: fixed; right: 22px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card-solid); color: var(--primary);
  cursor: pointer; font-size: 18px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transition: all .25s; z-index: 90;
}
.to-top.is-on { opacity: 1; visibility: visible; }

/* 图片灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 500; background: rgba(8,8,10,.9);
  display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox.is-on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .player { grid-template-columns: 260px 1fr; }
  .footer-inner { grid-template-columns: 1.6fr 1fr 1.4fr; }
  .foot-qr { display: none; }
}

@media (max-width: 880px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card-solid); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 10px 16px 20px;
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .main-nav.is-open { max-height: 78vh; overflow-y: auto; }
  .nav-root { flex-direction: column; align-items: stretch; }
  .nav-item > a { padding: 13px 10px; border-bottom: 1px solid var(--line-soft); }
  .nav-item.is-current > a::after { display: none; }
  .submenu {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; border: 0; border-left: 2px solid var(--line);
    margin: 0 0 8px 14px; padding: 0 0 0 8px; min-width: 0;
  }
  .submenu a { padding: 9px 12px; }
  .caret { float: right; margin-top: 8px; }
  .site-search { margin-top: 12px; }
  .site-search input { flex: 1; width: auto; }
  .player { grid-template-columns: 1fr; }
  .player-now { position: static; display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: center; }
  .player-cover { margin-bottom: 0; }
  .hero-track { min-height: 380px; }
  .hero-inner { padding: 66px 0; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 15px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .list-item { flex-direction: column; gap: 12px; }
  .list-thumb { flex: none; width: 100%; }
  .activity-item { grid-template-columns: 1fr; gap: 12px; }
  .activity-date { text-align: left; border-right: 0; border-left: 3px solid var(--accent); padding: 0 0 0 12px; display: flex; align-items: baseline; gap: 10px; }
  .activity-date .d { font-size: 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 34px 15px 22px; }
  .foot-admin { margin-left: 0; }
  .player { padding: 18px; }
  .player-now { grid-template-columns: 96px 1fr; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .article-body { font-size: 15.5px; }
}

@media print {
  .site-header, .site-footer, .to-top, .player audio { display: none; }
}

/* ============================================================
   正文内嵌媒体（编辑器插入的视频 / 音频）
   ============================================================ */
.article-body video {
  width: 100%; border-radius: var(--radius-sm); display: block;
  margin: 1.4em 0; background: #000;
}
.article-body audio {
  width: 100%; max-width: 560px; display: block; margin: 1.4em 0;
}
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* 编辑器输出的字号标记（execCommand fontSize → <font size=N>） */
.article-body font[size="1"] { font-size: .78em; }
.article-body font[size="2"] { font-size: .88em; }
.article-body font[size="3"] { font-size: 1em; }
.article-body font[size="4"] { font-size: 1.1em; }
.article-body font[size="5"] { font-size: 1.24em; }
.article-body font[size="6"] { font-size: 1.42em; }
.article-body font[size="7"] { font-size: 1.7em; }

/* ============================================================
   播放列表分组 与 分类筛选
   ============================================================ */
.track-group {
  padding: 16px 16px 7px; font-size: 12.5px; color: var(--muted);
  letter-spacing: .14em; border-bottom: 1px dashed var(--line); margin-top: 4px;
}
.track-group:first-child { margin-top: 0; }
.album-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }

.gallery video { width: 100%; border-radius: var(--radius-sm); background: #000; }
