/* 當金庸上天堂 前台樣式：玄金龍門（黑底金字） */
:root {
  --bg: #0d0b09;
  --bg2: #120f0c;
  --pn: #17130f;
  --pn2: #211b14;
  --pn3: #2b2319;
  --ln: #3a2f20;
  --ln2: #54442c;
  --gd: #d6a74b;
  --gd2: #f2d78f;
  --gd3: #8b6420;
  --tx: #e9ddc5;
  --mu: #9b8d73;
  --red: #d0563f;
  --grn: #6cc37a;
  --purple: #cc99ff;
  --f1: #eadcae;   /* 正道 米黃 */
  --f2: #a8e6b8;   /* 中立 淡綠 */
  --f3: #f2a6c8;   /* 邪道 粉紅 */
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --r: 3px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--tx);
  font: 15px/1.7 var(--sans);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gd2); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--gd2); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gd); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 16px; }
.muted { color: var(--mu); }
.small { font-size: 13px; }
.gold { color: var(--gd2); }
.red { color: var(--red); }
.pad { padding: 16px; }
.f1 { color: var(--f1); } .f2 { color: var(--f2); } .f3 { color: var(--f3); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px; font-size: 15px; font-weight: 700; border: 1px solid var(--gd);
  color: var(--gd2); background: transparent; border-radius: var(--r); cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.btn:hover { background: rgba(214, 167, 75, .12); }
.btn-gold { background: linear-gradient(#ecc670, #a5741f); color: #1a1006; border-color: #f2d78f; }
.btn-gold:hover { background: linear-gradient(#f5d58a, #b8842a); color: #1a1006; }
.btn-line { color: var(--gd2); }
.btn-lg { padding: 13px 30px; font-size: 17px; }
.btn-block { display: flex; width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; cursor: default; }

/* ---------- 頁首 ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: linear-gradient(rgba(26, 20, 13, .97), rgba(13, 11, 9, .97));
  border-bottom: 1px solid var(--ln); backdrop-filter: blur(6px);
}
.top-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo img { height: 50px; width: auto; }
.nav { display: flex; flex: 1; justify-content: flex-end; }
.dd { position: relative; }
.dd-top { display: block; padding: 22px 16px; font-size: 15px; font-weight: 500; letter-spacing: .04em; position: relative; }
.dd-top::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 14px; height: 2px; background: var(--gd); transform: scaleX(0); transition: transform .2s; }
.dd:hover .dd-top::after, .dd.on .dd-top::after, .dd:focus-within .dd-top::after { transform: scaleX(1); }
.dd.on .dd-top { color: var(--gd2); }
.dd-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 150px;
  background: var(--pn2); border: 1px solid var(--ln2); border-top: 2px solid var(--gd);
  padding: 6px 0; display: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.dd:hover .dd-menu, .dd:focus-within .dd-menu { display: block; }
.dd-menu a { display: block; padding: 8px 18px; font-size: 14px; white-space: nowrap; }
.dd-menu a:hover { background: var(--pn3); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--ln2); color: var(--gd2); border-radius: var(--r); padding: 8px 10px; cursor: pointer; font: inherit; align-items: center; gap: 4px; }
.burger { display: flex; flex-direction: column; gap: 4px; }
.burger span { display: block; width: 18px; height: 2px; background: currentColor; }
.nav-toggle b { font-size: 13px; margin-left: 6px; font-weight: 500; }

/* ---------- 首頁主視覺 ---------- */
.hero {
  position: relative; overflow: hidden; background-color: var(--bg);
  background-size: cover; background-position: center; border-bottom: 1px solid var(--ln);
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 11, 9, .92) 0%, rgba(13, 11, 9, .55) 55%, rgba(13, 11, 9, .25) 100%), linear-gradient(0deg, rgba(13, 11, 9, 1) 0%, transparent 35%); }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding-block: 64px 56px; align-items: center; }
.kicker { display: inline-block; font-size: 13px; letter-spacing: .2em; color: var(--gd); border: 1px solid var(--ln2); padding: 3px 12px; background: rgba(0, 0, 0, .4); }
.hero h1 {
  font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 7vw, 82px); line-height: 1.1; margin: 16px 0 14px; letter-spacing: .05em;
  background: linear-gradient(#fff6d6, #e7bf62 55%, #9a6d22); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .6));
}
.hero-copy p { color: #cfc2a6; font-size: 16px; max-width: 34em; margin: 0 0 26px; text-shadow: 0 1px 3px #000; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.status { background: rgba(18, 15, 12, .9); border: 1px solid var(--ln2); border-radius: var(--r); }
.status h2 { margin: 0; padding: 11px 16px; font-size: 14px; color: var(--gd); border-bottom: 1px solid var(--ln); letter-spacing: .15em; font-weight: 500; }
.status dl { margin: 0; padding: 4px 16px 10px; display: grid; grid-template-columns: auto 1fr; }
.status dt, .status dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #251e16; font-size: 14px; }
.status dt { color: var(--mu); }
.status dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.status dl > :nth-last-child(-n+2) { border-bottom: 0; }
.dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.dot.ok { color: var(--grn); }
.dot.off { color: var(--mu); }

/* ---------- 即時資料磚 ---------- */
.live { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -28px; position: relative; z-index: 2; }
.live-inline { margin: 0 0 24px; grid-template-columns: repeat(3, 1fr); }
.tile { background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); padding: 14px 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); min-width: 0; }
.tile small { display: block; color: var(--mu); font-size: 12px; letter-spacing: .12em; }
.tile b { display: block; font-size: 26px; line-height: 1.35; font-variant-numeric: tabular-nums; font-family: var(--serif); overflow-wrap: anywhere; }
.tile span { font-size: 12px; color: var(--mu); }
.tile-hot { background: linear-gradient(135deg, #3a1a0e, #1a0f0a); border-color: #6b3a1c; }
.tile-hot b { color: var(--gd2); }
.tile-champ { background-size: cover; background-position: center; position: relative; }
.tile-champ::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23, 19, 15, .95), rgba(23, 19, 15, .6)); border-radius: inherit; }
.tile-champ > * { position: relative; }

/* ---------- 首頁三欄 ---------- */
.home-main { display: grid; grid-template-columns: 230px 1fr 300px; gap: 20px; padding-block: 28px; }
.quick { display: grid; gap: 10px; align-content: start; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); transition: border-color .15s; }
.quick a:hover { border-color: var(--gd); }
.quick i { font-style: normal; width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--gd); color: var(--gd2); font-family: var(--serif); font-weight: 900; font-size: 19px; background: radial-gradient(#3a2a14, #17130f); }
.quick b { display: block; font-size: 15px; }
.quick small { color: var(--mu); font-size: 12px; }
.panel { background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--ln); min-height: 46px; padding-left: 16px; }
.panel-h.sub { border-top: 1px solid var(--ln); }
.panel-h h2 { margin: 0; font-size: 16px; color: var(--gd2); font-family: var(--serif); white-space: nowrap; }
.panel-f { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--ln); font-size: 13px; color: var(--mu); }
.more { margin-left: auto; padding: 0 16px; font-size: 13px; color: var(--gd); white-space: nowrap; }
.more::after { content: " ›"; }
.tabs { display: flex; margin-left: auto; }
.tabs button { font: inherit; font-size: 13px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--mu); padding: 12px 12px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--gd2); border-color: var(--gd); }
.news-list { list-style: none; margin: 0; padding: 4px 16px; }
.news-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dashed #2c241a; font-size: 14px; }
.news-list li:last-child { border-bottom: 0; }
.news-list a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list a.pin { color: var(--gd2); }
.news-list time { color: var(--mu); font-size: 12px; font-variant-numeric: tabular-nums; }
.lb { display: inline-block; font-size: 12px; line-height: 1.6; padding: 0 7px; border-radius: 2px; font-weight: 700; background: var(--pn3); color: var(--tx); white-space: nowrap; }
.lb-notice { background: var(--gd); color: #1a1006; }
.lb-event { background: #c4553a; color: #fff; }
.lb-update { background: #3f8591; color: #fff; }
.lb-system { background: #7a4fb0; color: #fff; }
.lb-pin { background: var(--red); color: #fff; }
.fac3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.fac3 > div { padding: 12px 10px 12px 14px; border-right: 1px solid #251e16; min-width: 0; }
.fac3 > div:last-child { border-right: 0; }
.fac3 h3 { margin: 0 0 6px; font-size: 14px; font-family: var(--serif); }
.fac3 ol { margin: 0; padding: 0; list-style: none; font-size: 13px; display: grid; gap: 4px; }
.fac3 li { display: flex; justify-content: space-between; gap: 4px; min-width: 0; }
.fac3 li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fac3 small { color: var(--mu); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-list { list-style: none; margin: 0; padding: 6px 16px 12px; }
.rank-list li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #251e16; font-size: 14px; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list em { font-style: normal; font-family: var(--serif); font-weight: 900; color: var(--gd); text-align: center; }
.rank-list small { color: var(--mu); font-variant-numeric: tabular-nums; }
.on { color: var(--purple); }
.offl { color: #888; }

/* ---------- 區塊標題 ---------- */
.section { padding-block: 16px 36px; }
.section-sm { margin-top: 24px; }
.sec-h { display: flex; align-items: center; gap: 14px; margin: 8px 0 16px; }
.sec-h h2 { margin: 0; font-family: var(--serif); font-size: 24px; color: var(--gd2); white-space: nowrap; }
.sec-h h2::before { content: "◆"; font-size: 12px; color: var(--gd); margin-right: 10px; vertical-align: 4px; }
.sec-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--ln2), transparent); order: 1; }
.sec-h .more { order: 2; padding: 0; }
.h-sm { font-family: var(--serif); color: var(--gd2); font-size: 18px; margin: 0 0 10px; }
.pad-h { padding: 14px 16px 0; }
.lead { color: #cfc2a6; font-size: 16px; margin: 0 0 20px; }

/* ---------- 特殊系統卡片 ---------- */
.sys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sys-card { display: flex; flex-direction: column; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; transition: border-color .15s, transform .15s; }
.sys-card:hover { border-color: var(--gd); transform: translateY(-2px); color: inherit; }
.sys-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.sys-card > div { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.sys-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; color: var(--gd2); }
.sys-card p { margin: 0 0 10px; color: var(--mu); font-size: 14px; }
.go { margin-top: auto; font-size: 13px; color: var(--gd); }
.go::after { content: " →"; }

/* ---------- 資料庫磚 ---------- */
.db-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.db-grid a { padding: 18px 8px; text-align: center; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); transition: border-color .15s; }
.db-grid a:hover { border-color: var(--gd); background: var(--pn2); }
.db-grid i { display: grid; place-items: center; margin: 0 auto 8px; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gd); font-style: normal; font-family: var(--serif); font-weight: 900; font-size: 23px; color: var(--gd2); background: radial-gradient(#3a2a14, #17130f); }
.db-grid b { display: block; font-size: 15px; }
.db-grid small { color: var(--mu); font-size: 12px; }

/* ---------- 內頁橫幅 ---------- */
.banner { position: relative; background-color: var(--pn); background-size: cover; background-position: center; border-bottom: 1px solid var(--ln); }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 11, 9, .9), rgba(13, 11, 9, .35)); }
.banner .wrap { position: relative; padding-block: 44px 30px; }
.banner-en { font-size: 12px; letter-spacing: .4em; color: var(--gd); }
.banner h1 { margin: 2px 0 6px; font-family: var(--serif); font-size: clamp(30px, 5vw, 44px); color: var(--gd2); letter-spacing: .08em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--mu); }
.crumbs a:hover { color: var(--gd2); }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.subnav a { padding: 7px 16px; border: 1px solid var(--ln); border-radius: 20px; font-size: 14px; background: var(--pn); }
.subnav a[aria-current="page"] { border-color: var(--gd); color: #1a1006; background: var(--gd); font-weight: 700; }

/* ---------- 文章列表 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.post-card { display: flex; flex-direction: column; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; }
.post-card:hover { border-color: var(--gd); color: inherit; }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card > div { padding: 14px 16px; display: flex; flex-direction: column; flex: 1; gap: 4px; align-items: flex-start; }
.post-card h2 { margin: 0; font-size: 18px; font-family: var(--serif); color: var(--gd2); }
.post-card p { margin: 0; color: var(--mu); font-size: 14px; }
.post-card time { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--mu); }
.empty { padding: 36px 16px; text-align: center; color: var(--mu); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 24px; }
.pager a, .pager span { padding: 6px 12px; border: 1px solid var(--ln); border-radius: var(--r); font-size: 14px; background: var(--pn); }
.pager .cur { background: var(--gd); color: #1a1006; border-color: var(--gd); font-weight: 700; }

/* ---------- 文章 ---------- */
.article-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.article { padding: 28px 32px 36px; }
.article header { border-bottom: 1px solid var(--ln); padding-bottom: 14px; margin-bottom: 20px; }
.article h1 { margin: 8px 0 6px; font-family: var(--serif); font-size: clamp(24px, 4vw, 32px); color: var(--gd2); }
.meta { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; font-size: 13px; color: var(--mu); }
.article-cover { width: 100%; border-radius: var(--r); margin-bottom: 20px; }
.prose { font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.prose h2 { font-family: var(--serif); color: var(--gd2); font-size: 22px; margin: 28px 0 10px; padding-left: 12px; border-left: 3px solid var(--gd); }
.prose h3 { color: var(--gd2); font-size: 18px; margin: 22px 0 8px; }
.prose a { color: var(--gd2); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r); margin: 12px 0; }
.prose blockquote { margin: 16px 0; padding: 10px 16px; background: var(--pn2); border-left: 3px solid var(--ln2); color: #cfc2a6; }
.prose table { border-collapse: collapse; width: 100%; margin: 14px 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--ln); padding: 8px 10px; text-align: left; }
.prose th { background: var(--pn2); color: var(--gd2); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--r); }
.prose hr { border: 0; border-top: 1px solid var(--ln); margin: 24px 0; }
.prose pre { background: #0a0908; padding: 12px; overflow-x: auto; border-radius: var(--r); }
.side { padding: 16px; position: sticky; top: 84px; }
.side h2 { margin: 0 0 8px; font-size: 16px; font-family: var(--serif); color: var(--gd2); }
.side ul { list-style: none; margin: 0 0 14px; padding: 0; }
.side li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #2c241a; font-size: 14px; }
.side time { color: var(--mu); font-size: 12px; white-space: nowrap; }
.live-block { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--ln); }
.live-block h2 { font-family: var(--serif); color: var(--gd2); font-size: 20px; margin: 0 0 14px; }
.live-link { margin-top: 28px; }

/* ---------- 系統介紹 ---------- */
.sys-list { display: grid; gap: 18px; }
.sys-row { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; }
.sys-row:hover { border-color: var(--gd); color: inherit; }
.sys-row.flip img { order: 2; }
.sys-row img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.sys-row > div { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.sys-row h2 { margin: 0 0 8px; font-family: var(--serif); color: var(--gd2); font-size: 28px; }
.sys-row p { margin: 0 0 14px; color: #cfc2a6; }
.heart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.heart-col h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 18px; }
.heart-col ul { list-style: none; margin: 0; padding: 0; }
.heart-col li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 8px 0; border-bottom: 1px solid #251e16; }
.heart-col li span { color: var(--mu); font-size: 13px; }
.heart-col li small { grid-column: 1 / -1; color: var(--mu); font-size: 12px; }
.xia-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.xia-card { background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); overflow: hidden; }
.xia-card img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.xia-card > div { padding: 14px 16px; }
.xia-card small { color: var(--gd); letter-spacing: .15em; font-size: 12px; }
.xia-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 24px; color: var(--gd2); }
.xia-card p { margin: 0 0 10px; color: #cfc2a6; font-size: 14px; }
.xia-card dl, .item-meta, .wanted dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 13px; }
.xia-card dt, .item-meta dt, .wanted dt { color: var(--mu); }
.xia-card dd, .item-meta dd, .wanted dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- 江湖榜 ---------- */
.term-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 14px; }
.term-bar h2 { margin: 0; font-family: var(--serif); color: var(--gd2); font-size: 24px; }
.term-pick { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; }
select, input[type="search"], input[type="text"] {
  font: inherit; color: var(--tx); background: var(--bg2); border: 1px solid var(--ln2); border-radius: var(--r); padding: 8px 10px; min-width: 0;
}
.fac-boards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 12px; }
.board-h { margin: 0; padding: 12px 16px; font-family: var(--serif); font-size: 20px; border-bottom: 1px solid var(--ln); text-align: center; letter-spacing: .3em; }
.board-list { list-style: none; margin: 0; padding: 6px 14px 10px; }
.board-list li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid #251e16; }
.board-list li:last-child { border-bottom: 0; }
.board-list em { font-style: normal; font-family: var(--serif); font-weight: 900; color: var(--mu); text-align: center; }
.board-list .r1 em { color: #1a1006; background: var(--gd2); border-radius: 50%; width: 26px; height: 26px; line-height: 26px; }
.board-list .r2 em, .board-list .r3 em { color: var(--gd2); }
.board-list span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.board-list b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-list small { font-size: 12px; }
.board-list i { font-style: normal; color: var(--mu); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- 惡人榜 ---------- */
.wanted-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wanted { position: relative; background: linear-gradient(#2a1f14, #1a130d); border: 1px solid #5a3f22; border-radius: var(--r); padding: 18px 16px 14px; }
.wanted.top { border-color: var(--red); box-shadow: 0 0 0 1px rgba(208, 86, 63, .3) inset; }
.wanted-no { position: absolute; top: 10px; right: 12px; font-family: var(--serif); font-weight: 900; font-size: 28px; color: rgba(208, 86, 63, .45); }
.wanted b { display: block; font-size: 20px; font-family: var(--serif); color: var(--purple); margin-bottom: 2px; }
.wanted .dot { font-size: 12px; display: inline-block; margin-bottom: 10px; }

/* ---------- 擂台 ---------- */
.arena-top { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.big-status { font-family: var(--serif); font-size: 28px; color: var(--gd2); margin: 0 0 6px; }
.big-status small { font-size: 14px; color: var(--mu); font-family: var(--sans); }
.result-list { list-style: none; margin: 0; padding: 6px 16px 12px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.result-list li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid #251e16; font-size: 14px; }
.result-list li > span { color: var(--mu); font-size: 13px; }
.result-list time { margin-left: auto; color: var(--mu); font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--ln); border-radius: var(--r); }
.tbl { width: 100%; border-collapse: collapse; background: var(--pn); font-size: 14px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid #251e16; text-align: left; }
.tbl th { background: var(--pn2); color: var(--gd2); font-weight: 500; white-space: nowrap; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; width: 80px; height: 6px; background: #2a2219; border-radius: 3px; vertical-align: middle; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gd3), var(--gd2)); }

/* ---------- 資料查詢 ---------- */
.lookup { background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); padding: 14px 16px; margin-bottom: 20px; }
.lookup label { display: block; font-size: 13px; color: var(--mu); margin-bottom: 6px; }
.lookup-row { display: flex; gap: 8px; }
.lookup-row input { flex: 1; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.item { background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.item-h { display: flex; gap: 12px; align-items: center; }
.item-ic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--ln2); background: radial-gradient(#3a2a14, #120f0c); color: var(--gd2); font-family: var(--serif); font-weight: 900; font-size: 18px; border-radius: var(--r); }
.item-h b { display: block; color: var(--gd2); line-height: 1.4; }
.item-h small { color: var(--mu); font-size: 12px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.chips li { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #2a2219; color: #e3cf9f; }

/* ---------- 下載、客服 ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px; }
.dl { display: flex; align-items: center; gap: 16px; background: var(--pn); border: 1px solid var(--ln); border-radius: var(--r); padding: 18px; }
.dl i { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--gd); color: var(--gd2); font-style: normal; font-family: var(--serif); font-weight: 900; font-size: 24px; background: radial-gradient(#3a2a14, #17130f); }
.dl > div { flex: 1; min-width: 0; }
.dl h2 { margin: 0; font-size: 19px; font-family: var(--serif); color: var(--gd2); }
.dl p { margin: 0; color: var(--mu); font-size: 14px; }
.dl-off { opacity: .7; }
.steps { margin-bottom: 28px; }
.steps ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; padding-left: 44px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--gd); color: #1a1006; display: grid; place-items: center; font-weight: 700; }
.steps span { color: var(--mu); font-size: 14px; }
.link-list { list-style: none; margin: 0; padding: 4px 16px; }
.link-list li { padding: 11px 0; border-bottom: 1px dashed #2c241a; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.link-list li:last-child { border-bottom: 0; }
.link-list a { color: var(--gd2); }
.cs-head { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; margin-bottom: 16px; }
.cs-note { margin: 0; color: #cfc2a6; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 28px; }
.cs-card { display: flex; flex-direction: column; padding: 18px; border-radius: var(--r); border: 1px solid var(--ln); background: var(--pn); border-top: 3px solid var(--gd); }
.cs-card:hover { border-color: var(--gd); color: inherit; }
.cs-card b { font-size: 18px; }
.cs-card span { color: var(--mu); font-size: 14px; overflow-wrap: anywhere; }
.cs-line { border-top-color: #06c755; }
.cs-discord { border-top-color: #5865f2; }
.cs-fb { border-top-color: #1877f2; }
.faq { display: grid; gap: 10px; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 500; color: var(--gd2); }
.faq .prose { padding: 0 16px 14px; font-size: 15px; }

/* ---------- 頁尾與客服鈕 ---------- */
.foot { border-top: 1px solid var(--ln); background: var(--bg2); margin-top: 20px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 26px 90px; }
.foot b { font-family: var(--serif); color: var(--gd2); font-size: 18px; }
.foot p { margin: 4px 0 0; color: var(--mu); font-size: 13px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--mu); align-items: center; }
.cs-float {
  position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 30px;
  background: linear-gradient(#ecc670, #a5741f); color: #1a1006; font-weight: 700; border: 1px solid #f2d78f;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .55);
}
.cs-float:hover { color: #1a1006; filter: brightness(1.08); }

/* ---------- 窄螢幕 ---------- */
@media (max-width: 1080px) {
  .home-main { grid-template-columns: 1fr 1fr; }
  .quick { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .db-grid { grid-template-columns: repeat(3, 1fr); }
  .dd-top { padding-inline: 11px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--pn); border-bottom: 1px solid var(--ln); flex-direction: column; padding: 8px 16px 16px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .nav.open { display: flex; }
  .dd-top { padding: 12px 0 6px; color: var(--gd2); font-family: var(--serif); }
  .dd-top::after { display: none; }
  .dd-menu { display: flex; flex-wrap: wrap; position: static; transform: none; border: 0; box-shadow: none; background: none; padding: 0 0 8px; }
  .dd-menu a { padding: 6px 12px 6px 0; }
  .hero-in { grid-template-columns: 1fr; padding-block: 44px 52px; }
  .live { grid-template-columns: 1fr 1fr; }
  .home-main, .article-wrap, .arena-top { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr 1fr; }
  .sys-grid, .post-grid, .fac-boards, .xia-grid, .heart-grid { grid-template-columns: 1fr 1fr; }
  .sys-row { grid-template-columns: 1fr; }
  .sys-row.flip img { order: 0; }
  .side { position: static; }
  .article { padding: 20px 18px 28px; }
  .dl-grid, .steps ol { grid-template-columns: 1fr; }
  .cs-head { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .logo img { height: 40px; }
  .live, .live-inline { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 12px; }
  .tile b { font-size: 20px; }
  .sys-grid, .post-grid, .fac-boards, .xia-grid, .heart-grid, .result-list { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick a { padding: 10px; gap: 10px; }
  .quick i { width: 36px; height: 36px; font-size: 16px; }
  .quick small { display: none; }
  .db-grid { grid-template-columns: repeat(2, 1fr); }
  .fac3 { grid-template-columns: 1fr; }
  .fac3 > div { border-right: 0; border-bottom: 1px solid #251e16; }
  .tabs button { padding: 12px 8px; }
  .panel-h { flex-wrap: wrap; }
  .hide-sm { display: none; }
  .dl { flex-wrap: wrap; }
  .term-pick { margin-left: 0; }
}
