/*
 * 新版加的页面用到、旧版 CSS 里没有的样式（旧版复制来的七份 CSS 一个字不改，见 theme.css）。
 * 在 theme.css 之后引入（routes/_site.tsx）；只用旧版的 --pd-* 设计令牌，新加的令牌写在各自那一段开头。
 */

/* ===== 经济公开页 /economy.html（components/economy/EconomyPage.tsx，站长 2026-10-07 选的方案 A） ===== */

/* 图表的两个颜色：浅色、深色两组都过了色盲区分度校验，跟论坛主题一起换 */
:root {
  --pd-econ-in: #0052d9;
  --pd-econ-out: #b94a00;
}
body.theme-pd-dark {
  --pd-econ-in: #0098fd;
  --pd-econ-out: #d9732a;
}

.pd-econ h3 {
  margin: 0;
  font-size: var(--pd-fs-md);
  font-weight: var(--pd-fw-semibold);
  line-height: var(--pd-lh-tight);
}
.pd-econ .pd-side-title {
  display: flex;
  align-items: center;
  gap: var(--pd-space-1);
}
.pd-econ .pd-side-title i {
  color: var(--pd-color-primary);
  font-size: var(--pd-icon-md);
}
.pd-econ-section {
  display: grid;
  gap: var(--pd-space-2);
  min-width: 0;
}
.pd-econ-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pd-space-3);
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
}
.pd-econ-key {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--pd-space-1) / 2);
}
.pd-econ-key::before {
  content: "";
  width: var(--pd-space-1);
  height: var(--pd-space-1);
  border-radius: calc(var(--pd-radius-xs) / 2);
}
.pd-econ-key--in::before {
  background: var(--pd-econ-in);
}
.pd-econ-key--out::before {
  background: var(--pd-econ-out);
}
.pd-econ-key--net::before {
  background: var(--pd-color-text-tertiary);
}

/* 图在自己的横向滚动容器里：窄屏不撑破页面 */
.pd-econ-scroll {
  overflow-x: auto;
}
.pd-econ-chart {
  display: block;
  width: 100%;
  height: auto;
  min-width: 560px;
}
.pd-econ-chart text {
  fill: var(--pd-color-text-secondary);
  font-size: 12px;
  font-family: var(--pd-font-body);
}
.ec-in {
  fill: var(--pd-econ-in);
}
.ec-out {
  fill: var(--pd-econ-out);
}
.ec-grid {
  stroke: var(--pd-color-divider);
  stroke-width: 1;
}
.ec-zero {
  stroke: var(--pd-color-border-strong);
  stroke-width: 1;
}
.ec-holiday {
  fill: var(--pd-color-surface-soft);
}
.ec-hit {
  fill: transparent;
}
.is-hovering .ec-col:not(.is-hot) .ec-bar {
  opacity: 0.35;
}
.ec-line {
  fill: none;
  stroke: var(--pd-econ-in);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.pd-econ-spark {
  display: block;
  width: 100%;
  height: var(--pd-space-5);
}
.pd-econ-tip {
  position: fixed;
  z-index: 1001;
  display: grid;
  gap: calc(var(--pd-space-1) / 2);
  min-width: calc(var(--pd-sidebar-width) / 2);
  padding: var(--pd-space-1) var(--pd-space-2);
  background: var(--pd-color-surface);
  color: var(--pd-color-text);
  border: 1px solid var(--pd-color-border);
  border-radius: var(--pd-radius-sm);
  box-shadow: var(--pd-shadow-2);
  font-size: var(--pd-fs-xs);
  line-height: var(--pd-lh-normal);
  pointer-events: none;
}
.pd-econ-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pd-space-2);
}
.pd-econ-tip-row b {
  font-weight: var(--pd-fw-semibold);
  font-variant-numeric: tabular-nums;
}
.pd-econ-tip-note {
  color: var(--pd-color-text-secondary);
}
.pd-econ-foot {
  margin: 0;
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
  line-height: var(--pd-lh-normal);
}
.pd-econ-data summary {
  color: var(--pd-color-link);
  font-size: var(--pd-fs-xs);
  cursor: pointer;
}
.pd-econ-data[open] summary {
  margin-bottom: var(--pd-space-2);
}
.pd-econ .pd-econ-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 鱼丸从哪来 / 去了哪 */
.pd-econ-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pd-space-3);
}
.pd-econ-panel {
  display: grid;
  align-content: start;
  gap: var(--pd-space-2);
  min-width: 0;
  padding: var(--pd-card-padding);
  border: 1px solid var(--pd-color-border);
  border-radius: var(--pd-card-radius);
}
.pd-econ-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--pd-space-2);
}
.pd-econ-panel-head b {
  font-size: var(--pd-fs-md);
  font-weight: var(--pd-fw-semibold);
  font-variant-numeric: tabular-nums;
}

/* 右栏：银行、劳动榜、管家播报 */
.pd-econ-meter {
  height: calc(var(--pd-space-1) / 2);
  overflow: hidden;
  background: var(--pd-color-surface-soft);
  border-radius: var(--pd-radius-pill);
}
.pd-econ-meter > span {
  display: block;
  width: var(--pd-econ-share, 0%);
  height: 100%;
  background: var(--pd-color-primary);
  border-radius: inherit;
}
.pd-econ-kv {
  display: grid;
  gap: calc(var(--pd-space-1) / 2);
  margin: 0;
}
.pd-econ-kv > div {
  display: flex;
  justify-content: space-between;
  gap: var(--pd-space-2);
  font-size: var(--pd-fs-xs);
}
.pd-econ-kv dt {
  color: var(--pd-color-text-secondary);
}
.pd-econ-kv dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.pd-econ-big {
  display: block;
  margin-bottom: var(--pd-space-1);
  color: var(--pd-color-text);
  font-size: var(--pd-fs-lg);
  font-weight: var(--pd-fw-semibold);
  line-height: var(--pd-lh-tight);
  font-variant-numeric: tabular-nums;
}
.pd-econ-side-body {
  display: grid;
  gap: var(--pd-space-2);
}
.pd-econ-side-body p {
  margin: 0;
  font-size: var(--pd-fs-xs);
  line-height: var(--pd-lh-normal);
  color: var(--pd-color-text-secondary);
}
.pd-econ-rank {
  display: grid;
  gap: var(--pd-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-econ-rank li {
  display: grid;
  grid-template-columns: var(--pd-icon-lg) var(--pd-space-5) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--pd-space-1);
}
.pd-econ-rank li.pd-econ-rank-empty {
  display: block;
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
  line-height: var(--pd-lh-normal);
}
.pd-econ-rank-no {
  color: var(--pd-color-text-tertiary);
  font-size: var(--pd-fs-xs);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.pd-econ-rank li:nth-child(-n + 3) .pd-econ-rank-no {
  color: var(--pd-color-primary);
  font-weight: var(--pd-fw-semibold);
}
.pd-econ-avatar {
  width: var(--pd-space-5);
  height: var(--pd-space-5);
  border-radius: var(--pd-radius-round);
  object-fit: cover;
}
.pd-econ-who {
  display: grid;
  gap: calc(var(--pd-space-1) / 4);
  min-width: 0;
}
.pd-econ-who > a {
  overflow: hidden;
  color: var(--pd-color-text);
  font-size: var(--pd-fs-sm);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pd-econ-who .pd-level-badge {
  justify-self: start;
}
.pd-econ-rank-panel[hidden] {
  display: none;
}
.pd-econ-cast {
  display: grid;
  gap: var(--pd-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-econ-cast li {
  display: grid;
  grid-template-columns: var(--pd-space-5) minmax(0, 1fr);
  gap: var(--pd-space-1);
  align-items: start;
}
.pd-econ-cast-text {
  display: grid;
  gap: calc(var(--pd-space-1) / 4);
  min-width: 0;
}
.pd-econ-cast-text a {
  font-size: var(--pd-fs-xs);
  font-weight: var(--pd-fw-semibold);
}
.pd-econ-cast-text p {
  margin: 0;
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
  line-height: var(--pd-lh-normal);
}

/* 「鱼丸从哪来 / 去了哪」的条：新发蓝、收回橙（选择器更具体，放在后面） */
.pd-econ-flow--out .pd-wallet-source-bar > span {
  background: var(--pd-econ-out);
}
.pd-econ-flow--in .pd-wallet-source-bar > span {
  background: var(--pd-econ-in);
}

/* 右栏在窄屏时排到下面 */
@media (max-width: 1000px) {
  body.theme-pd .pd-econ-a.pd-home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .pd-econ-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .pd-econ .pd-wallet-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pd-econ .pd-wallet-number {
    font-size: var(--pd-fs-lg);
  }
  .pd-econ .pd-wallet-metric {
    padding: var(--pd-card-padding-sm);
  }
}
/* ===== 首页右栏「新手任务」卡片（components/home/NewbieCard.tsx，站长 2026-10-07 定，规则见 core 的 newbie.ts） ===== */

body.theme-pd .pd-newbie-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--pd-space-2);
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
}
body.theme-pd .pd-newbie-summary b {
  color: var(--pd-color-text);
  font-weight: var(--pd-fw-semibold);
}
body.theme-pd .pd-newbie-bar {
  height: var(--pd-space-1);
  margin: var(--pd-space-1) 0 var(--pd-space-3);
  overflow: hidden;
  background: var(--pd-color-surface-subtle);
  border-radius: var(--pd-radius-pill);
}
body.theme-pd .pd-newbie-bar > span {
  display: block;
  width: var(--pd-newbie-progress, 0%);
  height: 100%;
  background: var(--pd-color-primary);
  border-radius: inherit;
}
body.theme-pd .pd-newbie-list {
  display: grid;
  gap: var(--pd-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--pd-fs-sm);
  line-height: var(--pd-lh-snug);
}
body.theme-pd .pd-newbie-list li {
  display: flex;
  align-items: center;
  gap: var(--pd-space-2);
  min-width: 0;
}
body.theme-pd .pd-newbie-list li > i {
  flex: 0 0 var(--pd-icon-sm);
  color: var(--pd-color-text-tertiary);
  font-size: var(--pd-icon-sm);
  text-align: center;
}
body.theme-pd .pd-newbie-list li.is-done > i {
  color: var(--pd-color-success);
}
body.theme-pd .pd-newbie-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--pd-color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.theme-pd a.pd-newbie-name {
  color: var(--pd-color-link);
  text-decoration: none;
}
body.theme-pd a.pd-newbie-name:hover {
  color: var(--pd-color-link-hover);
}
body.theme-pd .pd-newbie-list li.is-done .pd-newbie-name {
  color: var(--pd-color-text-secondary);
  text-decoration: line-through;
}
body.theme-pd .pd-newbie-points {
  flex: 0 0 auto;
  color: var(--pd-color-primary);
  font-size: var(--pd-fs-xs);
  font-weight: var(--pd-fw-semibold);
}
body.theme-pd .pd-newbie-list li.is-done .pd-newbie-points {
  color: var(--pd-color-text-tertiary);
}
body.theme-pd .pd-newbie-note {
  margin-top: var(--pd-space-3);
}
/* 经济公开页：广告收入返还卡片的贡献分（2026-10-07） */
.pd-econ-score {
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* ===== 鱼塘：经济页的「鱼塘」一块和鱼塘账本页 /ledger.html（components/pond/PondParts.tsx、components/ledger/LedgerPage.tsx，docs/pond.md） ===== */

/* 鱼塘的四个概况排成两列：总量动不动是 1 亿，四列放不下；手机上一列 */
.pd-econ .pd-wallet-metrics.pd-econ-pond-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .pd-econ .pd-wallet-metrics.pd-econ-pond-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 鱼情的小标签：圆点的颜色是好（成功色）、一般（警告色）、紧（错误色） */
.pd-econ-weather {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--pd-space-1) / 2);
  color: var(--pd-color-text);
  font-size: var(--pd-fs-xs);
  font-weight: var(--pd-fw-semibold);
  white-space: nowrap;
}
.pd-econ-weather::before {
  content: "";
  width: var(--pd-space-1);
  height: var(--pd-space-1);
  background: var(--pd-econ-weather-c, var(--pd-color-text-tertiary));
  border-radius: var(--pd-radius-round);
}
.pd-econ-weather--good {
  --pd-econ-weather-c: var(--pd-color-success);
}
.pd-econ-weather--normal {
  --pd-econ-weather-c: var(--pd-color-warning);
}
.pd-econ-weather--tight {
  --pd-econ-weather-c: var(--pd-color-error);
}
/* 今天钓出了多少：进度条粗一点，按鱼情上色（选择器比 .pd-econ-meter > span 更具体） */
.pd-econ-pond-day .pd-econ-meter {
  height: var(--pd-space-1);
}
.pd-econ-meter--good > .pd-econ-pond-fill {
  background: var(--pd-color-success);
}
.pd-econ-meter--normal > .pd-econ-pond-fill {
  background: var(--pd-color-warning);
}
.pd-econ-meter--tight > .pd-econ-pond-fill {
  background: var(--pd-color-error);
}

/* 指纹、盐：等宽字，整串换行 */
.pd-econ-seal-hash,
.pd-ledger-hash {
  font-family: var(--pd-font-mono);
  font-size: var(--pd-fs-xs);
  color: var(--pd-color-text);
}
.pd-ledger-hash--full {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: var(--pd-lh-normal);
}

/* 经济页：最近几次封账 */
.pd-econ-seals {
  display: grid;
  gap: var(--pd-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-econ-seal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--pd-space-2);
  font-size: var(--pd-fs-xs);
}
.pd-econ-seal-n {
  color: var(--pd-color-text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 账本页：封账列表，每天一行，点开看完整指纹 */
.pd-ledger-seals,
.pd-ledger-mine {
  display: grid;
  gap: var(--pd-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-ledger-seal,
.pd-ledger-mine-item {
  border: 1px solid var(--pd-color-border);
  border-radius: var(--pd-radius-md);
  min-width: 0;
}
.pd-ledger-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--pd-space-2);
  padding: var(--pd-space-1) var(--pd-space-2);
  font-size: var(--pd-fs-sm);
  cursor: pointer;
  list-style: none;
}
.pd-ledger-summary::-webkit-details-marker {
  display: none;
}
.pd-ledger-summary:hover {
  background: var(--pd-color-surface-soft);
}
.pd-ledger-seal-n {
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pd-ledger-seal[open] > .pd-ledger-summary {
  border-bottom: 1px solid var(--pd-color-border);
}
.pd-ledger-kv {
  display: grid;
  gap: var(--pd-space-2);
  margin: 0;
  padding: var(--pd-space-2);
}
.pd-ledger-kv > div {
  display: grid;
  gap: calc(var(--pd-space-1) / 2);
  min-width: 0;
}
.pd-ledger-kv dt {
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
}
.pd-ledger-kv dd {
  margin: 0;
  min-width: 0;
  font-size: var(--pd-fs-sm);
}
.pd-ledger-rules {
  margin-bottom: var(--pd-space-2);
}

/* 账本页：公开流水里的数量（鱼丸、金币图标 + 数字，两样都有就并排） */
.pd-ledger-amounts {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pd-space-1);
}

/* 账本页：我的账，每笔一张小卡片，点开看盐和指纹 */
.pd-ledger-mine-item {
  padding: var(--pd-space-2);
}
.pd-ledger-mine-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--pd-space-2);
}
.pd-ledger-mine-head .pd-wallet-reason {
  flex: 1 1 auto;
}
.pd-ledger-more-summary {
  margin-top: var(--pd-space-1);
  color: var(--pd-color-link);
  font-size: var(--pd-fs-xs);
  cursor: pointer;
}
.pd-ledger-mine-more[open] > .pd-ledger-more-summary {
  margin-bottom: var(--pd-space-1);
}
.pd-ledger-mine-more .pd-ledger-kv {
  padding: 0;
}

/* ===== 钓鱼 /fishing（components/fishing/FishingPage.tsx）和首页右栏的钓鱼入口 ===== */

/* 稀有度的颜色：普通蓝、少见绿、稀有紫、传说橙，跟论坛主题的文字色一起换 */
.pd-fishing-rarity--common {
  --pd-fishing-c: var(--pd-text-blue);
}
.pd-fishing-rarity--uncommon {
  --pd-fishing-c: var(--pd-text-green);
}
.pd-fishing-rarity--rare {
  --pd-fishing-c: var(--pd-text-purple);
}
.pd-fishing-rarity--legend {
  --pd-fishing-c: var(--pd-text-orange);
}
.pd-fishing-rarity {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--pd-space-1);
  border-radius: var(--pd-radius-pill);
  background: color-mix(in srgb, var(--pd-fishing-c) 12%, transparent);
  color: var(--pd-fishing-c);
  font-size: var(--pd-fs-xs);
  font-weight: var(--pd-fw-medium);
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
}
.pd-fishing-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.pd-fishing-welcome {
  margin: 0;
  padding: var(--pd-space-2) var(--pd-space-3);
  border-radius: var(--pd-radius-md);
  background: var(--pd-color-success-soft);
  color: var(--pd-color-success);
  font-size: var(--pd-fs-sm);
}

/* 鱼塘：水面、几道波纹、钓竿、鱼线和浮漂；抛竿（is-casting）时浮漂往下沉、水面起涟漪，出水（is-caught）时鱼跳出来 */
.pd-fishing-stage {
  display: grid;
  gap: var(--pd-space-2);
}
.pd-fishing-pond {
  position: relative;
  height: 176px;
  overflow: hidden;
  border: 1px solid var(--pd-color-border);
  border-radius: var(--pd-radius-lg);
  background: color-mix(in srgb, var(--pd-text-blue) 10%, var(--pd-color-surface));
}
.pd-fishing-wave {
  position: absolute;
  height: var(--pd-space-2);
  border-top: 2px solid color-mix(in srgb, var(--pd-text-blue) 35%, transparent);
  border-radius: 50%;
}
.pd-fishing-wave--1 {
  top: 48px;
  left: 8%;
  width: 28%;
}
.pd-fishing-wave--2 {
  top: 96px;
  left: 44%;
  width: 36%;
}
.pd-fishing-wave--3 {
  top: 136px;
  left: 16%;
  width: 22%;
}
/* 钓竿用 CSS 画：一根斜着的竿子（根部手柄粗一点），竿尖在 (154px, 47px)，鱼线从竿尖垂到浮漂 */
.pd-fishing-rod {
  position: absolute;
  bottom: 20px;
  left: 24px;
  width: 170px;
  height: 4px;
  border-radius: var(--pd-radius-pill);
  background: var(--pd-color-text-secondary);
  transform: rotate(-40deg);
  transform-origin: 0 50%;
}
.pd-fishing-rod::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 40px;
  height: 8px;
  border-radius: var(--pd-radius-pill);
  background: var(--pd-color-text);
}
.pd-fishing-rod::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 28px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--pd-color-text-secondary);
  border-radius: 50%;
}
.pd-fishing-line {
  position: absolute;
  top: 47px;
  left: 154px;
  width: 1px;
  height: 46px;
  background: var(--pd-color-text-tertiary);
  transform-origin: top center;
}
.pd-fishing-bobber {
  position: absolute;
  top: 90px;
  left: 147px;
  width: 14px;
  height: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pd-text-red) 70%, var(--pd-color-text));
  border-radius: 50%;
  background: var(--pd-text-red);
}
.pd-fishing-bobber::after {
  content: "";
  position: absolute;
  inset: 50% 0 0;
  background: var(--pd-color-surface);
}
.pd-fishing-ripple {
  position: absolute;
  top: 98px;
  left: 130px;
  width: 48px;
  height: 12px;
  border: 1px solid color-mix(in srgb, var(--pd-text-blue) 50%, transparent);
  border-radius: 50%;
  opacity: 0;
}
.pd-fishing-jump {
  --pd-fishing-c: var(--pd-text-blue);
  position: absolute;
  top: 48px;
  left: 176px;
  width: 48px;
  color: var(--pd-fishing-c);
  font-size: 40px;
  line-height: 1;
  text-align: center;
}
.pd-fishing-jump--miss {
  --pd-fishing-c: var(--pd-color-text-tertiary);
  top: 64px;
  font-size: 32px;
}
@keyframes pd-fishing-drift {
  from {
    transform: translateX(-8px);
  }
  to {
    transform: translateX(8px);
  }
}
@keyframes pd-fishing-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}
@keyframes pd-fishing-cast {
  0% {
    transform: rotate(-40deg);
  }
  40% {
    transform: rotate(-70deg);
  }
  100% {
    transform: rotate(-40deg);
  }
}
@keyframes pd-fishing-line {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes pd-fishing-bite {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}
@keyframes pd-fishing-ripple {
  from {
    opacity: 0.9;
    transform: scale(0.4);
  }
  to {
    opacity: 0;
    transform: scale(1.6);
  }
}
@keyframes pd-fishing-leap {
  0% {
    opacity: 0;
    transform: translateY(48px) rotate(30deg) scale(0.6);
  }
  60% {
    opacity: 1;
    transform: translateY(-12px) rotate(-12deg) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}
/* 动画只在没有要求「减少动态效果」时放 */
@media (prefers-reduced-motion: no-preference) {
  .pd-fishing-wave {
    animation: pd-fishing-drift 6s ease-in-out infinite alternate;
  }
  .pd-fishing-wave--2 {
    animation-delay: -2s;
  }
  .pd-fishing-wave--3 {
    animation-delay: -4s;
  }
  .pd-fishing-bobber {
    animation: pd-fishing-bob 2.4s ease-in-out infinite;
  }
  .pd-fishing-jump {
    animation: pd-fishing-leap 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }
  .pd-fishing-pond.is-casting .pd-fishing-rod {
    animation: pd-fishing-cast 0.6s ease-out both;
  }
  .pd-fishing-pond.is-casting .pd-fishing-line {
    animation: pd-fishing-line 0.6s ease-out both;
  }
  .pd-fishing-pond.is-casting .pd-fishing-bobber {
    animation: pd-fishing-bite 0.5s ease-in-out 0.6s infinite;
  }
  .pd-fishing-pond.is-casting .pd-fishing-ripple {
    animation: pd-fishing-ripple 1s ease-out 0.6s infinite;
  }
  .pd-fishing-pond:is(.is-caught, .is-missed) .pd-fishing-bobber {
    animation: none;
  }
}
.pd-fishing-result p {
  margin: 0;
  min-height: 1.6em;
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-sm);
}
.pd-fishing-cast {
  margin: 0;
}
.pd-fishing-cast .pd-btn,
.pd-fishing-sell-all .pd-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--pd-space-1);
}

/* 鱼篓 */
.pd-fishing-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: var(--pd-fw-medium);
}
.pd-fishing .pd-fishing-name i {
  color: var(--pd-color-text-tertiary);
}
.pd-fishing-basket td:last-child {
  text-align: right;
}
.pd-fishing-basket form {
  margin: 0;
}
.pd-fishing-sell-all {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pd-space-2);
  margin: 0;
}

/* 图鉴：没钓到的灰着 */
.pd-fishing-dex {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--pd-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-fishing-dex-item {
  display: flex;
  gap: var(--pd-space-2);
  min-width: 0;
  padding: var(--pd-space-2);
  border: 1px solid var(--pd-color-divider);
  border-radius: var(--pd-radius-md);
  background: var(--pd-color-surface);
}
.pd-fishing-dex-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--pd-radius-md);
  background: color-mix(in srgb, var(--pd-fishing-c) 12%, transparent);
  color: var(--pd-fishing-c);
  font-size: var(--pd-icon-md);
}
.pd-fishing-dex-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.pd-fishing-dex-body b {
  font-size: var(--pd-fs-sm);
  font-weight: var(--pd-fw-semibold);
}
.pd-fishing-dex-body small {
  color: var(--pd-color-text-tertiary);
  font-size: var(--pd-fs-xs);
  line-height: var(--pd-lh-snug);
}
.pd-fishing-dex-item:not(.is-caught) {
  background: var(--pd-color-surface-soft);
}
.pd-fishing-dex-item:not(.is-caught) .pd-fishing-dex-icon,
.pd-fishing-dex-item:not(.is-caught) .pd-fishing-rarity {
  --pd-fishing-c: var(--pd-color-text-tertiary);
}
.pd-fishing-dex-item:not(.is-caught) .pd-fishing-dex-body b {
  color: var(--pd-color-text-secondary);
}
.pd-fishing-rules {
  display: grid;
  gap: var(--pd-space-1);
  margin: 0;
  padding-left: var(--pd-space-3);
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-sm);
  line-height: var(--pd-lh-relaxed);
}

/* 右栏本周榜 */
.pd-fishing-board {
  display: grid;
  gap: var(--pd-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-fishing-board li {
  display: flex;
  align-items: center;
  gap: var(--pd-space-2);
  min-width: 0;
}
.pd-fishing-board-rank {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--pd-space-4);
  height: var(--pd-space-4);
  border-radius: 50%;
  background: var(--pd-color-surface-soft);
  color: var(--pd-color-text-secondary);
  font-size: var(--pd-fs-xs);
  font-weight: var(--pd-fw-semibold);
}
.pd-fishing-board-rank.pd-fishing-rarity--legend {
  background: color-mix(in srgb, var(--pd-fishing-c) 12%, transparent);
  color: var(--pd-fishing-c);
}
.pd-fishing-board-body {
  display: grid;
  min-width: 0;
}
.pd-fishing-board-body a {
  overflow: hidden;
  font-size: var(--pd-fs-sm);
  font-weight: var(--pd-fw-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-fishing-board-body small {
  color: var(--pd-color-text-tertiary);
  font-size: var(--pd-fs-xs);
}
.pd-fishing-side-empty {
  margin: 0;
  color: var(--pd-color-text-tertiary);
  font-size: var(--pd-fs-sm);
}

@media (max-width: 1000px) {
  body.theme-pd .pd-fishing .pd-home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .pd-fishing-dex {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 首页右栏的钓鱼入口：和银行、商城、彩票的 300 × 60 宣传图同样大小，用图标和文字拼出来（没有图片） */
body.theme-pd .pd-side-promo.pd-side-promo--fishing {
  display: flex;
  align-items: center;
  gap: var(--pd-space-2);
  padding: 0 var(--pd-space-3);
  color: var(--pd-color-text);
  text-decoration: none;
}
body.theme-pd .pd-side-promo.pd-side-promo--fishing:hover {
  background: var(--pd-color-surface-soft);
}
.pd-side-promo--fishing .pd-side-promo-ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--pd-radius-md);
  background: color-mix(in srgb, var(--pd-text-blue) 12%, transparent);
  color: var(--pd-text-blue);
  font-size: var(--pd-icon-md);
}
.pd-side-promo--fishing .pd-side-promo-text {
  display: grid;
  min-width: 0;
}
body.theme-pd .pd-side-promo--fishing .pd-side-promo-text b {
  font-size: var(--pd-fs-sm);
  font-weight: var(--pd-fw-semibold);
  line-height: 1.4;
}
body.theme-pd .pd-side-promo--fishing .pd-side-promo-text small {
  overflow: hidden;
  color: var(--pd-color-text-tertiary);
  font-size: var(--pd-fs-xs);
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 换页时横幅淡入（lib/banner-fade.ts，站长 2026-10-07 提的） ===== */

/* 上一张横幅的副本叠在新横幅上面（同样的 class，位置、大小和新横幅一样），新图准备好以后淡出 */
.pd-banner-leaving {
  pointer-events: none;
  transition: opacity 0.5s ease-out;
}
.pd-banner-leaving.is-out {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .pd-banner-leaving {
    transition: none;
  }
}
