/* 咸水周末速查站 · 方向 B「纸卡」（用户 10-17 定）：纸色底、墨字、橙色强调，像图文速查卡和钓具店墙上的卡片。
   浅色为主，跟随系统切深色。手机优先，一列；电脑上内容区最宽 880px。
   字体只用系统字体：Google Fonts 在国内打不开。 */
:root {
  --bg: #f4f1e8; --panel: #fbfaf5; --line: #d8d2c2; --rule: #141412;
  --ink: #141412; --muted: #66625a; --accent: #d9481a; --lime: #d4ff3a; --ok: #3f6b00; --ex: #9a5b00;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #141412; --panel: #1d1c19; --line: #3a3833; --rule: #ece9de; --ink: #ece9de; --muted: #a39e92; --accent: #ff6a32; --ok: #b5e06a; --ex: #ffc06b; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #141412; --panel: #1d1c19; --line: #3a3833; --rule: #ece9de; --ink: #ece9de; --muted: #a39e92; --accent: #ff6a32; --ok: #b5e06a; --ex: #ffc06b; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.75; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 880px; margin-inline: auto; padding-block: 0 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 30px; }
header.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: max(18px, env(safe-area-inset-top, 0px)); gap: 6px 16px; border-bottom: 3px solid var(--rule); padding-bottom: 12px; }
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.logo b { font-weight: 900; font-size: 22px; letter-spacing: .02em; }
.logo span { font-weight: 900; font-size: 12px; color: var(--accent); letter-spacing: .1em; }
nav.top { display: flex; gap: 4px 12px; flex-wrap: wrap; }
nav.top a { font-size: 15px; text-decoration: none; font-weight: 500; }
nav.top a[aria-current] { color: var(--accent); }
h1, h2, h3 { text-wrap: balance; }
.hero { display: flex; flex-direction: column; gap: 14px; }
.hero h1 { font-weight: 900; font-size: clamp(32px, 7.5vw, 50px); line-height: 1.18; margin: 0; }
.hero h1 em { font-style: normal; background: var(--lime); color: #0d0d0d; padding: 0 .12em; }
.hero p { margin: 0; color: var(--muted); max-width: 40ch; }
form.search { display: flex; align-items: center; gap: 10px; border: 2px solid var(--rule); background: var(--panel); padding: 4px 6px 4px 16px; border-radius: 999px; }
form.search::before { content: "⌕"; color: var(--accent); font-size: 18px; }
form.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; padding: 8px 0; outline: none; }
form.search button { border: 0; background: var(--rule); color: var(--bg); font: inherit; font-size: 14px; font-weight: 700; padding: 7px 16px; border-radius: 999px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; background: var(--panel); border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; text-decoration: none; }
.chip:hover { border-color: var(--rule); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 20px; font-weight: 900; margin: 0; }
.sec-h h2::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.sec-h a, .sec-h span { font-size: 14px; color: var(--muted); }
.entries { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.entry { background: var(--panel); border: 2px solid var(--rule); padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; min-width: 0; box-shadow: 4px 4px 0 var(--rule); }
.entry b { font-size: 22px; font-weight: 900; }
.entry span { font-size: 13px; color: var(--muted); }
.entry:hover { box-shadow: 4px 4px 0 var(--accent); }
.entry.empty { box-shadow: none; border-style: dashed; border-width: 1px; border-color: var(--line); }
.cards { display: grid; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--accent); padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; text-decoration: none; }
.card:hover { border-color: var(--rule); border-left-color: var(--accent); }
.card .kind { font-size: 12px; color: var(--accent); grid-column: 1 / -1; font-weight: 700; }
.card b { font-size: 19px; font-weight: 900; }
.card p { margin: 0; font-size: 14px; color: var(--muted); grid-column: 1 / -1; }
.card .count { font-family: var(--mono); font-size: 12px; color: var(--ok); align-self: center; white-space: nowrap; }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 14px; }
.tile { background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.tile img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: var(--line); }
.tile div { padding: 8px 10px 10px; font-size: 14px; font-weight: 500; line-height: 1.5; }
.tile small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }
footer.site { border-top: 3px solid var(--rule); padding-top: 18px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
footer.site code, .mail { font-family: var(--mono); color: var(--ink); background: var(--panel); padding: 1px 6px; user-select: all; }
.crumb { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.crumb a { text-decoration: none; }
.cardhead { display: flex; flex-direction: column; gap: 8px; }
.cardhead h1 { font-weight: 900; font-size: clamp(34px, 9vw, 54px); margin: 0; line-height: 1.1; }
.cardhead .alias { font-size: 14px; color: var(--muted); }
.cardhead .lede { margin: 0; font-size: 18px; max-width: 44ch; }
/* 一个东西一页的第一段：能照做的答案，加粗、左边一道橙线 */
.cardhead .answer { font-weight: 700; border-left: 4px solid var(--accent); padding-left: 12px; }
.cardhead .lede2 { margin: 0; font-size: 15px; color: var(--muted); max-width: 52ch; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--muted); align-items: center; }
.st { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 999px; white-space: nowrap; line-height: 1.7; }
.st.ok { background: var(--ok); color: var(--bg); }
.st.angler { background: var(--lime); color: #0d0d0d; }
.st.ex { color: var(--ex); border: 1.5px solid var(--ex); }
.st.no { color: var(--muted); border: 1.5px solid var(--line); }
.diagram { background: #0b1a24; border: 2px solid var(--rule); padding: 12px; margin: 0; }
.diagram svg { width: 100%; max-width: 520px; height: auto; display: block; margin-inline: auto; }
.diagram figcaption { font-size: 13px; color: #c9d4d8; margin-top: 6px; }
.prose { display: flex; flex-direction: column; gap: 10px; }
.prose p { margin: 0; max-width: 65ch; }
.prose ul { margin: 0; padding-left: 1.2em; max-width: 65ch; }
.prose li { margin: 4px 0; }
.prose h3 { font-size: 17px; margin: 6px 0 0; }
.tw { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
sup.r { font-family: var(--mono); font-size: 10px; line-height: 0; margin-left: 1px; }
sup.r a { color: var(--accent); text-decoration: none; }
/* 正文里的依据角标：小数字，点了跳到本页「依据」 */
sup.cid { font-size: 11px; line-height: 0; margin-left: 1px; }
sup.cid a { font-family: var(--mono); color: var(--accent); text-decoration: none; padding: 0 1px; }
sup.cid a:hover { text-decoration: underline; }
#yiju .legend { margin-bottom: 12px; }
details.claim:target { outline: 2px solid var(--accent); }
.claims { display: flex; flex-direction: column; gap: 8px; }
details.claim { background: var(--panel); border: 1px solid var(--line); scroll-margin-top: 16px; }
details.claim:target { border-color: var(--accent); }
details.claim summary { list-style: none; cursor: pointer; padding: 11px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
details.claim summary::-webkit-details-marker { display: none; }
details.claim summary .id { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 4px; }
details.claim[open] summary { border-bottom: 1px dashed var(--line); }
details.claim .src { padding: 10px 12px 12px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
details.claim .src b { color: var(--ink); }
.scope { font-size: 13px; color: var(--muted); }
ol.sources { margin: 0; padding-left: 1.6em; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
ol.sources li { scroll-margin-top: 16px; }
ol.sources li:target { color: var(--ink); }
ol.sources b { color: var(--ink); }
.note { font-size: 14px; color: var(--muted); }
/* 图文：缩略图网格（手机 2 列、电脑 4 列），点开全屏大图左右翻 */
.gist { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 2px; max-width: 60ch; }
.tw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .tw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.tw-tile { position: relative; display: block; border: 1px solid var(--line); background: var(--panel); }
.tw-tile img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.tw-tile span { position: absolute; left: 6px; bottom: 6px; font: 700 12px/1 var(--mono); background: var(--rule); color: var(--bg); padding: 3px 6px; }
.tw-tile:hover, .tw-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tw-set .note { margin: 10px 0 0; }
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 9, .94); display: flex; align-items: center; justify-content: center; padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
.lb[hidden] { display: none; }
.lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 100%; }
.lb img { max-height: calc(100vh - 80px); max-width: min(100%, 720px); width: auto; height: auto; display: block; }
.lb figcaption { color: #ece9de; font: 700 13px/1 var(--mono); }
.lb button { background: none; border: 0; color: #ece9de; cursor: pointer; font-size: 40px; line-height: 1; padding: 8px 12px; }
.lb-x { position: absolute; top: max(8px, env(safe-area-inset-top, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: max(4px, env(safe-area-inset-left, 0px)); }
.lb-next { right: max(4px, env(safe-area-inset-right, 0px)); }
@media (max-width: 639px) { .lb-nav { top: auto; bottom: max(8px, env(safe-area-inset-bottom, 0px)); transform: none; } }
.vlinks { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.vrow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--panel); border: 1px solid var(--line); padding: 10px; }
.vrow img { width: 96px; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.vrow b { display: block; line-height: 1.5; }
.vrow small { color: var(--muted); }
.results { display: flex; flex-direction: column; gap: 8px; }
.results a { text-decoration: none; }
.hit { background: var(--panel); border: 1px solid var(--line); padding: 10px 12px; display: block; }
.hit small { color: var(--muted); display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.legend .lg { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
@media (max-width: 600px) { table { font-size: 14px; } th, td { padding: 8px 10px; } td:first-child { min-width: 6.5em; } }
.hit small { overflow-wrap: anywhere; }

/* 钓组库、认鱼（10-17）：钓组图和小工具一样是蓝图底 */
.rigfig { background: #16365c; border: 2px solid var(--rule); padding: 12px; margin: 0; }
.rigfig svg { width: 100%; max-width: 420px; height: auto; display: block; margin-inline: auto; }
.rigfig figcaption { font-size: 13px; color: #c9d4d8; margin-top: 6px; text-align: center; }
.fishfig { margin: 0; background: var(--panel); border: 1px solid var(--line); padding: 24px 16px; }
.fishfig svg { width: 100%; max-width: 560px; height: auto; display: block; margin-inline: auto; overflow: visible; }
.fishgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.fishtile { background: var(--panel); border: 1px solid var(--line); padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; min-width: 0; }
.fishtile svg { width: 100%; height: 64px; overflow: visible; margin-bottom: 8px; }
.fishtile b { font-size: 17px; }
.fishtile small { font-size: 12px; color: var(--muted); }
.fishtile:hover { border-color: var(--rule); }
.vhead { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; align-items: start; }
.vhead img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
@media (max-width: 520px) { .vhead { grid-template-columns: 1fr; } .vhead img { max-width: 260px; } }
td.n { width: 1%; }
/* 鱼的基本资料（FishBase + GBIF） */
dl.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; }
dl.facts > div { background: var(--panel); border: 1px solid var(--line); padding: 10px 12px; min-width: 0; }
dl.facts dt { font-size: 13px; color: var(--muted); }
dl.facts dd { margin: 2px 0 0; font-weight: 700; line-height: 1.5; }
/* 首页「这个月钓什么」 */
.mo-h { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.mo-h b { font-size: 20px; font-weight: 900; color: var(--ink); margin-right: 6px; }
.chips.hot .chip { background: var(--lime); color: #0d0d0d; border-color: var(--rule); font-weight: 700; }
#month .chips { margin-bottom: 12px; }
/* 「国内钓友怎么钓」：一种做法一行，右边写多常见 */
ul.ways { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.ways li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; background: var(--panel); border: 1px solid var(--line); padding: 8px 12px; }
ul.ways li span { min-width: 0; }
.pop { font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; padding: 1px 8px; border: 1px solid var(--rule); }
.pop.top { background: var(--lime); color: #0d0d0d; }
.pop.mid { background: var(--panel); }
.pop.low { color: var(--muted); border-color: var(--line); }
/* 三列以上的表在手机上改成一行一张卡 */
@media (max-width: 600px) {
  .tw.stack { overflow: visible; border: 0; background: none; }
  .tw.stack table, .tw.stack tbody, .tw.stack tr, .tw.stack td { display: block; width: 100%; }
  .tw.stack thead { display: none; }
  .tw.stack tr { background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; padding: 6px 0; }
  .tw.stack td { border: 0; padding: 4px 12px; min-width: 0; }
  .tw.stack td::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); }
  .tw.stack td:first-child { font-weight: 700; }
}
/* 术语就地解释：点一下或鼠标停上去显示一句白话 */
.term { position: relative; border-bottom: 1px dashed var(--accent); cursor: help; outline: none; }
.term .def { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 20; width: max-content; max-width: min(260px, 78vw); background: var(--rule); color: var(--bg); font-size: 13px; font-weight: 500; line-height: 1.6; padding: 8px 10px; box-shadow: 3px 3px 0 var(--accent); white-space: normal; }
.term:hover .def, .term:focus .def, .term:focus-within .def { display: block; }
/* 卡里的步骤：1. 2. 3. 分行 */
.prose ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 600px) { .tw.stack td:first-child::before { display: none; } .tw.stack td:first-child { font-size: 16px; } }
