/* 万象棋攻略 — 磨砂玻璃面板风格 */
:root {
  --bg: #0f0f11;
  --text: #f4f2ee;
  --muted: rgba(244, 242, 238, 0.8);
  --dim: rgba(244, 242, 238, 0.64);
  --glass: rgba(255, 255, 255, 0.135);
  --glass-2: rgba(255, 255, 255, 0.12);
  --glass-3: rgba(255, 255, 255, 0.17);
  --line: rgba(255, 255, 255, 0.19);
  --line-2: rgba(255, 255, 255, 0.3);
  --red: #e2443a;
  --red-hi: #f05a4f;
  --cream: #f1e1bf;
  --cream-ink: #3a2b15;
  --gold-line: rgba(232, 206, 152, 0.72);
  --gold-bg: rgba(214, 180, 118, 0.14);
  --t0: linear-gradient(165deg, rgba(128, 38, 36, 0.82), rgba(84, 26, 26, 0.7));
  --t1: linear-gradient(165deg, rgba(112, 88, 50, 0.78), rgba(70, 56, 34, 0.68));
  --t2: linear-gradient(165deg, rgba(58, 70, 92, 0.8), rgba(38, 46, 62, 0.7));
  --t-other: linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  --radius: 20px;
  --radius-sm: 14px;
  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: transparent;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 8px; }

/* ---------- 背景 ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(50% 55% at 50% 42%, rgba(236, 226, 210, 0.38), transparent 72%),
    radial-gradient(90% 22% at 50% 58%, rgba(232, 222, 206, 0.22), transparent 70%),
    radial-gradient(90% 18% at 50% 22%, rgba(232, 222, 206, 0.16), transparent 70%),
    radial-gradient(45% 35% at 15% 18%, rgba(150, 140, 128, 0.26), transparent 70%),
    radial-gradient(45% 40% at 88% 72%, rgba(170, 140, 108, 0.24), transparent 70%),
    radial-gradient(80% 60% at 50% 100%, rgba(120, 112, 104, 0.3), transparent 70%),
    linear-gradient(180deg, #2a292b, #19181a);
}
.backdrop .glow { position: absolute; left: 50%; top: 30%; width: 70vmin; height: 70vmin; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 246, 230, 0.26), transparent 62%); filter: blur(24px); }
.backdrop .floor { position: absolute; left: -20%; right: -20%; bottom: -10%; height: 55%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: 50% 100%;
  mask-image: radial-gradient(60% 80% at 50% 100%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 80% at 50% 100%, #000 20%, transparent 75%);
}

/* ---------- 通用玻璃 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 40px rgba(0, 0, 0, 0.25);
}
.card {
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.card.hl { border-color: var(--gold-line); background: linear-gradient(160deg, var(--gold-bg), rgba(255, 255, 255, 0.06)); }

.shell { width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 24px; }
main.shell { padding-top: 20px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 18px; outline: none; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- 顶栏 ---------- */
.topbar { position: sticky; top: 12px; z-index: 10; margin: 12px auto 0; width: calc(100% - 48px); max-width: 1712px;
  display: flex; align-items: center; gap: 20px; padding: 10px 14px 10px 18px; border-radius: 999px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.06em; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--red); position: relative; transform: rotate(45deg) scale(0.8); }
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 2px; background: #fff; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a, .nav-soon { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--glass-2); }
.nav a.active { color: #1a1612; background: #fff; font-weight: 600; }
.nav-soon { color: var(--dim); gap: 6px; cursor: default; }
.nav-soon small { font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.topbar-meta { margin-left: auto; font-size: 12px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.topbar-meta::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e3b86b; margin-right: 8px; vertical-align: middle; }

/* ---------- 标签 ---------- */
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; flex: none; }
.tag.primary { background: #fff; color: #1e1a16; }
.tag.soft { background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.86); }
.tag.gold { background: var(--cream); color: var(--cream-ink); }
.tag.outline { border: 1px solid rgba(232, 206, 152, 0.55); color: #ecd9b0; background: rgba(214, 180, 118, 0.12); height: 24px; font-size: 12px; }
.pill-red { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--red); color: #fff; font-size: 15px; white-space: nowrap; }
.pill-white { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; background: #fff; color: #1e1a16; font-size: 14px; white-space: nowrap; }

/* ---------- 头像 ---------- */
.ava { border-radius: 50%; object-fit: cover; background: #2a2a2e; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); flex: none; }
.ava.s48 { width: 48px; height: 48px; }
.ava.s56 { width: 56px; height: 56px; }
.ava.s64 { width: 64px; height: 64px; }
.ava.s72 { width: 72px; height: 72px; }
.ava.s80 { width: 80px; height: 80px; }
.ava.s96 { width: 96px; height: 96px; }
.ava.s120 { width: 120px; height: 120px; }
.ava.gray { filter: grayscale(1); opacity: 0.6; border-color: rgba(255, 255, 255, 0.4); box-shadow: none; }
.lord-link { display: flex; flex-direction: column; align-items: center; gap: 8px; border-radius: 12px; }
.lord-link:hover .ava { border-color: var(--cream); }
.lord-link:hover .ava.gray { filter: grayscale(0.2); opacity: 1; }
.spaced { letter-spacing: 0.3em; margin-right: -0.3em; }

/* ---------- 标题面板 ---------- */
.title-panel { display: flex; align-items: center; gap: 24px; padding: 20px 28px; flex-wrap: wrap; }
.title-panel h1 { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: 0.02em; }
.title-panel .aside { margin-left: auto; color: #e9d9b8; font-size: 14px; }
.ban-head { display: flex; align-items: center; gap: 22px; padding: 16px 22px; flex-wrap: wrap; }
.ban-head h1 { margin: 0; font-size: 36px; font-weight: 500; letter-spacing: 0.08em; }
.ban-head .open { color: var(--muted); font-size: 16px; padding-left: 22px; border-left: 1px solid var(--line-2); }
.switcher { margin-left: auto; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); flex-wrap: wrap; }
.switcher a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.switcher a:hover { color: var(--text); background: var(--glass-2); }
.switcher a[aria-current="page"] { background: var(--red); color: #fff; }

/* ---------- 总览 ---------- */
.overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.ov-card { display: flex; flex-direction: column; gap: 22px; padding: 22px 22px 26px; transition: transform 0.2s, border-color 0.2s, background 0.2s; }
.ov-card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--glass-2); }
.ov-card .head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ov-card .num { min-width: 48px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--red); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.ov-card .head span:last-child { font-size: 22px; }
.ov-card .avas { display: flex; gap: 14px; }
.ov-card .core { padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.ov-card .core small { color: var(--muted); font-size: 13px; }
.ov-card .core b { font-weight: 500; font-size: 16px; }
.ov-card .main small { color: var(--dim); font-size: 13px; display: block; margin-bottom: 4px; }
.ov-card .main p { margin: 0; font-size: 15px; line-height: 1.7; }
.tip { display: flex; align-items: center; gap: 18px; padding: 18px 24px; flex-wrap: wrap; }
.tip p { margin: 0; color: var(--muted); }
.tip p b { color: var(--text); font-weight: 500; }

/* ---------- 梯队行 ---------- */
.tier-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
.tier-block { border-radius: var(--radius); border: 1px solid var(--line); padding: 24px 24px 22px; display: flex; flex-direction: column; justify-content: center; gap: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.tier-block .t { font-size: 42px; line-height: 1; font-weight: 500; }
.tier-block .t.zh { font-size: 36px; }
.tier-block .l { font-size: 22px; margin-top: 12px; }
.tier-block .s { font-size: 14px; color: var(--muted); }
.tier-block.T0 { background: var(--t0); }
.tier-block.T1 { background: var(--t1); }
.tier-block.T2 { background: var(--t2); }
.tier-block.other { background: var(--t-other); }
.tier-body { padding: 18px; display: flex; align-items: stretch; min-width: 0; }

/* feature：单棋手 + 多路线 */
.feature { display: flex; gap: 20px; align-items: center; width: 100%; }
.feature > .lord-link { width: 120px; font-size: 18px; }
.routes { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; min-width: 0; }
.route { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.route.wide { grid-column: span 2; }
.route .rt { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.route .rt b { font-weight: 500; font-size: 20px; }
.route .note { color: var(--muted); font-size: 14px; }
.compare { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); }
.compare b { font-weight: 500; color: #ecd9b0; font-size: 14px; }
.compare p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
/* 双核 */
.feature-multi { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; width: 100%; }
.feature-multi > .card { padding: 16px 20px; display: flex; gap: 18px; align-items: center; }
.feature-multi .routes { grid-template-columns: 1fr; }
.feature-multi .route { padding: 0; background: none; border: 0; box-shadow: none; }

/* grid：头像居中小卡 */
.lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; width: 100%; }
.lgrid .card { padding: 14px 10px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.lgrid .name { font-size: 18px; margin-top: 6px; }
.lgrid .route-t { color: #e9dcc2; font-size: 14px; }
.lgrid .note { color: var(--dim); font-size: 12.5px; }

/* wide：左头像右文字 */
.lwide { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; width: 100%; }
.lwide .card { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.lwide .top { display: flex; gap: 16px; align-items: center; }
.lwide .name { font-size: 20px; }
.lwide .route-t { color: #e9dcc2; font-size: 14px; }
.lwide .note { color: var(--muted); font-size: 13.5px; }

/* pill：T2 */
.lpill { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; width: 100%; }
.lpill .card { padding: 18px 22px; display: flex; gap: 18px; align-items: center; }
.lpill .nm { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lpill .name { font-size: 20px; }
.lpill .note { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* other */
.lother { display: grid; grid-template-columns: minmax(300px, 1.1fr) minmax(0, 1.6fr); gap: 22px; width: 100%; align-items: center; }
.lother.only-rest { grid-template-columns: 1fr; }
.special { padding: 18px 22px; display: flex; gap: 18px; align-items: center; }
.special .nm { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.special .nm b { font-weight: 500; font-size: 20px; }
.special .note { color: var(--muted); font-size: 14px; margin-top: 8px; }
.badge-circle { width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--gold-line); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 20px; line-height: 1.25; white-space: pre-line; color: #f3e6c8; flex: none; }
.rest small { display: block; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.rest-list { display: flex; flex-wrap: wrap; gap: 12px 8px; }
.rest-list .lord-link { width: 58px; font-size: 13px; color: var(--dim); gap: 6px; }

/* ---------- 棋手反查 ---------- */
.lords-page { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.picker { padding: 18px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
.search { width: 100%; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); color: var(--text); font: inherit; }
.search::placeholder { color: var(--dim); }
.picker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.picker-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; border-radius: 12px; font-size: 13px; color: var(--muted); }
.picker-grid a:hover { background: var(--glass-2); color: var(--text); }
.picker-grid a[aria-current="true"] { background: var(--glass-3); color: var(--text); }
.picker-grid a[aria-current="true"] .ava { border-color: var(--red-hi); }
.detail { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.detail-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.detail-head h2 { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: 0.1em; }
.detail-head .alias { color: var(--muted); font-size: 14px; margin-top: 4px; }
.best { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.matrix { display: flex; flex-direction: column; gap: 10px; }
.mrow { display: grid; grid-template-columns: 150px 92px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 18px; }
.mrow:hover { border-color: var(--line-2); }
.mrow .ban { font-size: 16px; }
.mrow .ban small { color: var(--dim); font-size: 12px; display: block; }
.tchip { min-width: 64px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; height: 30px; border-radius: 8px; font-size: 14px; border: 1px solid var(--line); }
.tchip.T0 { background: var(--t0); }
.tchip.T1 { background: var(--t1); }
.tchip.T2 { background: var(--t2); }
.tchip.other { background: var(--t-other); color: var(--muted); }
.tchip.rest { color: var(--dim); }
.tchip.cmp { color: #ecd9b0; border-color: rgba(232, 206, 152, 0.4); }
.mrow .what b { font-weight: 500; }
.mrow .what p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.empty { color: var(--dim); padding: 12px 4px; }

.footer { padding-bottom: 28px; color: var(--dim); font-size: 12px; text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .tier-row { grid-template-columns: 1fr; gap: 0; }
  .tier-block { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding: 14px 18px; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
  .tier-block .t, .tier-block .t.zh { font-size: 26px; }
  .tier-block .l { margin: 0; font-size: 18px; }
  .tier-body { border-radius: 0 0 var(--radius) var(--radius); }
  .lother { grid-template-columns: 1fr; }
  .lords-page { grid-template-columns: 1fr; }
  .picker { position: static; }
  .picker-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .switcher { margin-left: 0; width: 100%; }
  .ban-head .open { border-left: 0; padding-left: 0; width: 100%; }
}
@media (max-width: 720px) {
  .shell { padding: 0 12px; }
  .topbar { width: calc(100% - 24px); top: 8px; border-radius: 22px; gap: 8px 12px; padding: 10px 12px; }
  .topbar-meta { display: none; }
  .nav { width: 100%; }
  .nav a, .nav-soon { padding: 0 12px; }
  .overview { grid-template-columns: 1fr; }
  .title-panel { padding: 18px; gap: 12px; }
  .title-panel h1 { font-size: 22px; }
  .title-panel .aside { margin-left: 0; }
  .ban-head { padding: 16px; gap: 12px; }
  .ban-head h1 { font-size: 28px; }
  .switcher { flex-wrap: nowrap; }
  .switcher a { padding: 0 6px; flex: 1; justify-content: center; font-size: 13px; }
  .tier-body { padding: 12px; }
  .feature { flex-direction: column; align-items: stretch; }
  .feature > .lord-link { width: auto; flex-direction: row; justify-content: flex-start; gap: 14px; }
  .feature > .lord-link .ava { width: 64px; height: 64px; }
  .routes { grid-template-columns: 1fr; }
  .route.wide { grid-column: auto; }
  .feature-multi { grid-template-columns: 1fr; }
  .feature-multi > .card { flex-direction: column; align-items: stretch; }
  .feature-multi > .card > .lord-link { flex-direction: row; gap: 14px; }
  .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lwide, .lpill { grid-template-columns: 1fr; gap: 10px; }
  .lpill .card, .special { padding: 14px; gap: 14px; }
  .lpill .ava, .special .ava { width: 60px; height: 60px; }
  .badge-circle { width: 64px; height: 64px; font-size: 15px; }
  .rest-list .lord-link { width: 56px; }
  .rest-list .ava { width: 44px; height: 44px; }
  .mrow { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 12px 14px; }
  .mrow .what { grid-column: 1 / -1; }
  .detail { padding: 18px; }
  .detail-head .ava { width: 88px; height: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
