/* ============================================================
   SteamDM v10「发行情报台」Release Intelligence

   定位：给游戏决策者看的发行情报终端，不是仪表盘，不是卡片墙。
   判断依据：oil-frontend（列表/表格/详情的信息与状态归属）
            + taste-skill（反 AI 默认：去卡片、克制的强调色、eyebrow 节制）
            + 本项目的独立判断：数据的密度与比较效率优先于装饰。

   四条硬规则：
   1. 用 hairline 和留白分组，不用"盒子"包一切。只有浮层（悬浮卡/tooltip/弹窗）
      和真正的分栏才允许背景+边框。
   2. 数字是主角：等宽、紧凑字距、足够大；标签是配角：10.5px、弱色、拉开字距。
   3. 一个强调色（冷青蓝），只用于交互与选中。语义色只出现在数字上。
   4. 动效只承担反馈：hover 变背景、active 微下沉、加载骨架。无装饰动效。

   图片：横版 2.14:1（header 原生）／竖版 2:3（library_600x900 原生），
         一律 object-fit:cover 撑满，画幅角色对齐源图比例，零裁剪损失。
   字体：系统栈（中文 webfont 体积不可接受，且外置字体在大陆加载慢）。
   ============================================================ */

:root {
  /* 表面: 深墨蓝黑，不用纯黑（纯黑在 OLED 上会"跳"） */
  --bg:        #0a0d11;
  --surface:   #0f141b;
  --surface-2: #151d27;
  --line:      #1e2732;
  --line-soft: #171e28;

  /* 文字三级。--t3 是"弱"层级的最小可读值，不能再暗：
     实测 #59677a 在页面底色上只有 3.42:1，低于 WCAG AA 4.5:1（taste-skill 4.5 硬性要求）。
     #6d7b8e 在 --bg 上是 4.72:1、在 --surface 上是 4.54:1，刚好过线且仍明显弱于 --t2。 */
  --t1: #e6ebf2;
  --t2: #8d9aab;
  --t3: #6d7b8e;

  /* 强调：冷青蓝。比通用"AI 蓝"更冷更精确，与 Steam 的 #66c0f4 同源但独立 */
  --acc:      #4fb3d1;
  --acc-hi:   #6ec6e0;
  --acc-dim:  rgba(79, 179, 209, 0.12);
  --acc-line: rgba(79, 179, 209, 0.4);

  /* 语义：只用于数据。涨红跌绿是中文数据惯例，不套西方习惯 */
  --up:   #e0685f;
  --down: #4aa87a;
  --warn: #d3a04a;
  --good: #4aa87a;
  --bad:  #e0685f;

  /* 字体 */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Consolas, monospace;

  /* 刻度：4px 基准 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;

  /* 圆角：数据终端要"精确感"，几乎方。浮层才放宽 */
  --r1: 2px; --r2: 4px; --r3: 6px;

  --topbar-h: 52px;
  --wrap: 1400px;
  --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.55);
  --ease: 130ms ease-out;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--t1);
  background: var(--bg);
  min-height: 100dvh;
  padding-bottom: var(--s8);
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(79, 179, 209, 0.3); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #242e3b; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #33404f; }

a { color: var(--acc); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--acc-hi); }
img { display: block; }
button { font-family: inherit; font-size: inherit; }

/* 数字：等宽 + 紧凑，纵向比较时不跳动 */
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; font-feature-settings: "tnum" 1; }

/* ---------- 布局 ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s6); }

.page-head { padding: var(--s7) 0 var(--s5); }
.h-page { font-size: 25px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.page-sub { font-size: 12.5px; color: var(--t3); margin-top: var(--s1); }
/* 标签简介：比 page-sub 稍大且放宽行高，两句并排时可读性优先；宽度收住避免长行 */
.tag-desc { font-size: 13px; line-height: 1.65; color: var(--t2); margin-top: var(--s2); max-width: 62ch; }
.count { font-size: 12px; font-weight: 400; color: var(--t3); margin-left: var(--s2); }

/* 区块：上边线 + 留白，不用盒子 */
.section { border-top: 1px solid var(--line); padding-top: var(--s5); margin-top: var(--s7); }
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s4);
}
.h-sec { font-size: 13.5px; font-weight: 650; letter-spacing: -0.005em; }
.sec-more { font-size: 11.5px; color: var(--t3); white-space: nowrap; }
.sec-more:hover { color: var(--acc); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100; height: var(--topbar-h);
  background: rgba(10, 13, 17, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s6); }
/* 语言控件是顶栏第三项：把剩余空间全推给导航的左外边距，
   导航与语言就贴着右侧，顶栏不会因为多一项而变成三段居中 */
.topbar-nav { margin-left: auto; }
.brand { display: flex; align-items: center; gap: var(--s2); user-select: none; color: inherit; flex: none; }
.brand-logo { height: 19px; width: auto; }
.brand-divider { width: 1px; height: 14px; background: var(--line); }
.brand-text { font-size: 13.5px; font-weight: 650; letter-spacing: 0.005em; }
.topbar-nav { display: flex; gap: var(--s6); height: 100%; }
.topbar-nav a {
  display: flex; align-items: center; height: 100%;
  font-size: 12.5px; color: var(--t2);
  border-bottom: 1px solid transparent; margin-bottom: -1px;
  transition: color var(--ease), border-color var(--ease);
}
.topbar-nav a:hover { color: var(--t1); }
.topbar-nav a.active { color: var(--t1); font-weight: 600; border-bottom-color: var(--acc); }
/* 语言切换：三语言改下拉（9-2）。select 透明底融入顶栏，只留 hairline 描边，
   字体与顶栏一致；v10 不给背景盒子，这里仅控件本身的极简边框。 */
.topbar-lang { display: flex; align-items: center; gap: var(--s3); flex: none; font-size: 11.5px; }
.topbar-lang .lang-sel {
  appearance: none; -webkit-appearance: none;
  background: transparent; color: var(--t1);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 22px 4px 10px; font: inherit; font-weight: 600; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--t3) 50%),
                    linear-gradient(135deg, var(--t3) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 8px) 55%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.topbar-lang .lang-sel:hover { border-color: var(--t3); }
.topbar-lang .lang-sel option { background: var(--bg, #12161d); color: var(--t1, #e8ecf1); }
.topbar-lang a { color: var(--t3); transition: color var(--ease); }
.topbar-lang a:hover { color: var(--t1); }

/* ---------- 指标行：hairline 分隔，不做卡片 ---------- */
.metrics { display: flex; flex-wrap: wrap; }
.metric {
  flex: 1 1 0; min-width: 132px;
  padding: 0 var(--s5);
  border-left: 1px solid var(--line);
}
.metric:first-child { padding-left: 0; border-left: none; }
.metric-label { font-size: 10.5px; color: var(--t3); letter-spacing: 0.055em; line-height: 1.4; }
.metric-value { font-size: 27px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-top: var(--s1); }
.metric-sub { font-size: 11px; color: var(--t3); margin-top: 3px; }

/* ---------- 数据表 ---------- */
.dt { width: 100%; border-collapse: collapse; }
.dt th {
  position: sticky; top: var(--topbar-h); z-index: 2;
  background: var(--bg);
  text-align: left; font-size: 10.5px; font-weight: 500; color: var(--t3);
  letter-spacing: 0.05em; padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap; user-select: none;
}
.dt th.n { text-align: right; }
.dt th.sortable { cursor: pointer; }
.dt th.sortable:hover { color: var(--t2); }
.dt th.sorted { color: var(--acc); }
.dt td {
  padding: 8px var(--s3); font-size: 12.5px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.dt td.n { text-align: right; }
.dt tbody tr { transition: background var(--ease); }
.dt tbody tr:hover { background: var(--surface); }
/* 整行可点开详情的表格：pointer 由表格共享样式负责，
   不在页面逐个写 inline style（oil-frontend：页面不得给共享组件补样式） */
.dt tbody tr[data-appid] { cursor: pointer; }
.dt .rank { width: 30px; color: var(--t3); font-family: var(--mono); font-size: 11px; padding-right: 0; }

/* 游戏身份单元：缩略图 + 名称 + 一个区分字段（全站唯一实现） */
.gid { display: flex; align-items: center; gap: var(--s3); min-width: 0; max-width: 400px; }
.gid-thumb {
  flex: 0 0 80px; width: 80px; height: 37px; object-fit: cover;
  border-radius: var(--r1); background: var(--surface-2);
}
.gid-main { min-width: 0; }
.gid-name {
  font-size: 12.5px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.gid-name:hover { color: var(--acc); }
.gid-sub { font-size: 11px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 竖版封面（2:3 = library_600x900 原生比例） */
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: var(--r2); overflow: hidden; background: var(--surface-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 语义色：只落在数字上 ---------- */
.pos { color: var(--up); } .neg { color: var(--down); } .flat { color: var(--t3); }
.rate-hi { color: var(--good); } .rate-mid { color: var(--warn); } .rate-lo { color: var(--bad); }

/* ---------- 芯片 ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; padding: 2px 8px; border-radius: var(--r2);
  border: 1px solid transparent; white-space: nowrap;
}
.chip-line { border-color: var(--line); color: var(--t2); }
.chip-line:hover { border-color: var(--acc-line); color: var(--t1); }

/* ---------- 控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 var(--s4); border-radius: var(--r2);
  border: 1px solid var(--acc); background: var(--acc); color: #06131a;
  font-size: 12.5px; font-weight: 650; cursor: pointer; white-space: nowrap;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:hover { background: var(--acc-hi); border-color: var(--acc-hi); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
/* 内嵌在空状态/失败提示里的小按钮。此前三处各自写 inline 的 height/padding，
   属于针对单个实例的视觉补丁，收归为按用途命名的变体 */
.btn-sm { height: 26px; padding: 0 10px; font-size: 11.5px; }
/* 可勾选的筛选芯片（label 包 checkbox）。按用途命名而非按位置命名：
   .chip-line 也用于纯展示标签，那些不该显示 pointer */
.chip-toggle { cursor: pointer; }
.chip-toggle:hover { border-color: var(--line); color: var(--t1); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--t2); font-weight: 500; }
.btn-ghost:hover { background: var(--surface); color: var(--t1); border-color: var(--line); }

.input {
  height: 30px; width: 100%; padding: 0 var(--s3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);
  color: var(--t1); font-size: 12.5px; outline: none;
  transition: border-color var(--ease), background var(--ease);
}
.input::placeholder { color: var(--t3); }
.input:hover { border-color: var(--line); }
.input:focus { border-color: var(--acc-line); background: var(--bg); }
select.input { width: auto; cursor: pointer; padding-right: var(--s2); }

.tabs { display: inline-flex; gap: var(--s1); }
.tab {
  height: 26px; padding: 0 var(--s3); border: 1px solid transparent; border-radius: var(--r2);
  background: transparent; color: var(--t3); font-size: 12px; cursor: pointer;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}
.tab:hover { color: var(--t1); }
.tab.active { background: var(--surface-2); border-color: var(--line); color: var(--t1); font-weight: 600; }

.pager { display: flex; align-items: center; justify-content: center; gap: var(--s1); margin-top: var(--s5); }
.pg {
  min-width: 28px; height: 28px; padding: 0 var(--s2);
  border: 1px solid var(--line); border-radius: var(--r2); background: transparent;
  color: var(--t2); font-size: 12px; cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.pg:hover:not(:disabled) { background: var(--surface); color: var(--t1); border-color: var(--line); }
.pg.cur { background: var(--acc); border-color: var(--acc); color: #06131a; font-weight: 650; }
.pg:disabled { opacity: 0.3; cursor: default; }
.pg-info { font-size: 11.5px; color: var(--t3); margin: 0 var(--s2); }

/* ---------- 首页：主榜 + 侧栏（2:1 非对称，不是四等分卡片） ---------- */
.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: var(--s7); margin-top: var(--s6); }

.rank-list { display: flex; flex-direction: column; }
.rank-row {
  display: grid; grid-template-columns: 18px 80px minmax(0, 1fr) auto;
  align-items: center; gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--ease);
}
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--surface); }
/* 榜单截断说明：列表只展示前 N 条时交代总数，不能让"12"冒充命中总数。
   入口不在这里重复——标题右侧的"全部命中"已经承担跳转 */
.rank-foot {
  padding-top: var(--s3); margin-top: var(--s1); font-size: 11.5px; color: var(--t3);
  border-top: 1px solid var(--line-soft);
}
.rank-no { font-family: var(--mono); font-size: 11px; color: var(--t3); text-align: right; }
.rank-no.top { color: var(--acc); font-weight: 650; }
.rank-thumb {
  width: 80px; height: 37px; object-fit: cover;
  border-radius: var(--r1); background: var(--surface-2);
}
.rank-body { min-width: 0; }
.rank-name {
  font-size: 12.5px; font-weight: 600; color: var(--t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-name a { color: inherit; }
.rank-name a:hover { color: var(--acc); }
.rank-meta { font-size: 11px; color: var(--t3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-val { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.rank-val .v1 { font-size: 13px; font-weight: 650; letter-spacing: -0.02em; }
.rank-val .v2 { font-size: 10.5px; color: var(--t3); margin-top: 2px; }

/* 新收录流：紧凑行，无缩略图槽时也能站住 */
.feed-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center; gap: var(--s3);
  padding: var(--s2) 0; border-bottom: 1px solid var(--line-soft);
  transition: background var(--ease);
}
.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: var(--surface); }
.feed-thumb { width: 56px; height: 26px; object-fit: cover; border-radius: var(--r1); background: var(--surface-2); }
.feed-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-name a { color: inherit; }
.feed-name a:hover { color: var(--acc); }
.feed-date { font-size: 11px; color: var(--t3); font-family: var(--mono); white-space: nowrap; }

/* ---------- 悬浮卡 ---------- */
#hover-card {
  position: fixed; z-index: 200; width: 300px; display: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3);
  box-shadow: var(--shadow-pop); overflow: hidden; pointer-events: none;
}
#hover-card.show { display: block; }
.hc-thumb { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; background: var(--surface-2); }
.hc-body { padding: var(--s3) var(--s4) var(--s4); }
.hc-name { font-size: 13px; font-weight: 650; line-height: 1.35; }
.hc-rows { margin-top: var(--s2); display: grid; grid-template-columns: 1fr 1fr; gap: 3px var(--s3); }
.hc-row { display: flex; justify-content: space-between; font-size: 11.5px; }
.hc-row .k { color: var(--t3); }
.hc-row .v { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hc-tags { margin-top: var(--s2); display: flex; flex-wrap: wrap; gap: 3px; }

/* ---------- 日历 ---------- */
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--s2); margin-bottom: var(--s2); }
.cal-weekdays div { font-size: 10.5px; color: var(--t3); letter-spacing: 0.05em; text-align: center; padding: var(--s1) 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--s2); }
.cal-cell { position: relative; border-radius: var(--r2); overflow: hidden; aspect-ratio: 2 / 3; }
.cal-cell.out { visibility: hidden; }
.cal-game { display: block; position: absolute; inset: 0; }
.cal-media { position: absolute; inset: 0; background: var(--surface-2); }
.cal-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease-out; }
.cal-cell:hover .cal-media img { transform: scale(1.04); }
.cal-shade {
  position: absolute; inset: auto 0 0 0; height: 66%;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 9, 13, 0.55) 42%, rgba(6, 9, 13, 0.94) 100%);
}
.cal-info { position: absolute; inset: auto 0 0 0; padding: var(--s2) var(--s3) var(--s3); }
.cal-name { font-size: 12px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-fol { font-size: 10.5px; color: #aab6c6; font-family: var(--mono); font-variant-numeric: tabular-nums; margin-top: 2px; }
.cal-daynum {
  position: absolute; top: var(--s2); left: var(--s2); z-index: 2;
  font-size: 10.5px; font-weight: 650; color: #cfd8e4; font-family: var(--mono);
  background: rgba(10, 13, 17, 0.7); border-radius: var(--r1); padding: 1px 6px;
}
.cal-count {
  position: absolute; top: var(--s2); right: var(--s2); z-index: 2;
  font-size: 10.5px; color: #a6b2c2; background: rgba(10, 13, 17, 0.7);
  border-radius: var(--r1); padding: 1px 6px; font-family: var(--mono);
}
.cal-cell.today { outline: 1px solid var(--acc); outline-offset: -1px; }
.cal-empty { background: var(--surface); border: 1px dashed var(--line); }
.cal-monthbar { display: flex; gap: var(--s1); flex-wrap: wrap; margin: var(--s4) 0; }

/* ---------- 标签页 ---------- */
.tg-layout { display: grid; grid-template-columns: 186px 1fr; gap: var(--s7); align-items: start; }
.tg-side { position: sticky; top: calc(var(--topbar-h) + var(--s5)); display: flex; flex-direction: column; gap: 1px; }
.tg-side a {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2);
  padding: 4px var(--s3); border-radius: var(--r2); font-size: 12px; color: var(--t2);
  transition: background var(--ease), color var(--ease);
}
.tg-side a:hover { background: var(--surface); color: var(--t1); }
.tg-side a.active { background: var(--acc-dim); color: var(--acc); font-weight: 600; }
.tg-side .c { font-family: var(--mono); font-size: 10.5px; color: var(--t3); }
.tg-sec { scroll-margin-top: calc(var(--topbar-h) + var(--s6)); margin-bottom: var(--s7); }
.tg-sec h2 { font-size: 13.5px; font-weight: 650; margin-bottom: var(--s3); }
.tg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s1) var(--s3); }
.tg-item {
  display: flex; align-items: center; gap: var(--s2);
  padding: 5px var(--s2); border-radius: var(--r2);
  font-size: 12.5px; color: var(--t1);
  transition: background var(--ease);
}
.tg-item:hover { background: var(--surface); }
.tg-item .dot { width: 6px; height: 6px; border-radius: 1px; flex: none; }
.tg-item .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-item .n { font-family: var(--mono); font-size: 10.5px; color: var(--t3); }

/* ---------- 详情页 ---------- */
.gd-head { display: grid; grid-template-columns: 210px 1fr; gap: var(--s7); padding-top: var(--s7); align-items: start; }
.gd-cover { position: relative; aspect-ratio: 2 / 3; border-radius: var(--r3); overflow: hidden; background: var(--surface-2); }
.gd-cover img { position: relative; width: 100%; height: 100%; object-fit: cover; }

/* 竖框用图（日历格 / 详情页封面）：优先原生竖版封面 2:3 撑满；
   约 1/3 的游戏 Valve 侧没有竖版封面，回退横图时必须完整缩放（contain），
   cover 会裁掉横图约 70% 画面、主体与标题全丢。留白用同图模糊打底补掉。 */
.cal-media, .gd-cover { background-repeat: no-repeat; background-position: center; background-size: cover; }
/* 8-31 枫指示：去掉 ::before 模糊打底。以前就是它让横图格看上去糊。
   横图都走 cover，撑满 2:3，主体居中保留，两侧裁掉但仍可读；
   is-wide 仍留作 JS 标记，CSS 不再特殊处理（默认即 cover，与 portrait 一致）。 */
.cal-media.is-wide img, .gd-cover.is-wide img { object-fit: cover; }
.gd-title { font-size: 25px; font-weight: 650; line-height: 1.25; letter-spacing: -0.02em; }
.gd-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s3); font-size: 12.5px; color: var(--t2); }
.gd-meta .k { color: var(--t3); margin-right: 6px; }
/* 开发商/发行商是进入厂商页的入口，做成可点但要克制：
   常态与正文同色，hover 才出现强调色下划线 */
.gd-meta a { color: var(--t2); border-bottom: 1px solid transparent; }
.gd-meta a:hover { color: var(--acc); border-bottom-color: var(--acc); }
.gd-meta .sep { color: var(--t3); }
.gd-actions { margin-top: var(--s4); display: flex; gap: var(--s2); }
.gd-tags { margin-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s1); }

/* 详情页指标：同样用 hairline 行，不做 6 个盒子 */
.gd-metrics { display: flex; flex-wrap: wrap; margin-top: var(--s6); }
.gd-metrics .metric { flex: 1 1 0; min-width: 116px; }
.gd-metrics .metric-value { font-size: 23px; }

.chart-box { position: relative; }
.chart-box canvas { width: 100%; display: block; border-radius: var(--r2); }
.chart-tip {
  position: absolute; z-index: 5; display: none; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2);
  padding: 4px 8px; font-size: 11px; white-space: nowrap; box-shadow: var(--shadow-pop);
}
.chart-tip .d { color: var(--t3); } .chart-tip .v { font-family: var(--mono); font-weight: 650; }
.chart-2col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); margin-top: var(--s7); }
.chart-empty { padding: var(--s6) 0; text-align: center; font-size: 12px; color: var(--t3); }

.dlc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.dlc-item { display: flex; gap: var(--s3); align-items: center; padding: var(--s2); border-radius: var(--r2); transition: background var(--ease); }
.dlc-item:hover { background: var(--surface); }
.dlc-item img { width: 80px; height: 37px; object-fit: cover; border-radius: var(--r1); background: var(--surface-2); flex: none; }
.dlc-item .dn { font-size: 12px; font-weight: 600; line-height: 1.3; }
.dlc-item .dd { font-size: 10.5px; color: var(--t3); margin-top: 2px; }

/* ---------- 关注数库 ---------- */
.fl-search { display: flex; gap: var(--s2); max-width: 460px; }
.fl-detail { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line-soft); }
.fl-detail .gid { max-width: none; margin-bottom: var(--s4); }
.fl-detail .gid-thumb { flex-basis: 120px; width: 120px; height: 56px; }
.fl-detail .gid-name { font-size: 16px; }

/* ---------- 状态 ---------- */
.empty { text-align: center; color: var(--t3); padding: var(--s8) 0; font-size: 12.5px; }
/* 加载失败：与"暂无数据"必须能区分，否则用户会以为筛选结果真的是空的 */
.loaderr { color: var(--bad); }
.loaderr button { margin-left: var(--s2); }
.skel { position: relative; overflow: hidden; background: var(--surface); border-radius: var(--r1); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: skel 1.4s infinite;
}
@keyframes skel { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 3px 0 10px;
  background: var(--acc-dim); color: var(--acc); border-radius: var(--r2); font-size: 11.5px;
}
.filter-chip button {
  border: none; background: transparent; color: var(--acc); cursor: pointer;
  width: 16px; height: 16px; border-radius: 50%; font-size: 12px; line-height: 1;
}
.filter-chip button:hover { background: rgba(79, 179, 209, 0.22); }

.toolbar { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.toolbar .spacer { flex: 1; }

/* ---------- 后台 ---------- */
.adm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); margin-top: var(--s5); }
.adm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); margin-top: var(--s7); }
.adm-panel { padding-top: var(--s4); border-top: 1px solid var(--line); }
.adm-panel h3 { font-size: 10.5px; color: var(--t3); letter-spacing: 0.055em; margin-bottom: var(--s3); }
.adm-kv { display: flex; justify-content: space-between; gap: var(--s4); padding: 4px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.adm-kv:last-child { border-bottom: none; }
.adm-kv .k { color: var(--t2); }
.adm-kv .v { font-weight: 650; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.adm-big { font-size: 28px; font-weight: 600; font-family: var(--mono); letter-spacing: -0.025em; }
.adm-big small { font-size: 11.5px; font-weight: 400; color: var(--t3); margin-left: 6px; font-family: var(--sans); }
.adm-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: var(--s3); background: var(--surface-2); }
.adm-legend { display: flex; gap: var(--s4); margin-top: var(--s2); font-size: 11px; color: var(--t3); flex-wrap: wrap; }
.adm-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 1px; margin-right: 5px; }
.adm-note { margin-top: var(--s1); font-size: 10.5px; color: var(--t3); }
.dot-ok { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); margin-right: 7px; }
.dot-bad { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bad); margin-right: 7px; }
.adm-head { display: flex; align-items: center; gap: var(--s2); }

/* 密码门 */
.gate-mask { position: fixed; inset: 0; z-index: 999; background: rgba(6, 9, 13, 0.8); display: grid; place-items: center; }
.gate-box {
  width: 288px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r3); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3);
  box-shadow: var(--shadow-pop);
}
.gate-box h4 { font-size: 13px; font-weight: 650; text-align: center; }
.gate-err { font-size: 11.5px; color: var(--bad); text-align: center; min-height: 16px; }

/* ---------- 无障碍：尊重系统的减少动效偏好（taste-skill 6.B） ----------
   本页 MOTION_INTENSITY=3 本就只有 hover/active/骨架屏，但仍显式兜底：
   骨架屏的无限 shimmer 与日历封面缩放都应停。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .cal-cell:hover .cal-media img { transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .tg-grid { grid-template-columns: repeat(2, 1fr); }
  .dlc-grid { grid-template-columns: repeat(3, 1fr); }
  .gd-metrics .metric { min-width: 104px; }
}
@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; gap: var(--s7); }
  .chart-2col { grid-template-columns: 1fr; gap: var(--s6); }
  .tg-layout { grid-template-columns: 1fr; }
  .tg-side { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--s1); }
  .gd-head { grid-template-columns: 160px 1fr; gap: var(--s5); }
  .adm-cols { grid-template-columns: 1fr; }
  .adm-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 var(--s4); }
  .metrics { gap: var(--s4) 0; }
  .metric { flex: 0 0 50%; min-width: 0; padding-left: var(--s4); }
  .metric:nth-child(odd) { padding-left: 0; border-left: none; }
  .dt .opt-hide { display: none; }
  .cal-grid { grid-template-columns: repeat(4, 1fr); }
  .topbar-nav { gap: var(--s4); }
}
@media (max-width: 560px) {
  .cal-grid { grid-template-columns: repeat(2, 1fr); }
  .adm-grid { grid-template-columns: 1fr; }
  .gd-head { grid-template-columns: 1fr; }
  .gd-cover { max-width: 180px; }
  /* 窄屏顶栏留给导航的空间有限：语言下拉收紧内边距 */
  .topbar-lang .lang-sel { padding: 3px 18px 3px 8px; }
}
