:root {
  --bg: #0b0b0b; --panel: #161616; --panel2: #1f1f1f; --line: rgba(255,255,255,.09); --hover: rgba(255,255,255,.06);
  --ink: #e9e9e7; --muted: #9b9a97; --faint: #6b6a67; --red: #c01a22; --gold: #ffd45a;
  --font: Inter, "SF Pro Display", -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); background: rgba(11,11,11,.92); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand svg { width: 22px; height: 22px; color: var(--red); }
.brand small { color: var(--faint); font-weight: 500; font-size: 11px; }
.search { flex: 1; display: flex; max-width: 560px; margin: 0 auto; }
.search input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; outline: none; }
.search input:focus { border-color: rgba(255,255,255,.3); }
.search button { width: 44px; height: 36px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 0 8px 8px 0; cursor: pointer; font-size: 18px; }
.letters { color: var(--faint); font-size: 12px; letter-spacing: .1em; white-space: nowrap; }
.letters a { padding: 2px 3px; color: var(--muted); }
.letters a:hover { color: #fff; }

/* 布局：左侧领域树 + 主区 */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.side { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; padding: 14px 10px 24px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.side .head { padding: 10px 10px 4px; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.side a { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 10px; color: var(--muted); border-radius: 6px; }
.side a:hover { color: var(--ink); background: var(--hover); }
.side a.on { color: var(--ink); background: #2a2a2a; font-weight: 600; }
.side a i { flex: none; width: 1.25em; text-align: center; font-style: normal; }
.side a b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: inherit; }
.side a small { color: var(--faint); font-variant-numeric: tabular-nums; }
.main { padding: 18px 22px 40px; }

/* 列表头 + 筛选 */
.listhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 2px 0 12px; }
.listhead h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.listhead .n { color: var(--faint); }
.listhead p { flex-basis: 100%; margin: 0; color: var(--muted); max-width: 70ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip { padding: 5px 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; white-space: nowrap; font-size: 12.5px; }
.chip:hover { color: var(--ink); border-color: rgba(255,255,255,.3); }
.chip.on { color: #111; background: #f7f4ef; border-color: #f7f4ef; font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.toolbar select { padding: 5px 8px; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 16px; }
.card { display: block; border-radius: 10px; }
.card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #1a1a1a; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.card:hover .thumb img { transform: scale(1.03); }
.card .dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; color: #fff; background: rgba(0,0,0,.8); border-radius: 4px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card .hn { position: absolute; left: 6px; top: 6px; padding: 2px 7px; color: #ffe08a; background: rgba(0,0,0,.72); border: 1px solid rgba(255,212,90,.45); border-radius: 999px; font-size: 11px; font-weight: 700; }
.card h3 { margin: 9px 0 3px; font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.card .meta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .en { color: var(--faint); font-size: 12px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.more { display: block; width: 100%; margin: 22px 0 0; padding: 12px; color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.more:hover { background: #2a2a2a; }
.empty { padding: 40px 0; color: var(--faint); text-align: center; }
.loading { color: var(--faint); }

/* 视频页 */
.video { max-width: 1100px; }
.crumb { margin: 0 0 10px; color: var(--faint); font-size: 12.5px; }
.crumb a:hover { color: var(--ink); }
.player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #000 center/cover no-repeat; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45)); border: 0; cursor: pointer; }
.player .play span { display: grid; place-items: center; width: 74px; height: 74px; padding-left: 6px; color: #fff; background: var(--red); border-radius: 50%; font-size: 28px; box-shadow: 0 10px 30px rgba(192,26,34,.5); }
.video h1 { margin: 16px 0 4px; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; }
.video .ent { margin: 0 0 8px; color: var(--faint); font-size: 13px; }
.video .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.video .meta .hnpill { color: #ffe08a; }
.video .desc { max-width: 76ch; }
.video .desc p { margin: 0 0 10px; font-size: 15px; line-height: 1.7; }
.video .why { padding: 10px 14px; margin: 0 0 14px; border-left: 3px solid var(--gold); background: var(--panel); border-radius: 0 8px 8px 0; }
.video .why b { color: var(--gold); }
.video blockquote { margin: 0 0 14px; padding: 12px 14px; color: var(--muted); background: var(--panel); border-radius: 8px; font-style: italic; }
.video blockquote a { display: block; margin-top: 6px; color: var(--faint); font-style: normal; font-size: 12px; }
.video .en-toggle { color: var(--faint); background: none; border: 0; padding: 0; cursor: pointer; font-size: 12.5px; text-decoration: underline; }
.video .links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.video .links a { padding: 7px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.video .links a:hover { background: var(--hover); }
.video h2 { margin: 24px 0 10px; font-size: 16px; }
.jic-thread { min-height: 6rem; }

/* 手机 */
@media (max-width: 860px) {
  .top { height: 52px; gap: 8px; padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
  .brand span, .brand small, .letters, .lang { display: none; }
  .brand svg { width: 26px; height: 26px; }
  .search { max-width: none; margin: 0; }
  .search input { height: 38px; font-size: 16px; }   /* 16px：iOS 聚焦时不放大页面 */
  .search button { height: 38px; width: 42px; }
  .layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }   /* 不写 minmax(0,…) 的话，横滑的主题条会把整页撑宽（2026-11-02 手机 Games 页实测） */
  .main, .side { min-width: 0; max-width: 100vw; }
  .side { display: none; }   /* 手机不横排：首页用领域砖，领域页用标题按钮弹底部抽屉；DOM 留着给全站导航「本站板块」读 */
  .main { padding: 12px 12px calc(32px + 72px + env(safe-area-inset-bottom)); }   /* 底部留出全站导航底栏 */
  .listhead h1 { font-size: 18px; }
  .listhead p { font-size: 13px; }
  .chips { gap: 8px; margin: 0 0 14px; }
  .chip { min-height: 34px; display: inline-flex; align-items: center; font-size: 13px; }
  .toolbar { gap: 8px; }
  .toolbar select { flex: 1 1 40%; min-width: 0; height: 36px; font-size: 14px; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .card h3 { font-size: 15px; }
  .card .meta { white-space: normal; font-size: 12.5px; }
  .more { padding: 14px; }
  .video { max-width: none; }
  .crumb { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player { margin: 0 -12px; border-radius: 0; box-shadow: none; }
  .player .play span { width: 64px; height: 64px; font-size: 24px; }
  .video h1 { margin: 14px 0 6px; font-size: 18px; line-height: 1.35; }
  .video .meta { gap: 4px 10px; font-size: 12.5px; }
  .video .desc p { font-size: 15px; }
  .video .links { gap: 6px; }
  .video .links a { padding: 8px 12px; font-size: 13px; }
  .video h2 { font-size: 15px; }
}
@media (max-width: 400px) { .grid { gap: 14px; } .side a { padding: 4px 10px; font-size: 12.5px; } }
/* 横屏手机：播放器别占满整屏高度 */
@media (max-width: 860px) and (orientation: landscape) { .player { margin: 0 auto; max-width: 70vh; aspect-ratio: 16 / 9; border-radius: 10px; } }
.foot { padding: 20px max(16px, env(safe-area-inset-right)) 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.foot a { color: var(--muted); text-decoration: underline; }
.card .hn.ch { color: #9ad8ff; border-color: rgba(154,216,255,.45); }
.lang { height: 32px; padding: 0 6px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
@media (max-width: 860px) { .lang { display: none; } }

/* 手机：领域砖、领域选择按钮、底部抽屉 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 18px; }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.tile i { grid-row: 1 / 3; font-size: 24px; font-style: normal; }
.tile b { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.tile small { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tile:active { background: #2a2a2a; }
.picker { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px 6px 10px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; }
.picker i { font-style: normal; }
.picker span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker em { font-style: normal; color: var(--faint); }
.picker.big { flex-basis: 100%; color: var(--ink); background: none; border: 0; padding: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.picker.big i { font-size: 22px; }
.picker.big em { font-size: 16px; padding: 0 2px; }
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0); transition: background 180ms ease; }
.sheet-bg.in { background: rgba(0,0,0,.55); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; display: flex; flex-direction: column; padding: 8px 0 calc(76px + env(safe-area-inset-bottom));   /* 底部留出全站导航底栏，它的 z-index 压在一切之上 */ background: #1a1a1a; border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform 220ms cubic-bezier(.2,.8,.2,1); }
.sheet-bg.in .sheet { transform: none; }
.sheet .grip { width: 36px; height: 4px; margin: 0 auto 8px; background: rgba(255,255,255,.25); border-radius: 2px; }
.sheet-h { padding: 4px 18px 8px; color: var(--faint); font-size: 12px; font-weight: 600; }
.sheet-list { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 8px; }
.sheet-list a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 12px; color: var(--muted); border-radius: 10px; font-size: 15px; }
.sheet-list a i { width: 1.4em; text-align: center; font-style: normal; font-size: 18px; }
.sheet-list a b { flex: 1; min-width: 0; font-weight: 500; }
.sheet-list a.on { color: var(--ink); background: #2a2a2a; }
.sheet-list a.on b { font-weight: 700; }
.sheet-list a small { color: var(--faint); font-variant-numeric: tabular-nums; }
body.sheet-open { overflow: hidden; }
