/* 花月底栏 · 唯一实现（站点页 + 阅读页共用）
   容器：<nav id="fmc-tabbar" data-active="home|events|tv|reading|none" data-mode="always?"></nav>
   - 结构由 fmc-tabbar.js 渲染（5 项 + SVG 图标 + 选中态 + 滑块）
   - 参数：栏 58 / 圆角 29 / 侧距 16 / 内边距 6 / chip 46 / chip 圆角 23 / 图标 24 / 文字 10
   - 主题：html[data-theme="day"] 走白天值，其余（night / 未设）走夜间值
   - data-mode="always"：桌面端也显示（阅读页没有站点顶栏）；否则 ≥641px 隐藏，交给站点原生顶栏

   2026-12-01 第二轮（滑块与秒切）：
   - 滑块用 transform 过渡（合成层，不重排、不重绘胶囊栏的毛玻璃）
   - 选中项颜色由 JS 切 token，CSS 负责 0.3s 颜色渐变（图标 currentColor 一起变）
   - 跨页由 fmc-tabbar.js 记录「上一页选中项 → 本页选中项」，在新页揭晓后再滑
   - 跨文档 View Transitions：底栏是命名元素，切页时保持像素稳定，只有内容交叉淡入
*/
#fmc-tabbar{
  --fmc-tab-h:58px; --fmc-tab-chip-h:46px; --fmc-tab-chip-r:23px;
  --fmc-tab-radius:29px; --fmc-tab-side:16px; --fmc-tab-pad:6px;
  --fmc-tab-icon:24px; --fmc-tab-label:10px; --fmc-tab-gap:4px;
  /* 夜间（默认）。未设置 data-theme 的页面也按夜间走：
     旧版这里写 transparent，导致没有主题脚本的页面选中块完全看不见。 */
  /* 2026-12-02 用户定：栏体一律实色不透明。
     以前是 78%/80% + 毛玻璃，页面底色（历史页黑海报 / 阅读页纯白）会透上来给栏体染色，
     于是同一个选中块在黑页上显得发白、在白页上显得发灰——不是 chip 变色，是背景在变。
     实色之后三端每页的栏体、chip、选中块都是同一组值。 */
  --fmc-tab-surface:#1c1c1e;
  --fmc-tab-ink:#f2f2f7;
  --fmc-tab-ink-on:#64b5ff;
  --fmc-tab-ink-dim:rgba(255,255,255,.42);
  --fmc-tab-shadow:0 8px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.16);
  --fmc-tab-chip:#3a3a3f;
  --fmc-tab-chip-shadow:0 1px 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.10);
  /* 与 JS 的 0.3s 保持一致 */
  --fmc-tab-slide-dur:.3s;
  --fmc-tab-slide-ease:cubic-bezier(.32,.72,0,1);
  --fmc-tab-color-ease:cubic-bezier(.4,0,.2,1);

  display:none;
  position:fixed; left:50%; transform:translateX(-50%);
  bottom:calc(env(safe-area-inset-bottom,0px) + 8px);
  width:calc(100% - 32px); max-width:760px; height:var(--fmc-tab-h);
  box-sizing:border-box; padding:0 var(--fmc-tab-pad);
  border-radius:var(--fmc-tab-radius); border:0; margin:0;
  align-items:center; justify-content:space-between;
  background:var(--fmc-tab-surface);
  /* 实色栏体：不再需要 backdrop-filter（以前那层每帧合成是白花的） */
  box-shadow:var(--fmc-tab-shadow);
  z-index:9999; font-family:-apple-system,BlinkMacSystemFont,"FMC Sans SC","PingFang SC",sans-serif;
}
#fmc-tabbar[data-ready]{display:flex}
@media (min-width: 641px) and (pointer: fine){
  #fmc-tabbar:not([data-mode="always"]){display:none}
}

/* 单项 chip */
#fmc-tabbar > a,
#fmc-tabbar > button{
  position:relative; z-index:1;
  flex:1 1 0; min-width:0; height:var(--fmc-tab-chip-h); margin:0;
  box-sizing:border-box; padding:0 2px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:var(--fmc-tab-gap);
  border:0; border-radius:var(--fmc-tab-chip-r);
  background:transparent;
  -webkit-appearance:none; appearance:none;
  color:var(--fmc-tab-ink);
  /* 选中/取消选中的蓝白渐变（图标用 currentColor，一起渐变） */
  transition:color var(--fmc-tab-slide-dur) var(--fmc-tab-color-ease);
  font:inherit; font-size:var(--fmc-tab-label); line-height:13px; font-weight:500;
  letter-spacing:.01em; text-align:center;
  -webkit-tap-highlight-color:transparent; -webkit-user-select:none; user-select:none;
  cursor:pointer;
}
#fmc-tabbar > a > svg,
#fmc-tabbar > button > svg{width:var(--fmc-tab-icon); height:var(--fmc-tab-icon); display:block; flex:none}
/* 图标里的文字（电视报的「今天几号」）：等宽数字，1 号 / 31 号都不会左右抖 */
#fmc-tabbar > a > svg text,
#fmc-tabbar > button > svg text{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}

#fmc-tabbar > a > span,
#fmc-tabbar > button > span{display:block; font-size:var(--fmc-tab-label); line-height:13px; font-weight:500}

/* 选中态（无滑块时的兜底）：滑块没生效前，锚点自己还能看出选中 */
#fmc-tabbar > a[aria-current="page"],
#fmc-tabbar > button[aria-current="page"]{color:var(--fmc-tab-ink-on)}

/* 选中滑块：挂在胶囊栏本体。
   用 transform 移动（合成层），宽度只在字形/等分变化时改。
   JS 会先把 left 钳制在 padding box 内，再换算成 translateX，所以最左/最右项不会溢出圆角。 */
.fmc-tabbar-slider{
  position:absolute; top:var(--fmc-tab-pad); left:var(--fmc-tab-pad);
  height:var(--fmc-tab-chip-h); width:0;
  transform:translate3d(0,0,0);
  border-radius:var(--fmc-tab-chip-r); background:var(--fmc-tab-chip);
  box-shadow:var(--fmc-tab-chip-shadow);
  z-index:0; pointer-events:none; opacity:0;
  transition:transform var(--fmc-tab-slide-dur) var(--fmc-tab-slide-ease),
             width var(--fmc-tab-slide-dur) var(--fmc-tab-slide-ease),
             opacity .18s linear;
}
#fmc-tabbar.fmc-has-slider .fmc-tabbar-slider{opacity:1}

/* 滑块生效后才隐藏锚点自身背景（避免「两个 chip 叠加」）。
   不用只看 [aria-current]：站点全局规则可能给任意锚点画底，这里统一清掉。 */
#fmc-tabbar.fmc-has-slider > a,
#fmc-tabbar.fmc-has-slider > button{
  background:transparent !important; box-shadow:none !important;
}
#fmc-tabbar.fmc-has-slider > a::before,
#fmc-tabbar.fmc-has-slider > a::after{
  background:none !important; box-shadow:none !important;
}

/* 禁用占位（搜索） */
#fmc-tabbar > [aria-disabled="true"]{color:var(--fmc-tab-ink-dim); cursor:default}

/* 白天：只有分页（历史/电视报/阅读）跟主题走浅色；首页见下面强制暗色块。
   选中块的阴影沿用首页那套（不换成浅白内高光）：用户明确「以首页的 chip 高度/阴影为准」。 */
html[data-theme="day"] #fmc-tabbar{
  --fmc-tab-surface:#fbfbfd;
  --fmc-tab-ink:#1d1d1f;
  --fmc-tab-ink-on:#0071e3;
  --fmc-tab-ink-dim:rgba(0,0,0,.38);
  --fmc-tab-shadow:0 8px 30px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.7);
  --fmc-tab-chip:#e5e5ea;
  --fmc-tab-chip-shadow:0 1px 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.10);
}
/* 首页（fmc-separators-home）是强制暗色版面：白天也用夜间材质，不跟随白天浅色 */
html[data-theme="day"] body.fmc-separators-home #fmc-tabbar{
  --fmc-tab-surface:#1c1c1e;
  --fmc-tab-ink:#f2f2f7;
  --fmc-tab-ink-on:#64b5ff;
  --fmc-tab-ink-dim:rgba(255,255,255,.42);
  --fmc-tab-shadow:0 8px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.16);
  --fmc-tab-chip:#3a3a3f;
  --fmc-tab-chip-shadow:0 1px 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.10);
}
/* 2026-12-03 用户定：底栏材质不再按页面分叉——首页也不在白天强制暗色。
   白天四页（首页/历史/电视报/阅读）统一浅色栏 + #e5e5ea 选中块 + 同一套投影；
   夜间统一深色。这样首页与其它三页的选中块高度/阴影/材质完全一致。 */
/* 低性能/低透明度偏好：退回不透明 */
@media (prefers-reduced-transparency: reduce){
  #fmc-tabbar{background:#1c1c1e; -webkit-backdrop-filter:none; backdrop-filter:none}
  html[data-theme="day"] #fmc-tabbar{background:#fbfbfd}
  html[data-theme="day"] body.fmc-separators-home #fmc-tabbar{background:#1c1c1e}
}

/* 有底栏时（手机端）：
   site     = 压掉站点原生 header（它就是旧底栏），正文底部留 12px（与现状一致，底栏浮在内容上）
   bare     = archive 等没有顶栏的长文页，给足底部留白
   reading  = 阅读页 body 不加内边距，留白由 main.fmc-read 自己承担 */
@media (max-width: 640px), (pointer: coarse){
  html.fmc-has-tabbar[data-fmc-tabbar-mode="site"] body > header.site-header,
  html.fmc-has-tabbar[data-fmc-tabbar-mode="site"] body header.site-header{display:none !important}
  html.fmc-has-tabbar[data-fmc-tabbar-mode="site"] body,
  html.fmc-has-tabbar[data-fmc-tabbar-mode="site"] body:has(> footer.fmc-site-end){
    padding-bottom:calc(env(safe-area-inset-bottom,0px) + 12px) !important;
  }
  html.fmc-has-tabbar[data-fmc-tabbar-mode="bare"] body{
    padding-bottom:calc(env(safe-area-inset-bottom,0px) + 78px) !important;
  }
  /* archive 等没有站点 header 的页面：body 里那行"裸导航 + 语言开关"手机端没有样式可用，直接隐藏 */
  html.fmc-has-tabbar[data-fmc-tabbar-mode="bare"] body > nav.edition-links,
  html.fmc-has-tabbar[data-fmc-tabbar-mode="bare"] body > details.fmc-locale{display:none !important}
  html.fmc-has-tabbar body > main.fmc-read{padding-bottom:130px !important}
}


/* 加到主屏幕（standalone 全屏）时的安全区处理：
   首页海报靠 .fmc-tv-app / .fca-art 的 margin-top:-env(safe-area-inset-top) 贴到屏幕最顶（状态栏叠加在图上）；
   其它页面没有海报，给状态栏让位。 */
html.fmc-standalone:not(:has(body.fmc-separators-home)) body{
  padding-top: env(safe-area-inset-top, 0px);
}
html.fmc-standalone body > header.site-header{
  padding-top: env(safe-area-inset-top, 0px);
}

/* ==========================================================================
   跨文档 View Transitions（渐进增强）
   - 只改切页时的呈现，不改布局；不支持 @view-transition 的浏览器整段忽略。
   - 底栏是命名元素：老页/新页的底栏快照都在同一位置，切页时保持像素稳定，
     不会跟着内容一起淡出淡入。新页的选中块在快照时仍是「上一页的选中项」，
     等过渡结束后再由 JS 滑动（见 fmc-tabbar.js）。
   ========================================================================== */
@view-transition {
  navigation: auto;
}
#fmc-tabbar{
  view-transition-name: fmc-tabbar;
  /* 兜底：老浏览器/被裁掉的浏览器里这个属性无副作用 */
}
::view-transition-group(fmc-tabbar),
::view-transition-old(fmc-tabbar),
::view-transition-new(fmc-tabbar){
  animation: none;
  mix-blend-mode: normal;
}
/* 内容层交叉淡入：0.18s 退、0.24s 进，接近原生 App 的切页 */
::view-transition-old(root){
  animation: fmc-vt-out .18s var(--fmc-tab-slide-ease) both;
}
::view-transition-new(root){
  animation: fmc-vt-in .24s var(--fmc-tab-slide-ease) both;
}
@keyframes fmc-vt-out{ from{opacity:1} to{opacity:0} }
@keyframes fmc-vt-in{ from{opacity:0} to{opacity:1} }

@media (prefers-reduced-motion: reduce){
  .fmc-tabbar-slider{transition:none}
  #fmc-tabbar > a, #fmc-tabbar > button{transition:none}
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-group(fmc-tabbar),
  ::view-transition-old(fmc-tabbar),
  ::view-transition-new(fmc-tabbar){
    animation: none;
  }
}

/* ==========================================================================
   站内统一搜索 · Spotlight 复刻（核心版）
   底栏“搜索”打开：顶部搜索框 + 悬浮结果窗口；结果只显示名字 + 链接。
   数据来自 PanHub 公网搜索（search.flowermoonclub.com）。
   ========================================================================== */
#fmc-search{
  --fmc-sp-panel:rgba(28,28,30,.9);
  --fmc-sp-field:rgba(255,255,255,.08);
  --fmc-sp-ink:#f2f2f7;
  --fmc-sp-muted:#98989d;
  --fmc-sp-line:rgba(255,255,255,.12);
  --fmc-sp-accent:#64b5ff;
  position:fixed; inset:0; z-index:10000;
  display:flex; flex-direction:column; align-items:center;
  box-sizing:border-box; overflow:hidden;
  padding:max(10px, env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px));
  background:rgba(0,0,0,.42);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  opacity:0; transition:opacity .18s ease;
  color-scheme:dark;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC",sans-serif;
}
#fmc-search[hidden]{display:none !important}
#fmc-search.is-open{opacity:1}
#fmc-search [hidden]{display:none !important}
html[data-theme="day"] #fmc-search{
  --fmc-sp-panel:rgba(250,250,252,.93);
  --fmc-sp-field:rgba(0,0,0,.05);
  --fmc-sp-ink:#1d1d1f;
  --fmc-sp-muted:#6e6e73;
  --fmc-sp-line:rgba(0,0,0,.1);
  --fmc-sp-accent:#0071e3;
  color-scheme:light;
}
html[data-theme="day"] body.fmc-separators-home #fmc-search{
  --fmc-sp-panel:rgba(28,28,30,.9);
  --fmc-sp-field:rgba(255,255,255,.08);
  --fmc-sp-ink:#f2f2f7;
  --fmc-sp-muted:#98989d;
  --fmc-sp-line:rgba(255,255,255,.12);
  --fmc-sp-accent:#64b5ff;
  color-scheme:dark;
}
#fmc-search .fmc-search-panel{
  width:min(680px,100%);
  max-height:calc(var(--fmc-search-vh,100dvh) - 64px);
  margin-top:clamp(8px,6vh,56px);
  display:flex; flex-direction:column; min-height:0;
  box-sizing:border-box; overflow:hidden;
  border-radius:24px;
  background:var(--fmc-sp-panel);
  color:var(--fmc-sp-ink);
  border:1px solid var(--fmc-sp-line);
  box-shadow:0 24px 70px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.25);
  -webkit-backdrop-filter:blur(30px) saturate(180%);
  backdrop-filter:blur(30px) saturate(180%);
  transform:translateY(6px) scale(.995);
  transition:transform .18s cubic-bezier(.32,.72,0,1);
}
#fmc-search.is-open .fmc-search-panel{transform:none}
#fmc-search .fmc-search-top{display:flex; align-items:center; gap:8px; padding:14px 14px 12px}
#fmc-search .fmc-search-field{
  flex:1; min-width:0; height:54px; display:flex; align-items:center; gap:9px;
  padding:0 12px 0 14px; box-sizing:border-box;
  border-radius:16px; background:var(--fmc-sp-field);
  border:1px solid var(--fmc-sp-line);
}
/* 2026-12-05 用户定：输入框聚焦时不要着色边框 / 光圈，保持常态。 */
#fmc-search .fmc-search-glass{width:20px; height:20px; flex:none; opacity:.55}
#fmc-search .fmc-search-input{
  flex:1; min-width:0; height:100%; margin:0; padding:0; border:0; outline:0;
  background:transparent; color:var(--fmc-sp-ink);
  font-family:inherit; font-size:17px; line-height:1.2; letter-spacing:0;
  -webkit-appearance:none; appearance:none;
}
#fmc-search .fmc-search-input::-webkit-search-cancel-button,
#fmc-search .fmc-search-input::-webkit-search-decoration{-webkit-appearance:none; display:none}
#fmc-search .fmc-search-input::placeholder{color:var(--fmc-sp-muted)}
#fmc-search .fmc-search-clear{
  flex:none; width:24px; height:24px; margin:0; padding:0;
  border:0; border-radius:50%; background:rgba(255,255,255,.12);
  color:var(--fmc-sp-muted); font-family:inherit; font-size:16px; line-height:24px;
  text-align:center; cursor:pointer; -webkit-appearance:none; appearance:none;
}
html[data-theme="day"] #fmc-search .fmc-search-clear{background:rgba(0,0,0,.08)}
#fmc-search .fmc-search-cancel{
  flex:none; margin:0; padding:8px 2px; border:0; background:none;
  color:var(--fmc-sp-ink); font-family:inherit; font-size:15px; line-height:1.2;
  cursor:pointer; -webkit-appearance:none; appearance:none;
}
#fmc-search .fmc-search-body{
  flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain; padding:0 18px 16px;
  scrollbar-width:none;
}
#fmc-search .fmc-search-body::-webkit-scrollbar{display:none}
#fmc-search .fmc-search-status{
  min-height:0; padding:2px 0 10px;
  color:var(--fmc-sp-muted); font-size:13px; line-height:1.4;
}
#fmc-search .fmc-search-status:empty{display:none}
#fmc-search .fmc-search-status.is-error{color:#ff453a}
html[data-theme="day"] #fmc-search .fmc-search-status.is-error{color:#d70015}
#fmc-search .fmc-search-row{border-top:1px solid var(--fmc-sp-line)}
#fmc-search .fmc-search-row:first-child{border-top:0}
#fmc-search .fmc-search-row-link{
  display:block; padding:13px 0;
  text-decoration:none !important; color:inherit !important;
}
#fmc-search .fmc-search-row-name{
  display:block; font-size:16px; line-height:1.32; font-weight:600; letter-spacing:-.012em;
  color:var(--fmc-sp-ink); overflow-wrap:anywhere; word-break:break-word;
}
/* 网盘聚合结果：名称 + 右侧大小（排序依据露出来） */
#fmc-search .fmc-search-row-head{display:flex; align-items:baseline; gap:10px}
#fmc-search .fmc-search-row-head .fmc-search-row-name{flex:1 1 auto; min-width:0}
#fmc-search .fmc-search-row-size{
  flex:none; white-space:nowrap;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px; line-height:1.35; color:var(--fmc-sp-muted);
  font-variant-numeric:tabular-nums;
}
/* 提取码：跟链接同一行，小一号、次要色 */
#fmc-search .fmc-search-row-code{
  display:inline-block; margin-left:8px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px; line-height:1.35; color:var(--fmc-sp-muted); white-space:nowrap;
}
#fmc-search .fmc-search-row-url{
  display:block; margin-top:4px;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px; line-height:1.35; color:var(--fmc-sp-accent);
  overflow-wrap:anywhere; word-break:break-all;
}
@media (prefers-reduced-motion: reduce){
  #fmc-search, #fmc-search .fmc-search-panel{transition:none}
}
/* 回到顶部：全站唯一浮钮。只用 design tokens，不再写死颜色/描边。 */
.fmc-film-top {
  position: fixed;
  inset: auto max(var(--sp-4), env(safe-area-inset-right)) max(var(--sp-4), env(safe-area-inset-bottom)) auto;
  z-index: 35;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: var(--sp-12);           /* 44px */
  height: var(--sp-12);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--card) 78%, transparent);
  color: var(--ink);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  box-shadow: 0 8px 26px color-mix(in srgb, #000 14%, transparent),
              inset 0 1px 0 color-mix(in srgb, #fff 45%, transparent);
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out),
              background-color var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
}
.fmc-film-top:not([hidden]) { opacity: 1; transform: none; }
@starting-style {
  .fmc-film-top:not([hidden]) { opacity: 0; transform: translateY(4px) scale(.96); }
}
.fmc-film-top[hidden],
body:has(.fm-sheet:not([hidden]), dialog[open]) .fmc-film-top { display: none !important; }
.fmc-film-top svg { display: block; width: 18px; height: 18px; transition: transform var(--dur-2) var(--ease-out); }
.fmc-film-top:hover {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: 0 12px 34px color-mix(in srgb, #000 18%, transparent),
              inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
}
.fmc-film-top:hover svg { transform: translateY(-1px); }
.fmc-film-top:active { transform: scale(.96); }
.fmc-film-top:focus-visible {
  outline: 2px solid var(--fm-action, #0071e3);
  outline-offset: 2px;
}
.fmc-film-top { bottom: max(var(--sp-4), env(safe-area-inset-bottom), var(--fmc-player-clearance, 0px)); }

/* 2026-12-03 用户定：Press kit 那种中性半透明的回到顶部按钮全站统一。
   历史/电视报页只加载本文件（没有 fmc-film-top.css），所以这套覆盖在这里也要有一份。
   appearance-logo.css 给所有 button 上了蓝色 !important，这里用更高特异性压掉。 */
html:root body .fmc-film-top{
  color: var(--color-ink, var(--fm-ink, var(--ink, #1d1d1f))) !important;
  background: color-mix(in srgb, var(--color-surface, var(--fm-surface, var(--card, #f5f5f7))) 72%, transparent) !important;
  border-color: color-mix(in srgb, var(--color-ink, var(--fm-ink, var(--ink, #1d1d1f))) 12%, transparent) !important;
  outline-color: currentColor !important;
}
html:root body .fmc-film-top:hover{
  background: color-mix(in srgb, var(--color-surface, var(--fm-surface, var(--card, #f5f5f7))) 90%, transparent) !important;
}
html:root body .fmc-film-top:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--color-ink, var(--fm-ink, var(--ink, #1d1d1f))) 38%, transparent) !important;
  outline-offset: 2px;
}


/* 2026-12-03 用户定：三个一级页左上角挂栏目名（照 Apple TV 切换栏目的那种标题）。
   机构 / 历史 压在内容上，不占版面；电视报单独一行占位。只在一级页出现，进入下一层就没有。
   字色（2026-12-03 用户再定）：机构、历史始终白字（标题压在海报/照片上，白天黑夜都一样）；
   电视报单独一行、是浅色底，白天黑字、夜间白字。 */
.fmc-page-title{
  margin: 0;
  display: flex;
  align-items: center;
  height: calc(env(safe-area-inset-top) + 56px);
  padding: 0 max(20px, env(safe-area-inset-left));
  box-sizing: border-box;
  text-align: left;
  font: 700 34px/1.1 -apple-system, "FMC Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  letter-spacing: -.02em;
  color: #fff;
  pointer-events: none;
  background: none;
  outline: none;
  border: 0;
  box-shadow: none;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .45);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
/* 只有电视报在白天改成黑字；机构 / 历史 保持白字 */
html[data-theme="day"] body.fmc-separators-tv .fmc-page-title{ color: #1d1d1f; text-shadow: none; }
.fmc-page-title--overlay{ position: absolute; left: 0; right: 0; top: 0; z-index: 6; }
.fmc-page-title--row{ position: relative; z-index: 6; }
@media (max-width: 640px), (pointer: coarse){
  .fmc-page-title{ height: calc(env(safe-area-inset-top) + 52px); font-size: 30px; }
}

/* 2026-12-03 用户定：Mac 不要这行栏目名。
   它在触屏上有存在的理由（导航在底部，需要一个标题告诉你现在在哪）；
   桌面顶栏一眼就能看到当前位置，这行字只会压住 FMC 标、挡住首屏，
   而且点两下同页导航还会让它重新冒出来。桌面直接不渲染它的位置。 */
@media (min-width: 641px) and (pointer: fine){
  .fmc-page-title{ display: none !important; }
}

/* 2026-12-03：桌面顶栏补进来的两项（RSS / 搜索）。
   RSS 是链接，直接吃 .edition-links a 的样式；搜索必须是 <button>（动作不是跳转），
   而站内有两套规则会把它做坏：
     · appearance-logo.css 把所有 button 染成动作蓝；
     · footer.css 只给 `header .edition-nav-inner :is(.edition-links a, …)` 定字号（12px !important），
       button 不在名单里，于是它按 body 的 17px 长出来，比旁边几个链接大一截。
   所以这里把链接那套值原样搬到按钮上（含 !important，与 footer.css 同级）。 */
@media (min-width: 641px) and (pointer: fine){
  header.site-header nav.edition-links .fmc-nav-search,
  header.edition-header nav.edition-links .fmc-nav-search{
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "FMC Sans SC", "PingFang SC", system-ui, sans-serif;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    letter-spacing: normal !important;
    color: var(--fm-ink) !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    cursor: pointer;
  }
  /* 首页是深底 + 米白字（home-wall 那条 :is(a,span) 覆盖不到 button，这里补上同名口径） */
  html:root:has(body.fmc-separators-home) header.edition-header nav.edition-links .fmc-nav-search{
    color: #f8f5ee !important;
  }
  header.site-header nav.edition-links .fmc-nav-search:hover,
  header.edition-header nav.edition-links .fmc-nav-search:hover,
  html:root:has(body.fmc-separators-home) header.edition-header nav.edition-links .fmc-nav-search:hover{
    color: var(--fm-action) !important;
    text-decoration: underline !important;
    text-underline-offset: .4em;
  }
}

/* 2026-12-03：桌面阅读页（原本没有站点顶栏）补的顶栏。
   只用 fmc-tabbar.css 里已有的令牌，不依赖 site.css / edition-nav-logo.css（阅读页没加载它们）。 */
.fmc-reader-bar { display: none; }
@media (min-width: 641px) and (pointer: fine){
  .fmc-reader-bar{
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
    padding: 14px clamp(20px, 4vw, 48px);
    background: var(--fm-canvas, #fbfbfd);
    border-bottom: 1px solid var(--fm-line, rgba(0, 0, 0, .1));
  }
  .fmc-reader-mark{ display: inline-flex; flex: none; text-decoration: none !important; }
  /* 2026-12-03 用户报：RSS 页左上角 FMC 标变形。给的是固定 26×26，图本身不是 1:1 时会被拉扁，
     统一用 object-fit: contain 锁比例（任何版本的标都不会再变形）。 */
  .fmc-reader-mark img{ display: block; width: 26px; height: 26px; object-fit: contain; }
  .fmc-reader-nav{ display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
  .fmc-reader-nav a,
  .fmc-reader-search{
    -webkit-appearance: none;
    appearance: none;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35;
    letter-spacing: normal;
    color: var(--fm-ink, #1d1d1f) !important;
    text-decoration: none !important;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .fmc-reader-nav a[aria-current="page"]{ color: var(--fm-action, #0071e3) !important; }
  .fmc-reader-nav a:hover,
  .fmc-reader-search:hover{ color: var(--fm-action, #0071e3) !important; }
  /* 有顶栏就让底栏让位（和其它页面同一条规则） */
  body.fmc-has-reader-bar #fmc-tabbar{ display: none !important; }
}

/* ==========================================================================
   2026-12-03 · Mac 上的 RSS 三栏阅读器（参考 Reader Classic）
   左：订阅源 ｜ 中：标题列表（无摘要、无题图）｜ 右：正文（最宽）
   只在 (min-width:1024px) and (pointer:fine) 生效；窄窗与触屏保持原来的卡片列表。
   ========================================================================== */
@media (min-width: 1024px) and (pointer: fine){
  .fmc-3col{
    display: grid;
    grid-template-columns: 240px 400px minmax(0, 1fr);
    align-items: stretch;
    height: calc(100dvh - 64px);
    max-width: none;
    margin: 0;
    border-top: 1px solid var(--fm-line, rgba(0, 0, 0, .08));
  }
  .fmc-3col > *{ min-height: 0; }

  /* 左：订阅源 */
  .fmc-3col-src{
    overflow-y: auto;
    padding: 18px 12px 33px 20px;
    border-right: 1px solid var(--fm-line, rgba(0, 0, 0, .08));
  }
  .fmc-3col-src-item{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 6px 10px;
    margin: 0 0 2px;
    border: 0 !important;
    border-radius: 8px !important;
    background: none !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.4;
    color: var(--fm-ink, #1d1d1f) !important;
    text-align: left;
    cursor: pointer;
  }
  .fmc-3col-src-item span{ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .fmc-3col-src-item b{ flex: none; font-weight: 400; font-size: 11.5px; color: var(--fm-muted, #86868b); }
  .fmc-3col-src-item:hover{ background: rgba(0, 0, 0, .045) !important; }
  .fmc-3col-src-item[aria-current]{
    background: color-mix(in srgb, var(--fm-action, #0071e3) 10%, transparent) !important;
    color: var(--fm-action, #0071e3) !important;
    font-weight: 500 !important;
  }

  /* 中：标题列表——去掉题图与摘要 */
  .fmc-3col-list{
    overflow-y: auto;
    padding: 10px 8px 40px;
    border-right: 1px solid var(--fm-line, rgba(0, 0, 0, .08));
  }
  .fmc-3col-list .fmc-list{ display: block; }
  .fmc-3col-list .fmc-item{
    display: block;
    padding: 12px 12px 13px;
    margin: 0 0 2px;
    border-radius: 10px;
    background: none !important;
    box-shadow: none !important;
  }
  .fmc-3col-list .fmc-thumb,
  .fmc-3col-list .fmc-snippet{ display: none !important; }
  .fmc-3col-list .fmc-title{
    display: block;
    margin: 2px 0 0;
    font-size: 14.5px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--fm-ink, #1d1d1f);
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .fmc-3col-list .fmc-head{ display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fm-muted, #86868b); }
  .fmc-3col-list .fmc-avatar-img{ width: 16px; height: 16px; }
  .fmc-3col-list .fmc-item:hover{ background: rgba(0, 0, 0, .04) !important; }
  .fmc-3col-list .fmc-item[aria-current]{
    background: color-mix(in srgb, var(--fm-action, #0071e3) 9%, transparent) !important;
  }
  .fmc-3col-list .fmc-item[aria-current] .fmc-title{ color: var(--fm-action, #0071e3); }

  /* 右：正文（同源注入，跟着页面主题走；不再是 iframe 的独立文档） */
  .fmc-3col-body{ overflow-y: auto; background: transparent; }
  .fmc-3col-article{
    max-width: 760px;
    margin: 0 auto;
    padding: 32px clamp(24px, 4vw, 56px) 80px;
    font-size: 17px;
    line-height: 1.75;
    color: inherit;
  }
  .fmc-3col-article img{ max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 20px 0; }
  .fmc-3col-article h1{ font-size: clamp(24px, 2vw, 30px); line-height: 1.25; margin: 0 0 12px; }
  .fmc-3col-article > p:first-of-type{ color: var(--fm-muted, #86868b); }
  .fmc-3col-article a{ color: var(--fm-action, #0071e3); }
  .fmc-3col-err{ color: var(--fm-muted, #86868b); }
  .fmc-3col-article[aria-busy="true"]{ opacity: .5; }
}

/* 2026-12-03：三栏阅读器要吃掉整个窗口（站内 main 的 980 版心会把右栏挤窄），
   有 .fmc-3col 时把 main 的版心与内边距一起去掉。 */
@media (min-width: 1024px) and (pointer: fine){
  body:has(.fmc-3col) main.fmc-read{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* 2026-12-03 用户定：桌面打开搜索时，遮罩不要盖住顶部导航条。
   导航保持可见、可点，搜索按钮就是开关（fmc-tabbar.js 打开时把顶栏实际底边写进
   --fmc-search-top；顶栏已滚出屏幕时该值为 0，退化为原来的全屏遮罩）。 */
@media (pointer: fine) and (min-width: 641px) {
  #fmc-search { top: var(--fmc-search-top, 0px); }
  #fmc-search .fmc-search-panel {
    max-height: calc(var(--fmc-search-vh, 100dvh) - 64px - var(--fmc-search-top, 0px));
  }
}
