/* ==========================================================================
   内页外壳（2026-11-30）：和首页同一条 mast + 同一个页脚
   · 只放 dj-* 这一套页头/页脚规则，不碰 cs06 的正文（.wrap / .card / table…）
   · 颜色全部走 theme-vars.css 的令牌，后台换主题跟着变
   · 首页那份完整样式在 dejia-home.css；两份的外壳规则保持同源
   ========================================================================== */

/* 主题令牌映射（内页的 --bg/--card/--ink/--line 已由 yijia-chrome.css 指到令牌，
   这里只补设计稿多出来的 --sub / --dark / --red / --gold） */
body[data-theme] {
  --sub: var(--cs06-muted);
  --dark: var(--cs06-top-bg);
  --dark-2: color-mix(in srgb, var(--cs06-top-bg) 82%, #fff);
  --dark-3: color-mix(in srgb, var(--cs06-top-bg) 68%, #fff);
  --red: rgb(var(--accent-rgb));
  --red-2: color-mix(in srgb, rgb(var(--accent-rgb)) 72%, #fff);
  --red-deep: color-mix(in srgb, rgb(var(--accent-rgb)) 74%, #000);
  --gold: rgb(var(--accent-2-rgb));
  --green: #0ba26d;
}

/* 外壳容器和正文同宽（正文 .wrap 是 1220） */
.dj-mast .wrap,
.dj-foot .wrap,
.dj-topbar .wrap,
.dj-rail .wrap {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
}

/* ============ 顶部资讯条（首页才有，内页不输出，留着以防复用） ============ */
.dj-topbar { background: var(--dark); color: #fff; font-size: 12.5px; }
.dj-topbar .wrap { display: flex; align-items: center; gap: 16px; height: 38px; }
.dj-topbar .tb-l { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .4px; }
.dj-topbar .tb-l i { width: 6px; height: 6px; border-radius: 50%; background: var(--red-2); box-shadow: 0 0 8px var(--red-2); animation: pulse 1.4s infinite; }
.dj-topbar .tb-r { margin-left: auto; display: flex; align-items: center; gap: 14px; color: #8e95a8; }
.dj-topbar .tb-r a { color: #cfd4e0; }
.dj-topbar .tb-r a:hover { color: #fff; }

/* ============ mast ============ */
.dj-mast {
  position: sticky; top: 0; z-index: 120;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s;
}
.dj-mast.scrolled { box-shadow: 0 4px 20px rgba(16, 18, 24, .08); }
.dj-mast .wrap { display: flex; align-items: center; gap: 30px; height: 74px; }
.dj-brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.dj-brand .mark {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.dj-brand .mark img { width: 100%; height: 100%; object-fit: contain; }
.dj-brand b { font-size: 19px; font-weight: 900; letter-spacing: .5px; line-height: 1.1; color: var(--ink); }
nav.dj-menu { display: flex; gap: 2px; flex: 1; }
nav.dj-menu a {
  position: relative; padding: 9px 11px; font-size: 14.5px; font-weight: 600;
  color: var(--sub); border-radius: 9px; transition: .2s; white-space: nowrap;
}
nav.dj-menu a:hover { color: var(--ink); background: var(--cs06-soft); }
nav.dj-menu a.on { color: var(--ink); font-weight: 800; }
nav.dj-menu a.on::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 1px;
  height: 3px; border-radius: 2px; background: var(--red);
}
.dj-mast-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.dj-mast-date { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; letter-spacing: .4px; }
.dj-mast-live {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--red-2), var(--red-deep));
  color: #fff; font-size: 13.5px; font-weight: 800;
  padding: 10px 18px; border-radius: 22px;
  box-shadow: 0 6px 16px rgba(16, 18, 24, .18); transition: .2s;
}
.dj-mast-live:hover { transform: translateY(-1px); }
.dj-mast-live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.dj-burger {
  display: none; width: 42px; height: 42px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 11px; cursor: pointer; position: relative;
}
.dj-burger span { position: absolute; left: 12px; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.dj-burger span:nth-child(1) { top: 14px; }
.dj-burger span:nth-child(2) { top: 20px; }
.dj-burger span:nth-child(3) { top: 26px; }
.dj-burger.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.dj-burger.is-open span:nth-child(2) { opacity: 0; }
.dj-burger.is-open span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.dj-drawer {
  display: none; position: fixed; left: 0; right: 0; top: 74px; z-index: 110;
  background: var(--card); border-bottom: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(16, 18, 24, .14);
  padding: 10px 16px 16px;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform .25s, opacity .25s, visibility .25s;
}
.dj-drawer.open { transform: none; opacity: 1; pointer-events: auto; }
.dj-drawer a { display: flex; align-items: center; justify-content: space-between; padding: 13px 10px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.dj-drawer a:last-child { border-bottom: none; }
.dj-drawer a span { color: var(--faint); font-weight: 500; font-size: 12px; }

/* ============ 热门赛事条（首页 / 内页菜单下面都有） ============ */
.dj-rail { background: var(--dark); border-top: 1px solid #1b1e2b; }
.dj-rail .wrap { display: flex; align-items: center; gap: 14px; height: 52px; overflow-x: auto; scrollbar-width: none; }
.dj-rail .wrap::-webkit-scrollbar { display: none; }
.dj-rail-lab { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; color: #fff; letter-spacing: .5px; padding-right: 14px; border-right: 1px solid #2a2e3d; }
.dj-rail-lab i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.dj-rail-tabs { display: flex; align-items: center; gap: 4px; }
.dj-rail-tabs a { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #b8bfd0; padding: 6px 13px; border-radius: 16px; transition: .2s; }
.dj-rail-tabs a u { width: 7px; height: 7px; border-radius: 50%; background: var(--c, #fff); text-decoration: none; }
.dj-rail-tabs a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.dj-rail-round { margin-left: auto; flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: #7b8296; }

/* ============ 页脚 ============ */
.dj-foot { margin-top: 52px; background: var(--dark); color: #fff; }
.dj-foot .wrap { padding-top: 40px; padding-bottom: 24px; }
.dj-foot-top { display: grid; grid-template-columns: 1.1fr 1.4fr .9fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid #242836; }
.dj-foot-brand { display: flex; align-items: center; justify-content: center; gap: 12px; transform: translate(-16px, -4px); }
.dj-foot-brand .mark { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dj-foot-brand .mark img { width: 100%; height: 100%; object-fit: contain; }
.dj-foot-brand b { display: block; font-size: 16px; font-weight: 900; }
.dj-foot-info { font-size: 11.5px; line-height: 2; color: #8b93a8; }
.dj-foot-info b { color: #fff; }
.dj-foot-info a { color: var(--gold); }
.dj-foot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 11.5px; }
.dj-foot-links a { color: #b9c0cf; }
.dj-foot-links a:hover { color: #fff; }
.friend b { font-size: 11px; color: #fff; letter-spacing: 1px; }
.friend-list { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; font-size: 11.5px; }
.friend-list a { color: #8b93a8; }
.friend-list a:hover { color: var(--gold); }
.dj-foot-bot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; font-size: 10.5px; color: #7c8499; letter-spacing: .3px; }
.dj-foot-bot a { color: #9aa3b8; }
.dj-foot-bot a:hover { color: #fff; }
.dj-foot-top > .dj-foot-info:last-child { grid-column: 2 / -1; }

/* ============ 响应式 ============ */
@media (max-width: 1020px) {
  .dj-mast .wrap { gap: 18px; }
  nav.dj-menu a { padding: 8px 10px; font-size: 14px; }
  .dj-mast-date { display: none; }
}
@media (max-width: 920px) {
  nav.dj-menu { display: none; }
  .dj-burger { display: block; }
  .dj-drawer { display: block; top: 64px; }
  .dj-mast .wrap { height: 64px; }
  .dj-topbar .wrap { height: 34px; }
  .dj-foot-top { grid-template-columns: 1fr; gap: 20px; }
  .dj-foot-top > .dj-foot-info:last-child { grid-column: auto; }
  .dj-foot-info { font-size: 11px; }
  .dj-foot-bot { font-size: 10px; }
  .dj-rail-round { display: none; }
}
@media (max-width: 760px) {
  .dj-topbar .wrap { gap: 10px; }
  .dj-topbar .tb-r .tb-date { display: none; }
  .dj-mast .wrap { width: calc(100% - 32px); }
  .dj-foot .wrap { width: calc(100% - 32px); }
  nav.dj-menu a { padding: 8px 9px; font-size: 14px; }
}
@media (max-width: 640px) {
  /* 品牌区/汉堡/高度/边距跟首页同一套（dejia-home.css 的 ≤640），别在手机上显大 */
  .dj-mast .wrap { width: calc(100% - 30px); height: 58px; gap: 10px; }
  .dj-brand { flex: 1; min-width: 0; }
  .dj-brand b { font-size: 17px; }
  .dj-brand .mark { width: 40px; height: 40px; }
  .dj-burger { width: 38px; height: 38px; flex: 0 0 auto; }
  .dj-burger span { left: 10px; }
  .dj-rail .wrap { height: 46px; gap: 10px; }
  .dj-rail-lab { padding-right: 10px; font-size: 11px; }
  .dj-rail-tabs a { padding: 5px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .dj-topbar .tb-l i, .dj-mast-live i { animation: none; }
}

/* 外壳字体跟首页一致（正文仍用 cs06 自己的字体） */
.dj-topbar,.dj-mast,.dj-drawer,.dj-rail,.dj-foot{font-family:"PingFang SC","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,sans-serif}

/* ============ 回到顶部 ============ */
.dj-totop {
  position: fixed; right: 22px; bottom: 26px; z-index: 130;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(16, 18, 24, .18);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}
.dj-totop.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dj-totop svg { width: 19px; height: 19px; display: block; }
.dj-totop span { font-size: 8px; line-height: 1; font-weight: 700; letter-spacing: .5px; margin-top: 1px; }
.dj-totop:hover { background: var(--red-deep); transform: translateY(-3px); }
.dj-totop:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (max-width: 640px) {
  .dj-totop { right: 14px; bottom: 18px; width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .dj-totop { transition: none; }
}

@keyframes pulse{50%{opacity:.35}}
