/* ==========================================================================
   全站外壳统一规范 · site-shell.css  v4
   --------------------------------------------------------------------------
   基准：顶部导航内容宽度 1144px（1440 视口下左右各 148px）
   原则：
     1) 所有内容型页面与导航左右对齐；
     2) 页面标题统一字号/字重/下划线（字体沿用站点 .site-display 规范）；
     3) 只动"外壳"，不动游戏画布内部；
     4) 全部为覆盖规则，不改原 CSS，便于整体回滚。

   v2 变更：
     - 新增第 5 节：电台页默认配色由"青绿"改为站点蓝，并修正深底上的文字对比度；
     - 新增第 6 节：明确豁免清单（工具页 / 小游戏内页不做外壳化）。
   v3 变更：
     - 电台页配色实际由 radio.js 的内联样式驱动，第 5 节改为与 JS 色板对齐的兜底值。
   v4 变更：
     - 新增第 7 节：网络电台 2026-10 重写版（assets/ 那一套）的栅格对齐。
       注意 /netradio/、/games/、/apps/、/xiuxian/、/match3/、/movelist/ 由 nginx
       直出，Flask 的 after_request 注入到不了，这些页面必须手工在 </head> 前挂本文件。
   ========================================================================== */

:root {
  --shell-content: 1144px;
  --shell-gutter: 16px;
  --shell-ink: #1d1d1f;
  --shell-dim: #6e6e73;
  /* 沿用站点既有品牌色，不另造色 */
  --shell-brand: var(--site-brand, #ffcc00);
  --shell-accent: var(--site-accent, #0071e3);
}

/* --------------------------------------------------------------------------
   1. 顶部导航：统一盒模型
   首页 .elo-nav-inner 是 border-box（总宽 1200 / 内容 1144）；
   子站 .sub-site-nav-inner 是 content-box（总宽 1256 / 内容 1200），
   导致子站导航比首页宽 56px、logo 右移 28px。统一为 border-box。
   -------------------------------------------------------------------------- */
.sub-site-nav-inner {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   2. 内容容器：全部对齐到导航内容宽 1144
   -------------------------------------------------------------------------- */

main.hub-page {
  box-sizing: border-box;
  max-width: calc(var(--shell-content) + var(--shell-gutter) * 2);
}

.desk-wrap,
.ml-shell,
main.radio-shell,
.radio-player-inner {
  box-sizing: border-box;
  max-width: calc(var(--shell-content) + var(--shell-gutter) * 2);
}

.main-container,
.header-inner {
  box-sizing: border-box;
  max-width: calc(var(--shell-content) + 48px);
}

/* --------------------------------------------------------------------------
   3. 页面标题：统一字号 / 字重 / 行高 / 居中
   字体本身沿用站点规范 .site-display（衬线大标题），这里只统一尺寸与间距。
   -------------------------------------------------------------------------- */

.hub-hero h1,
.ml-hero h1,
.desk-greeting,
.radio-hero h1 {
  font-size: clamp(1.55rem, 4.4vw, 2.15rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 0 0 10px;
}

/* 统一标题下的短横（覆盖各页原有的不同写法） */
.hub-hero h1::after,
.ml-hero h1::after,
.desk-greeting::after,
.radio-hero h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--shell-brand), var(--shell-accent));
}

/* 副标题统一 */
.hub-hero p,
.radio-hero p,
.desk-wrap .desk-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--shell-dim);
  text-align: center;
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. 页脚：三种页脚统一字号 / 颜色 / 对齐
   -------------------------------------------------------------------------- */
footer.site-chrome-foot,
footer.desk-foot,
footer.radio-foot {
  font-size: 12.5px;
  line-height: 1.9;
  color: #86868b;
  text-align: center;
}

footer.site-chrome-foot a,
footer.desk-foot a,
footer.radio-foot a {
  color: #4a4a4f;
  text-decoration: none;
}

footer.site-chrome-foot a:hover,
footer.desk-foot a:hover,
footer.radio-foot a:hover {
  color: var(--shell-accent);
}

/* --------------------------------------------------------------------------
   5. 电台页：保留深色（媒体播放器惯例，且与全站深色顶栏衔接），
      但默认配色由"青绿"改为站点蓝，避免全站唯一一个"绿页"。

      注意：电台页的配色是 radio.js 按「配色主题」动态写到 <body> 内联样式上的
      （ACCENT_PALETTES，用户还能自选 7 套），内联样式优先级高于任何样式表，
      所以默认色是在 radio.js 里改的（index 0 → 站点蓝，青绿移到末尾保留）。
      这里只是 JS 执行前的兜底，数值必须与 radio.js 里那套「站点蓝」完全一致，
      否则首屏会闪一下别的颜色。
   -------------------------------------------------------------------------- */
html:root {
  --radio-accent: #2e8bf0;
  --radio-accent-deep: #0058b8;
  --radio-accent-soft: rgba(46, 139, 240, 0.22);
  --radio-accent-muted: #8cc4fa;
  --radio-accent-on: #0a1626;
  --radio-accent-10: rgba(46, 139, 240, 0.10);
  --radio-accent-12: rgba(46, 139, 240, 0.12);
  --radio-accent-14: rgba(46, 139, 240, 0.14);
  --radio-accent-18: rgba(46, 139, 240, 0.18);
  --radio-accent-22: rgba(46, 139, 240, 0.22);
  --radio-accent-24: rgba(46, 139, 240, 0.24);
  --radio-accent-35: rgba(46, 139, 240, 0.35);
  --radio-accent-45: rgba(46, 139, 240, 0.45);
  --radio-accent-55: rgba(46, 139, 240, 0.55);
  --radio-shuffle: #818cf8;
  --radio-shuffle-soft: rgba(99, 102, 241, 0.28);
  --radio-btn-bg: rgba(20, 29, 45, 0.92);
  --radio-btn-border: rgba(52, 70, 98, 0.95);
  --radio-bg-top: #0a1626;
  --radio-bg-mid: #1a497f;
  --radio-bg-bottom: #0d1728;
  --radio-bg-gradient: linear-gradient(165deg, #0a1626 0%, #1a497f 42%, #0d1728 100%);
  --radio-bg-player: linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(10, 22, 38, 0.98) 28%, rgba(10, 22, 38, 0.99) 100%);
  --radio-bg-sheet: linear-gradient(180deg, #1a497f 0%, #0d1728 100%);
  --radio-bg-backdrop: rgba(10, 22, 38, 0.58);
  --radio-bg-resume-backdrop: rgba(15, 23, 42, 0.62);
  --radio-bg-surface: #0d1728;
}

/* radio.css 里两处硬编码的浅青色文字（hover 态），跟随新的强调色 */
.radio-refresh:hover,
.radio-refresh:focus-visible,
.radio-page-btn:hover:not(:disabled),
.radio-page-btn:focus-visible:not(:disabled) {
  color: var(--radio-accent-muted);
}

/* 深底上的文字：第 3、4 节用的是浅色页的灰，在深底上对比度不够，单独纠正 */
.radio-hero p {
  color: rgba(226, 232, 240, 0.66);
}

footer.radio-foot {
  color: rgba(226, 232, 240, 0.5);
}

footer.radio-foot a {
  color: rgba(226, 232, 240, 0.78);
}

footer.radio-foot a:hover {
  color: var(--radio-accent-muted);
}

/* --------------------------------------------------------------------------
   6. 明确豁免（不是漏做，是有意保持原样）
      · /pdftoolbox/  —— 工具型应用，<h1 class="logo"> 是应用内品牌行而非页面标题，
                         强制套用大标题会挤压工具栏；
      · /schulte/     —— 网格游戏，窄列（560px）是玩法需要的画布宽度；
      · 各小游戏页    —— 只统一外壳，不改变游戏画布内部布局。
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   7. 网络电台（2026-10 重写版，assets/app.css + app.js）
      这一版已经直接用了全站的设计令牌（--text #1d1d1f / --text-2 #6e6e73 /
      --accent #0071e3），配色和字号无需干预，只差栅格宽度：
        · 内容容器 --shell 1180 → 1192（扣掉 24px 内边距后正好 1144）
        · 顶部 gnav 盒子 1180 → 1200（28px 内边距 → 内容 1144），
          与其余页面的 .sub-site-nav-inner 完全对齐，跨页切换时品牌位不再跳动
      它的 hero 是营销型大标题（clamp 40~76px），和首页「饿狼传说」同一类，
      因此不套第 3 节的内页标题规范。
      :has() 不被支持时整条规则失效，退化为原样，无副作用。
   -------------------------------------------------------------------------- */
body:has(.gnav-inner) {
  --shell: calc(var(--shell-content) + 48px);
}

body:has(.gnav-inner) .gnav-inner {
  max-width: calc(var(--shell-content) + 56px);
  padding-left: 28px;
  padding-right: 28px;
}

@media (max-width: 720px) {
  :root {
    --shell-gutter: 12px;
  }
}
