/* AGI-Town 改版第一批：首页（学习地图）+ 顶栏 / 页脚 + 系列页 / 季页。
   浅色为主；只用系统字体；所有动效在 prefers-reduced-motion 下关掉，静止状态完整可读。
   独立页（/alphatown /pace /kaiji /money）不加载这个文件，仍用 style.css。 */

:root {
  --bg: #F4F7FC;
  --card: #FFFFFF;
  --line: #E1E7F1;
  --line2: #D7DFEC;
  --ink: #0B1B3A;
  --ink2: #2C3D5C;
  --muted: #4A5B78;
  --muted2: #6B7A93;
  --blue: #0D58E8;
  --cyan: #16D8EE;
  --violet: #9C5CFF;
  --navy: #08285F;
  --amber: #B56D00;
  --amber-bg: #FFF6E6;
  --deep: #0B1B3A;
  --radius: 16px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 14px 30px -18px rgba(8, 40, 95, .45);
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid rgba(13, 88, 232, .45); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; }
.mono { font-family: var(--mono); letter-spacing: .08em; }
.muted { color: var(--muted2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.tn {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 247, 252, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tn-in {
  max-width: 1320px; margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.tn-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 900; font-size: 18px; flex: none; }
.tn-brand:hover { color: var(--ink); }
.tn-mark {
  width: 34px; height: 34px; border-radius: 9px; background: #FFF;
  box-shadow: 0 1px 0 var(--line), 0 4px 12px -6px rgba(8, 40, 95, .5);
  display: grid; place-items: center;
}
.tn-mark svg { width: 26px; height: 26px; }
.tn-nav { display: flex; gap: 20px; font-size: 15px; min-width: 0; }
.tn-nav a { color: var(--muted); white-space: nowrap; padding: 4px 0; }
.tn-nav a:hover, .tn-nav a[aria-current] { color: var(--ink); }
.tn-nav a[aria-current] { font-weight: 700; }
/* 「工具」下拉：电脑上挂在按钮下面；窄屏挂在顶栏下面整行（位置由 site.js 写进 --dd-top） */
.tn-dd { position: relative; }
.tn-dd summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px;
  color: var(--muted); white-space: nowrap; padding: 4px 0;
}
.tn-dd summary::-webkit-details-marker { display: none; }
.tn-dd summary svg { width: 14px; height: 14px; transition: transform .2s; }
.tn-dd summary:hover, .tn-dd[open] summary, .tn-dd summary[aria-current] { color: var(--ink); }
.tn-dd summary[aria-current] { font-weight: 700; }
.tn-dd[open] summary svg { transform: rotate(180deg); }
.dd-panel {
  position: absolute; top: calc(100% + 12px); left: -16px; z-index: 30; width: 340px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  box-shadow: 0 18px 48px rgba(8, 40, 95, .16); animation: dd-in .16s ease-out;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dd-panel li { border-radius: 12px; padding: 10px 12px; transition: background .15s; }
.dd-panel li:hover { background: var(--bg); }
.tn-nav .dd-main { display: flex; flex-direction: column; gap: 3px; white-space: normal; padding: 0; color: var(--ink); }
.dd-main b { font-size: 15px; }
.dd-main span { font-size: 13px; line-height: 1.5; color: var(--muted2); font-weight: 400; }
.dd-subs { display: flex; gap: 14px; margin-top: 6px; }
.tn-nav .dd-subs a { font-size: 13px; color: var(--blue); padding: 0; }
.tn-nav .dd-all { display: block; margin-top: 4px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tn-cta {
  margin-left: auto; flex: none;
  height: 38px; display: inline-flex; align-items: center; padding: 0 16px;
  border-radius: 10px; background: var(--ink); color: #FFF; font-size: 14px; font-weight: 700;
  transition: background .2s;
}
.tn-cta:hover { color: #FFF; background: var(--navy); }

/* ---------- 页面骨架 ---------- */
main.pg { max-width: 1320px; margin: 0 auto; padding: 32px var(--gutter) 64px; display: flex; flex-direction: column; gap: 44px; }
.sec { display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 80px; }
.sec-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.sec-hd h2 { font-size: 28px; font-weight: 900; letter-spacing: -.01em; }
.sec-hd p { margin: 6px 0 0; font-size: 14px; color: var(--muted2); }
.sec-hd .count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* 动效：hover 上浮、首屏入场、呼吸点 */
.lift { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rise { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.rise.d1 { animation-delay: .06s; } .rise.d2 { animation-delay: .12s; } .rise.d3 { animation-delay: .18s; }
@keyframes rise { from { transform: translateY(10px); } }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); display: inline-block; flex: none; }

/* ---------- 首屏 ---------- */
.hero { display: flex; gap: 28px; flex-wrap: wrap; align-items: stretch; scroll-margin-top: 80px; }
.hero-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 80px; }
.hero-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.2; font-weight: 900; letter-spacing: -.01em; text-wrap: balance; }
.grad { background: linear-gradient(90deg, var(--blue), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 0; font-size: 17px; line-height: 1.8; color: var(--muted); max-width: 640px; }
.fine { margin: 0; font-size: 12px; color: var(--muted2); }

.tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.track {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; min-width: 0;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--ink);
  --c: var(--blue);
}
.track:hover { color: var(--ink); border-color: var(--c); }
.track.c1 { --c: var(--violet); }
.track.c2 { --c: var(--amber); }
.tr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; }
.tr-code { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--c); }
.track h3 { font-size: 19px; font-weight: 900; }
.track p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted2); }
.tr-next { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--c); min-width: 0; }
.tr-next span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tr-next svg { flex: none; width: 16px; height: 16px; transition: transform .2s; }
.track:hover .tr-next svg { transform: translateX(3px); }

.ring { width: 52px; height: 52px; flex: none; }
.ring circle { fill: none; stroke-width: 7; }
.ring .ring-bg { stroke: #EBEFF6; }
.ring .ring-fg { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 163.4; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .7, .2, 1); }
.ring text { font: 700 13px var(--mono); fill: var(--ink); }

/* 今日一课 */
.today {
  flex: 1 1 380px; min-width: 0; border-radius: 20px; background: var(--deep); color: #FFF;
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 30px 60px -40px rgba(8, 40, 95, .9);
}
.td-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.td-kick { color: var(--cyan); font-family: var(--mono); letter-spacing: .1em; }
.td-code { color: #9FB0CC; }
.td-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 20%, #1E3E88 0%, #0B1B3A 60%), #0B1B3A;
}
.td-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.td-thumb:hover img { transform: scale(1.04); }
.play {
  position: absolute; left: 16px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%;
  background: #FFF; display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5);
}
.play::before { content: ""; margin-left: 4px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--deep); }
.dur { position: absolute; right: 12px; bottom: 12px; font: 600 12px var(--mono); background: rgba(7, 20, 48, .72); color: #FFF; padding: 3px 8px; border-radius: 6px; }
.today h2 { font-size: 22px; line-height: 1.35; font-weight: 900; }
.today h2 a { color: #FFD38A; }
.today h2 a:hover { color: #FFE7BF; }
.today p { margin: 0; font-size: 14px; line-height: 1.75; color: #C9D5EA; }
.td-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.btn-light { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; background: #FFF; color: var(--deep); font-weight: 700; font-size: 14px; }
.btn-light:hover { color: var(--deep); background: #E3FAFD; }
.td-seen { font-size: 13px; color: #7FE9F6; }
.td-next { font-size: 13px; color: #C9D5EA; }
.td-next a { color: #7FE9F6; }

/* 测验（只有数据里有题才出现） */
.quiz { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 12px; }
.quiz-q { font-size: 15px; font-weight: 700; line-height: 1.6; }
.quiz-opt {
  text-align: left; font: inherit; font-size: 14px; padding: 10px 14px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04); color: #FFF;
  display: flex; gap: 10px; align-items: center; transition: border-color .2s, background .2s;
}
.quiz-opt:hover { border-color: var(--cyan); }
.quiz-opt b { font-family: var(--mono); font-size: 12px; color: #9FB0CC; font-weight: 500; }
.quiz-opt.right { border-color: var(--cyan); background: rgba(22, 216, 238, .12); }
.quiz-opt.wrong { border-color: #FF8A7A; }
.quiz-fb { border-radius: 12px; background: rgba(22, 216, 238, .1); border: 1px solid rgba(22, 216, 238, .35); padding: 12px 14px; font-size: 13px; line-height: 1.75; color: #D7F8FC; }

/* ---------- AI 早报滚动条 ---------- */
.ticker { display: flex; align-items: stretch; border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.tk-label { flex: none; padding: 12px 16px; background: var(--blue); color: #FFF; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tk-label:hover { color: #FFF; background: var(--navy); }
.tk-label .dot { background: #FFF; width: 7px; height: 7px; }
.tk-view { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.tk-track { display: flex; width: max-content; animation: tick var(--tk-dur, 48s) linear infinite; }
.ticker:hover .tk-track, .ticker:focus-within .tk-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.tk-list { display: flex; gap: 48px; padding: 12px 48px 12px 24px; margin: 0; list-style: none; white-space: nowrap; font-size: 14px; }
.tk-list a { color: var(--ink2); }
.tk-list a:hover { color: var(--blue); }
.tk-list b { color: var(--blue); font-weight: 700; margin-right: .6em; }

/* ---------- 本周专题 ---------- */
.wk { display: flex; gap: 28px; flex-wrap: wrap; }
.wk-cover {
  flex: 999 1 560px; min-width: 0; position: relative; border-radius: 22px; min-height: 380px;
  color: #FFF; display: block; overflow: hidden; isolation: isolate;
}
.wk-cover:hover { color: #FFF; }
.wk-bg {
  position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(70% 80% at 75% 30%, #2C4FB8 0%, transparent 60%), radial-gradient(60% 60% at 15% 85%, #5B2FA8 0%, transparent 60%), #0B1B3A;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.wk-cover:hover .wk-bg { transform: scale(1.04); }
.wk-glow {
  position: absolute; z-index: -1; width: 300px; height: 300px; right: 8%; top: 10%; border-radius: 50%;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 65%); opacity: .32;
  animation: glow 6s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: translate(40px, -20px) scale(1.15); } }
.wk-in { position: relative; min-height: 380px; height: 100%; padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.wk-kick { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: #7FE9F6; }
.wk-cover h3 { font-family: var(--serif); font-weight: 900; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.2; text-wrap: balance; }
.wk-cover p { margin: 0; max-width: 620px; font-size: 16px; line-height: 1.8; color: #C9D5EA; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.wk-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: #FFF; color: #071430; font-weight: 700; font-size: 14px; }
.wk-quick { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wk-quick h3 { font-family: var(--serif); font-size: 22px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.wk-quick h3 span { font-family: var(--sans); font-size: 12px; font-weight: 400; color: var(--muted2); }
.wk-quick ol { list-style: none; margin: 0; padding: 0; }
.wk-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 13px 10px;
  border-top: 1px solid var(--line); color: var(--ink); border-radius: 10px; transition: background .2s, transform .2s;
}
.wk-row:hover { background: var(--card); color: var(--ink); transform: translateX(3px); }
.wk-n { font: 700 20px var(--mono); color: var(--c, var(--blue)); }
.wk-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-t small { font-size: 12px; font-weight: 700; color: var(--c, var(--blue)); }
.wk-t span { font-size: 15px; line-height: 1.55; font-weight: 500; }

/* ---------- 按主题读 ---------- */
/* 筛选条整行放在标题下面：左边主题，右边体裁和搜索 */
#writing .sec-hd { flex-direction: column; align-items: stretch; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line2); background: var(--card); color: var(--ink2); transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #FFF; border-color: var(--ink); }
.chip i { font-style: normal; font-family: var(--mono); font-weight: 500; opacity: .7; margin-left: 4px; }
.qf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qf input {
  width: 240px; max-width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card); padding: 0 12px; font: inherit; font-size: 14px; color: var(--ink);
}
.arts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ar { padding: 15px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; border-radius: 14px; background: var(--card); border: 1px solid var(--line); height: 100%; }
.ar-meta { display: flex; gap: 6px 8px; align-items: center; font-size: 12px; color: var(--muted2); flex-wrap: wrap; }
.tp { padding: 2px 8px; border-radius: 6px; font-weight: 700; background: #EEF2F8; color: var(--ink2); }
.tp-0 { background: #E8F0FF; color: #0D58E8; } .tp-1 { background: #E3FAFD; color: #0B7C8C; } .tp-2 { background: #F1EBFF; color: #6E35D6; }
.tp-3 { background: #FFEDEA; color: #B83A27; } .tp-4 { background: #FFF4E0; color: #995500; } .tp-5 { background: #EEF2F8; color: #4A5B78; }
.ar-read { color: #0B7C8C; font-weight: 700; }
.ar-title { font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--ink); }
a.ar-title:hover { color: var(--blue); }
.ar details > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.ar details > summary::-webkit-details-marker { display: none; }
.ar details > summary svg { flex: none; margin-top: 5px; width: 18px; height: 18px; color: var(--muted2); transition: transform .25s; }
.ar details[open] > summary svg { transform: rotate(180deg); }
.ar-body { border-top: 1px dashed #DCE3EE; margin-top: 10px; padding-top: 10px; font-size: 14px; line-height: 1.8; color: var(--muted); animation: rise .35s ease both; }
.ar-body p { margin: 0 0 6px; }
.ar-body b { color: var(--ink); }
.ar-body ul { margin: 2px 0 6px; padding-left: 1.2em; }
.ar-go { display: inline-flex; margin-top: 4px; font-weight: 700; }
.arts.collapsed > li.over { display: none; }
.arts-foot { display: flex; justify-content: center; }
.btn-ghost { font: inherit; font-size: 14px; font-weight: 700; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); cursor: pointer; }
.btn-ghost:hover { border-color: var(--ink); }
.empty { padding: 24px; text-align: center; color: var(--muted2); font-size: 14px; }

/* ---------- 视频课程 ---------- */
.sr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sr { padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border-radius: 18px; background: var(--card); border: 1px solid var(--line); --c: var(--blue); }
.sr.c1 { --c: var(--violet); }
.sr-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted2); flex-wrap: wrap; }
.sr-top .mono { color: var(--c); font-size: 12px; }
.sr h3 { font-size: 24px; font-weight: 900; }
.sr h3 a { color: var(--ink); }
.sr h3 a:hover { color: var(--c); }
.sr p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted2); }
.cells { display: flex; flex-direction: column; gap: 6px; }
.cell-row { display: flex; gap: 8px; align-items: flex-start; }
.cell-lab { flex: none; width: 30px; font: 600 11px/12px var(--mono); color: var(--muted2); }
.cell-in { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.cell { width: 11px; height: 11px; border-radius: 3px; background: #E6EBF3; display: block; flex: none; }
.cell.on { background: #BCD0F5; background: color-mix(in srgb, var(--c) 32%, #FFF); }
.cell.on:hover { background: var(--c); transform: scale(1.3); }
.cell.seen { background: var(--c); }
.cell.soon { background: #E6EBF3; box-shadow: inset 0 0 0 1.5px #A9BCE0; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 40%, #FFF); }
a.cell { transition: transform .15s, background .15s; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .cell { display: inline-block; }
.sr-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; margin-top: auto; }
.sr-foot a { font-weight: 700; color: var(--c); }

/* ---------- 工具与开集计划 ---------- */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; scroll-margin-top: 80px; }
.tool { border-radius: 18px; padding: 20px; border: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-margin-top: 80px; }
.tool:hover { color: var(--ink); }
.tool-at { background: linear-gradient(160deg, #FFF, #EEF3FF); }
.tool-pace { background: linear-gradient(160deg, #FFF, #F2EEFF); }
.tool-kj { background: var(--amber-bg); border-color: #F3DDB2; color: #3A2A0B; }
.tool-kj:hover { color: #3A2A0B; }
.tool .mono { font-size: 12px; color: var(--blue); }
.tool-pace .mono { color: var(--violet); }
.tool-kj .mono { color: var(--amber); }
.tool b { font-size: 22px; font-weight: 900; line-height: 1.35; }
.tool span:not(.mono) { font-size: 14px; line-height: 1.7; color: var(--muted); }
.tool-kj span:not(.mono) { color: #6B5320; }
.tool em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--blue); margin-top: auto; }
.tool-pace em { color: var(--violet); }
.tool-kj em { color: var(--amber); }

/* ---------- 系列页 / 季页（标记沿用原来的 class，只换样式） ---------- */
.season-head { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 4px; }
.season-head .tag, .post > .tag { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--blue); }
.season-head.sr-c1 .tag { color: var(--violet); }
.season-head h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; line-height: 1.2; }
.season-head p { margin: 0; font-size: 16px; line-height: 1.8; color: var(--muted); max-width: 720px; }
.season-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.season { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); transition: transform .25s ease, box-shadow .25s ease; }
a.season:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.season-idle { opacity: .72; }
.season-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #0B1B3A, #2C4FB8); overflow: hidden; }
.season-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.season-code { position: absolute; left: 12px; top: 12px; font: 700 12px var(--mono); letter-spacing: .1em; color: #FFF; background: rgba(7, 20, 48, .6); padding: 3px 8px; border-radius: 6px; }
.season-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.season-body h3 { font-size: 18px; font-weight: 900; }
.season-body p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted2); }
.season-body .meta { font-size: 12px; font-family: var(--mono); }
.bar { height: 6px; border-radius: 3px; background: #E6EBF3; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet)); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ep { display: flex; flex-direction: column; gap: 8px; color: var(--ink); min-width: 0; }
a.ep:hover { color: var(--blue); }
.ep-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #DDE5F2, #EEF2F8); transition: transform .25s ease, box-shadow .25s ease; }
a.ep:hover .ep-thumb { transform: translateY(-3px); box-shadow: var(--shadow); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-thumb .ph { width: 100%; height: 100%; }
.ep-thumb .play { width: 38px; height: 38px; left: 10px; bottom: 10px; }
.ep-thumb .play::before { border-width: 7px 0 7px 11px; }
.ep-time { position: absolute; right: 8px; bottom: 8px; font: 600 11px var(--mono); background: rgba(7, 20, 48, .72); color: #FFF; padding: 2px 6px; border-radius: 5px; }
.soon { position: absolute; inset: auto auto 10px 10px; font-size: 12px; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, .85); padding: 2px 8px; border-radius: 6px; }
.ep-soon { opacity: .7; }
.ep h3 { font-size: 15px; font-weight: 700; line-height: 1.5; }
.ep-num { font: 700 12px var(--mono); color: var(--blue); margin-right: 8px; letter-spacing: .04em; }
.ep.seen .ep-thumb::after { content: "看过"; position: absolute; right: 8px; top: 8px; font-size: 11px; font-weight: 700; background: var(--cyan); color: var(--deep); padding: 2px 7px; border-radius: 5px; }
.back { display: inline-flex; align-self: flex-start; font-weight: 700; font-size: 14px; }

/* ---------- 页脚 ---------- */
.ft { border-top: 1px solid var(--line); padding: 24px var(--gutter); font-size: 13px; color: var(--muted2); }
.ft-in { max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }
.ft a { color: var(--muted); }

/* 长英文 / 网址标题不撑破卡片 */
.ar-title, .wk-t span, .wk-cover h3, .today h2, .tool b, .sr h3, .season-head h1, .ep h3 { overflow-wrap: anywhere; }
.pn b, .rd-art h1, .ep-page .post > h1 { overflow-wrap: anywhere; }

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .tracks { grid-template-columns: minmax(0, 1fr); }
  .tr-top { min-height: 0; }
  .tools { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .tn-in { flex-wrap: wrap; gap: 8px 16px; }
  .tn-nav { order: 3; flex: 1 1 100%; overflow-x: auto; gap: 18px; padding-bottom: 2px; scrollbar-width: none; }
  .tn-nav::-webkit-scrollbar { display: none; }
  .dd-panel { position: fixed; top: var(--dd-top, 104px); left: var(--gutter); right: var(--gutter); width: auto; }
  main.pg { padding-top: 20px; gap: 36px; }
  .arts, .sr-grid { grid-template-columns: minmax(0, 1fr); }
  .filters, .chips, .qf { align-items: flex-start; justify-content: flex-start; }
  .qf input { width: 100%; }
  .qf { width: 100%; }
  .wk-in { padding: 22px; min-height: 320px; }
  .wk-cover { min-height: 320px; }
  .sec-hd h2 { font-size: 24px; }
  .tk-label { padding: 10px 12px; }
  .hero-main, .today, .wk-cover, .wk-quick { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .tn-cta { height: 34px; padding: 0 12px; font-size: 13px; }
  .tn-brand { font-size: 16px; }
  .today { padding: 16px; }
  .cell { width: 9px; height: 9px; }
}

/* 关掉动效：内容一样完整，只是不动 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .pulse, .wk-glow, .ar-body { animation: none !important; }
  .lift, .lift:hover, .wk-row, .wk-bg, .td-thumb img, .ring .ring-fg, a.cell, .season, .ep-thumb, .tr-next svg { transition: none !important; }
  .lift:hover, a.season:hover, a.ep:hover .ep-thumb, .wk-row:hover { transform: none !important; }
  .wk-cover:hover .wk-bg, .td-thumb:hover img { transform: none !important; }
  .tk-track { animation: none !important; }
  .tk-view { overflow-x: auto; }
  .tk-list[aria-hidden="true"] { display: none; }
}

/* ==== 深色外观（跟随系统 + 文章页手动「深色」；make_dark_home.py 生成，别手改） ==== */
@media (prefers-color-scheme: dark) {
  html:not([data-rt]) {
    --bg: #0A1226; --card: #121D38; --line: #23314F; --line2: #2D3D60;
    --ink: #E6EDF8; --ink2: #C5D1E5; --muted: #A3B2CC; --muted2: #8696B3;
    --blue: #6E9BFF; --cyan: #3FE3F5; --violet: #B48CFF; --navy: #A9C4FF;
    --amber: #F2B45A; --amber-bg: #2A2012; --deep: #13244A;
    --shadow: 0 14px 30px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
  html:not([data-rt]) .tn { background: rgba(10, 18, 38, .85); }
  html:not([data-rt]) .tn-cta, html:not([data-rt]) .tn-cta:hover, html:not([data-rt]) .chip[aria-pressed="true"] { color: #0A1226; }
  html:not([data-rt]) .tn-cta:hover { background: #FFFFFF; }
  html:not([data-rt]) .tk-label:hover { background: #3A6BE0; }
  html:not([data-rt]) .dd-panel { box-shadow: 0 18px 48px rgba(0, 0, 0, .55); }
  html:not([data-rt]) .ring .ring-bg { stroke: var(--line); }
  html:not([data-rt]) .today, html:not([data-rt]) .wk-cover { box-shadow: 0 0 0 1px var(--line2), 0 30px 60px -40px rgba(0, 0, 0, .9); }
  html:not([data-rt]) .tp, html:not([data-rt]) .tp-5 { background: #1A2744; color: var(--muted); }
  html:not([data-rt]) .tp-0 { background: rgba(13, 88, 232, .24); color: #9DBBFF; }
  html:not([data-rt]) .tp-1 { background: rgba(22, 216, 238, .16); color: #6FE6F4; }
  html:not([data-rt]) .tp-2 { background: rgba(156, 92, 255, .22); color: #CDB2FF; }
  html:not([data-rt]) .tp-3 { background: rgba(255, 107, 87, .18); color: #FF9C8C; }
  html:not([data-rt]) .tp-4 { background: rgba(255, 170, 40, .16); color: #F2C277; }
  html:not([data-rt]) .ar-read { color: #6FE6F4; }
  html:not([data-rt]) .ar-body { border-top-color: var(--line); }
  html:not([data-rt]) .cell, html:not([data-rt]) .cell.soon { background: #1C2945; }
  html:not([data-rt]) .cell.on { background: color-mix(in srgb, var(--c) 60%, #0A1226); }
  html:not([data-rt]) .cell.soon { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, #0A1226); }
  html:not([data-rt]) .tool-at { background: linear-gradient(160deg, #121D38, #16264A); }
  html:not([data-rt]) .tool-pace { background: linear-gradient(160deg, #121D38, #1D1A45); }
  html:not([data-rt]) .tool-kj, html:not([data-rt]) .tool-kj:hover { background: #2A2012; border-color: #5A4520; color: #F3E2C0; }
  html:not([data-rt]) .tool-kj span:not(.mono) { color: #D9C08A; }
  html:not([data-rt]) .bar { background: var(--line); }
  html:not([data-rt]) .ep-thumb { background: linear-gradient(135deg, #16233F, #1C2B4D); }
  html:not([data-rt]) .soon { background: rgba(10, 18, 38, .85); }
  html:not([data-rt]) .ep-seen { background: rgba(22, 216, 238, .14); color: #6FE6F4; }
}
html[data-rt="dark"] {
  --bg: #0A1226; --card: #121D38; --line: #23314F; --line2: #2D3D60;
  --ink: #E6EDF8; --ink2: #C5D1E5; --muted: #A3B2CC; --muted2: #8696B3;
  --blue: #6E9BFF; --cyan: #3FE3F5; --violet: #B48CFF; --navy: #A9C4FF;
  --amber: #F2B45A; --amber-bg: #2A2012; --deep: #13244A;
  --shadow: 0 14px 30px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
html[data-rt="dark"] .tn { background: rgba(10, 18, 38, .85); }
html[data-rt="dark"] .tn-cta, html[data-rt="dark"] .tn-cta:hover, html[data-rt="dark"] .chip[aria-pressed="true"] { color: #0A1226; }
html[data-rt="dark"] .tn-cta:hover { background: #FFFFFF; }
html[data-rt="dark"] .tk-label:hover { background: #3A6BE0; }
html[data-rt="dark"] .dd-panel { box-shadow: 0 18px 48px rgba(0, 0, 0, .55); }
html[data-rt="dark"] .ring .ring-bg { stroke: var(--line); }
html[data-rt="dark"] .today, html[data-rt="dark"] .wk-cover { box-shadow: 0 0 0 1px var(--line2), 0 30px 60px -40px rgba(0, 0, 0, .9); }
html[data-rt="dark"] .tp, html[data-rt="dark"] .tp-5 { background: #1A2744; color: var(--muted); }
html[data-rt="dark"] .tp-0 { background: rgba(13, 88, 232, .24); color: #9DBBFF; }
html[data-rt="dark"] .tp-1 { background: rgba(22, 216, 238, .16); color: #6FE6F4; }
html[data-rt="dark"] .tp-2 { background: rgba(156, 92, 255, .22); color: #CDB2FF; }
html[data-rt="dark"] .tp-3 { background: rgba(255, 107, 87, .18); color: #FF9C8C; }
html[data-rt="dark"] .tp-4 { background: rgba(255, 170, 40, .16); color: #F2C277; }
html[data-rt="dark"] .ar-read { color: #6FE6F4; }
html[data-rt="dark"] .ar-body { border-top-color: var(--line); }
html[data-rt="dark"] .cell, html[data-rt="dark"] .cell.soon { background: #1C2945; }
html[data-rt="dark"] .cell.on { background: color-mix(in srgb, var(--c) 60%, #0A1226); }
html[data-rt="dark"] .cell.soon { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, #0A1226); }
html[data-rt="dark"] .tool-at { background: linear-gradient(160deg, #121D38, #16264A); }
html[data-rt="dark"] .tool-pace { background: linear-gradient(160deg, #121D38, #1D1A45); }
html[data-rt="dark"] .tool-kj, html[data-rt="dark"] .tool-kj:hover { background: #2A2012; border-color: #5A4520; color: #F3E2C0; }
html[data-rt="dark"] .tool-kj span:not(.mono) { color: #D9C08A; }
html[data-rt="dark"] .bar { background: var(--line); }
html[data-rt="dark"] .ep-thumb { background: linear-gradient(135deg, #16233F, #1C2B4D); }
html[data-rt="dark"] .soon { background: rgba(10, 18, 38, .85); }
html[data-rt="dark"] .ep-seen { background: rgba(22, 216, 238, .14); color: #6FE6F4; }
/* ==== 深色外观结束 ==== */
