/* 设计令牌与任务页（task-article.css）对齐，全族统一浅色主题 */
.article-modern-page {
  --am-bg: #eef3f4;
  --am-card: #ffffff;
  --am-soft: #f4f8f9;
  --am-line: #d6e0e3;
  --am-ink: #102a31;
  --am-text: #253b43;
  --am-muted: #526970;
  --am-accent: #0b7480;
  --am-accent-soft: #eef6f7;
  --am-row: #e2eaed;
  background: var(--am-bg);
  color: var(--am-text);
}

html,
body.article-modern-page {
  background: var(--am-bg);
}

body.article-modern-page:not(.takefu-shell-ready)::before {
  display: none;
  height: 0;
  border: 0;
  content: none;
}

.article-modern-page.takefu-shell-ready {
  background: var(--am-bg) !important;
  padding-top: 0;
}

.article-modern-main {
  padding: 14px 0 72px;
  background: var(--am-bg);
}

.article-modern-page.takefu-shell-ready .article-modern-main {
  margin-top: 0;
}

body.article-modern-page.article-bg-excluded {
  --am-bg: #eef3f1;
}

body.article-modern-page.article-bg-excluded .article-modern-main {
  background: linear-gradient(180deg, #edf5f0 0, #f8faf6 430px, #eef3f1 100%);
}

.article-modern-wrap {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
}

.article-modern-breadcrumb,
.article-modern-card {
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(24, 37, 44, 0.05);
}

.article-modern-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(820px, max(0px, calc(100% - 580px)));
  min-height: 44px;
  margin: 0 auto 16px;
  padding: 0 20px;
  color: #52626e;
  font-size: 14px;
}

.article-modern-breadcrumb a,
.article-modern-meta a,
.article-modern-content a {
  color: #8a6a35;
}

.article-modern-breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  text-decoration: none;
}

.article-modern-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 820px);
  justify-content: center;
  gap: 20px;
  align-items: start;
  padding-right: 230px;
}

.article-modern-center {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.article-modern-card {
  min-width: 0;
  overflow: hidden;
}

.article-modern-head {
  padding: 26px 30px 22px;
  border-bottom: 1px solid var(--am-line);
  text-align: left;
}

.article-modern-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--am-accent);
  font-size: 13px;
  font-weight: 900;
}

.article-modern-head h1 {
  max-width: none;
  margin: 0;
  color: var(--am-ink);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
}

.article-modern-lede {
  display: block;
  max-height: none;
  max-width: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: var(--am-soft);
  color: #4b6269;
  font-size: 14px;
  line-height: 1.75;
  overflow: visible;
  overflow-wrap: anywhere;
  text-align: left;
}

.article-modern-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 14px;
}

.article-modern-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--am-line);
  border-radius: 7px;
  background: var(--am-soft);
  color: var(--am-muted);
  font-size: 13px;
  font-weight: 800;
}

.article-modern-meta .takefu-click-counter,
.article-modern-meta [hidden],
.takefu-click-counter[hidden] {
  display: none !important;
}

.article-reader-shell.article-modern-reader {
  display: block;
  padding: 26px;
}

.article-modern-toc {
  position: relative;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.article-modern-toc .article-toc__title {
  display: none;
}

.article-modern-toc ol {
  position: relative;
  max-height: calc(100vh - 180px);
  margin: 0;
  padding: 0 2px 0 0;
  overflow: auto;
  list-style: none;
}

.article-modern-toc ol::before {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 10px;
  width: 3px;
  border-radius: 999px;
  background: #e1e8ec;
  content: "";
}

.article-modern-toc li {
  position: relative;
  margin: 0;
}

.article-modern-toc a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  min-height: 38px;
  margin-left: 28px;
  padding: 7px 9px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--am-text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.42;
  text-decoration: none;
}

.article-modern-toc a::before {
  position: absolute;
  top: 10px;
  left: -27px;
  width: 22px;
  height: 22px;
  border: 4px solid #e4ebef;
  border-radius: 999px;
  background: #fff;
  content: "";
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.article-modern-toc li.is-h3 a {
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
  color: var(--am-muted);
}

.article-modern-toc li.is-h3 a::before {
  width: 18px;
  height: 18px;
  left: -25px;
  border-width: 3px;
}

.article-modern-toc a:hover,
.article-modern-toc a:focus-visible,
.article-modern-toc a.is-active {
  border-color: var(--am-line);
  color: var(--am-ink);
  background: rgba(255, 255, 255, 0.08);
}

.article-modern-toc a:hover::before,
.article-modern-toc a:focus-visible::before,
.article-modern-toc a.is-active::before {
  border-color: #1f2930;
  background: #d8b56d;
  box-shadow: 0 0 0 5px rgba(31, 41, 48, 0.14);
}

.article-modern-toc a:focus-visible {
  outline: 2px solid rgba(123, 189, 205, 0.34);
  outline-offset: 2px;
}

.article-modern-toc a span {
  display: -webkit-box;
  max-height: 68px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.article-modern-toc li.is-h3 a span {
  max-height: 66px;
}

.article-modern-toc a:hover::after,
.article-modern-toc a:focus-visible::after {
  display: none;
  content: none;
}

.article-modern-content {
  min-width: 0;
  color: var(--am-text);
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-modern-content > *:first-child {
  margin-top: 0;
}

.article-modern-content p {
  margin: 0 0 14px;
}

.article-modern-content span[style*="font-family"],
.article-modern-content span[style*="white-space"],
.article-modern-content span[style*="background"],
.article-modern-content span[style*="color"] {
  background: transparent !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  white-space: normal !important;
}

.article-modern-content h2,
.article-modern-content h3,
.article-modern-content h4 {
  scroll-margin-top: 92px;
  color: var(--am-ink);
  line-height: 1.35;
}

.article-modern-content h2 {
  position: static;
  margin: 30px 0 12px;
  padding-left: 0;
  font-size: 24px;
  font-weight: 900;
}

.article-modern-content h3 {
  margin: 24px 0 10px;
  font-size: 18px;
  font-weight: 900;
}

.article-modern-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.article-image-paragraph {
  margin: 24px 0;
}

.article-modern-content .article-image-frame {
  position: relative;
  display: block;
  overflow: hidden;
  max-width: 100%;
  margin: 24px auto;
  border: 1px solid #dbe5e1;
  border-radius: 8px;
  background: #0f171d;
  color: inherit;
  cursor: zoom-in;
  text-decoration: none;
}

.article-modern-content .article-image-frame::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 10, 14, 0) 62%, rgba(5, 10, 14, 0.24) 100%);
  content: "";
  opacity: 0;
  transition: opacity 0.18s ease;
}

.article-modern-content .article-image-frame img {
  width: 100%;
  border-radius: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.article-modern-content .article-image-frame:hover img,
.article-modern-content .article-image-frame:focus-visible img {
  filter: saturate(1.04) contrast(1.02);
  transform: scale(1.012);
}

.article-modern-content .article-image-frame:hover::after,
.article-modern-content .article-image-frame:focus-visible::after {
  opacity: 1;
}

.article-image-frame__hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(7, 12, 16, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.article-image-frame:hover .article-image-frame__hint,
.article-image-frame:focus-visible .article-image-frame__hint {
  opacity: 1;
  transform: translateY(0);
}

.article-image-frame__caption {
  display: block;
  margin: -14px 0 22px;
  color: var(--am-muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.article-modern-content table {
  display: table;
  width: 100%;
  table-layout: fixed;
  margin: 10px 0 18px;
  overflow: hidden;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fbfdfd;
}

.article-modern-content th,
.article-modern-content td {
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--am-row);
  text-align: left;
  vertical-align: top;
}

.article-modern-content tr:last-child th,
.article-modern-content tr:last-child td {
  border-bottom: 0;
}

.article-modern-content th {
  width: 22%;
  color: var(--am-accent);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.article-modern-content .blood-table-wrap {
  max-width: 100%;
  margin: 24px 0;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid #dbe5e1;
  border-radius: 8px;
  background: #f8faf9;
  box-shadow: inset -18px 0 18px -18px rgba(20, 32, 42, 0.34);
}

.article-modern-content .blood-table {
  display: table;
  width: max-content;
  min-width: min(640px, 100%);
  max-width: none;
  margin: 0 auto;
  border-collapse: collapse;
  background: #333333;
}

.article-modern-content .blood-table th,
.article-modern-content .blood-table td {
  white-space: nowrap;
}

.article-modern-content .game-panel {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #dbe5e1;
  border-radius: 8px;
  background: #f8faf9;
}

.article-modern-content .game-panel + .game-panel {
  margin-top: 18px;
}

.article-modern-content .game-panel .panel-title {
  margin: 0 0 16px;
  font-size: 22px;
}

.article-modern-content .health-grid,
.article-modern-content .boss-grid {
  display: grid;
  gap: 12px;
}

.article-modern-content .health-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.article-modern-content .boss-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.article-modern-content .game-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  background: #fff;
}

.article-modern-content .health-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.article-modern-content .part-name,
.article-modern-content .card-name {
  color: var(--am-ink);
  font-size: 14px;
  font-weight: 900;
}

.article-modern-content .health-value {
  color: #9b2f24;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.article-modern-content .boss-card {
  border-left: 4px solid var(--am-accent);
}

.article-modern-content .card-top {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.article-modern-content blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--am-accent);
  border-radius: 0 8px 8px 0;
  background: #f7f8f5;
  color: #5f5148;
}

.article-modern-content pre {
  position: relative;
  overflow: auto;
  margin: 24px 0;
  padding: 42px 20px 18px;
  border: 1px solid #dbe5e1;
  border-radius: 8px;
  background: linear-gradient(180deg, #18232c 0 34px, #101820 34px);
  color: #e8f2f0;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre;
}

.article-modern-content pre::before {
  position: absolute;
  top: 10px;
  left: 14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 15px 0 0 #ffbd2e, 30px 0 0 #27c93f;
  content: "";
}

.article-modern-content pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.article-modern-content :not(pre) > code {
  padding: 2px 6px;
  border: 1px solid #dbe5e1;
  border-radius: 5px;
  background: #f4f7f5;
  color: #24323a;
  font-size: 0.92em;
}

.article-code-copy {
  position: absolute;
  top: 7px;
  right: 10px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.article-code-copy:hover,
.article-code-copy:focus-visible {
  background: rgba(123, 189, 205, 0.9);
}

.article-media-frame,
.article-modern-content .article-video-frame,
.article-modern-content iframe,
.article-modern-content video {
  width: 100%;
}

.article-media-frame,
.article-modern-content .article-video-frame {
  position: relative;
  display: block;
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid #dbe5e1;
  border-radius: 8px;
  background: #0f171d;
  aspect-ratio: 16 / 9;
}

.article-media-frame::before,
.article-modern-content .article-video-frame::before {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(5, 10, 14, 0.68);
  color: rgba(255, 255, 255, 0.88);
  content: "视频";
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.article-media-frame iframe,
.article-media-frame video,
.article-modern-content .article-video-frame iframe,
.article-modern-content .article-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.article-modern-content iframe {
  display: block;
  min-height: 360px;
  border: 0;
}

.article-modern-content video {
  display: block;
  height: auto;
  border-radius: 8px;
  background: #0f171d;
}

.takefu-video-modal-open {
  overflow: hidden;
}

.takefu-video-modal[hidden] {
  display: none !important;
}

.takefu-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 8, 12, 0.82);
}

.takefu-video-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.takefu-video-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 48px);
}

.takefu-video-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 2px;
  color: #fff;
}

.takefu-video-modal__title {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.takefu-video-modal__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.takefu-video-modal__source,
.takefu-video-modal__close,
.takefu-video-expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.takefu-video-modal__source:hover,
.takefu-video-modal__source:focus-visible,
.takefu-video-modal__close:hover,
.takefu-video-modal__close:focus-visible,
.takefu-video-expand-button:hover,
.takefu-video-expand-button:focus-visible {
  border-color: rgba(123, 189, 205, 0.72);
  background: rgba(123, 189, 205, 0.92);
  color: #fff;
  outline: none;
}

.takefu-video-modal__player {
  position: relative;
  overflow: hidden;
  width: min(1280px, calc(100vw - 48px));
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #05080c;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.takefu-video-modal__iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #05080c;
}

.article-media-frame--video {
  isolation: isolate;
}

.article-media-frame--video::before {
  display: none;
}

.article-media-frame--video iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
}

.takefu-video-expand-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  min-height: 32px;
  background: rgba(5, 10, 14, 0.72);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.article-media-frame--video:hover .takefu-video-expand-button,
.article-media-frame--video:focus-within .takefu-video-expand-button,
.takefu-video-expand-button:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.article-modern-tags,
.article-modern-hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-modern-tags {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--am-line);
}

.article-modern-tags a,
.article-modern-hot-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #dfe7e3;
  border-radius: 999px;
  background: #fff;
  color: #52626e;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.article-modern-tags a:hover,
.article-modern-hot-tags a:hover {
  border-color: #f0a27b;
  background: #f7f8f5;
  color: #8a6a35;
}

.article-modern-prenext {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
  padding: 12px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(24, 37, 44, 0.04);
}

.article-modern-prenext a {
  display: block;
  overflow: hidden;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: var(--am-soft);
  color: var(--am-text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-modern-prenext a:hover {
  border-color: #f0a27b;
  color: #8a6a35;
}

.article-modern-side {
  display: grid;
  gap: 24px;
  position: sticky;
  top: 82px;
}

.article-modern-rail {
  display: grid;
  gap: 18px;
  position: fixed;
  top: 126px;
  left: var(--article-rail-left, calc(50% + 440px));
  align-self: start;
  z-index: 20;
  width: 220px;
  max-height: calc(100vh - 150px);
  overflow: visible;
}

.article-modern-widget,
.article-modern-toc-box {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-modern-side .article-modern-widget {
  padding: 14px 16px 16px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(24, 37, 44, 0.05);
}

.article-modern-widget h2,
.article-modern-toc-box h2 {
  margin: 0 0 12px;
  color: #142d34;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.article-modern-side .article-modern-widget h2 {
  margin: -14px -16px 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--am-line);
  font-size: 14px;
}

.article-modern-rail-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.article-modern-progress {
  margin: 0 0 7px -2px;
  color: #697781;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.article-modern-rail .article-modern-widget {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(24, 37, 44, 0.05);
}

.article-modern-rail .article-modern-widget h2 {
  margin-bottom: 11px;
  padding-left: 0;
  font-size: 14px;
}

.article-modern-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-modern-list a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 9px 0;
  border: 1px solid #e4ebe7;
  border-radius: 8px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.article-modern-list a:hover,
.article-modern-list a:focus-visible {
  border-color: #f0a27b;
  background: transparent;
}

.article-modern-side .article-modern-list a {
  padding: 8px 9px;
  border: 1px solid #e4ebe7;
  border-radius: 6px;
  background: #fff;
}

.article-modern-side .article-modern-list a:hover,
.article-modern-side .article-modern-list a:focus-visible {
  border-color: #f0a27b;
  background: #fffaf6;
}

.article-modern-list img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #e9efec;
}

.article-modern-list strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--am-ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.38;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-modern-list span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--am-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-modern-page .article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 64px 74px 58px;
  background: rgba(6, 12, 16, 0.86);
}

.article-modern-page .article-lightbox.is-open {
  display: flex;
}

.article-modern-page .article-lightbox__image {
  display: block;
  max-width: none;
  max-height: none;
  border-radius: 8px;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  will-change: transform;
}

.article-lightbox__stage {
  position: absolute;
  inset: 64px 74px 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}

.article-lightbox.is-zoomed .article-lightbox__stage {
  cursor: grab;
}

.article-lightbox.is-dragging .article-lightbox__stage {
  cursor: grabbing;
}

.article-modern-page .article-lightbox__toolbar {
  position: absolute;
  top: 18px;
  right: 22px;
  display: flex;
  gap: 8px;
}

.article-modern-page .article-lightbox button,
.article-modern-page .article-lightbox__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.article-modern-page .article-lightbox__nav,
.article-modern-page .article-lightbox__caption {
  position: absolute;
  z-index: 2;
}

.article-modern-page .article-lightbox__nav {
  top: 50%;
  width: 46px;
  height: 64px;
  min-height: 64px;
  padding: 0;
  border-radius: 8px;
  font-size: 36px;
  transform: translateY(-50%);
}

.article-modern-page .article-lightbox__prev {
  left: 18px;
}

.article-modern-page .article-lightbox__next {
  right: 18px;
}

.article-modern-page .article-lightbox__caption,
.article-modern-page .article-lightbox__counter {
  position: absolute;
  bottom: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.article-modern-page .article-lightbox__caption {
  left: 24px;
  max-width: min(720px, calc(100vw - 240px));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-modern-page .article-lightbox__counter {
  right: 24px;
}

body.article-lightbox-lock {
  overflow: hidden;
}

.article-modern-page .fancybox__container {
  --fancybox-bg: rgba(5, 10, 14, 0.92);
  --f-button-width: 42px;
  --f-button-height: 42px;
  --f-button-border-radius: 999px;
  --f-button-color: #fff;
  --f-button-bg: rgba(255, 255, 255, 0.12);
  --f-button-hover-bg: rgba(123, 189, 205, 0.9);
  --f-button-active-bg: rgba(196, 84, 42, 0.95);
  --f-toolbar-gap: 8px;
  --f-caption-color: rgba(255, 255, 255, 0.86);
  z-index: 10020;
}

.article-modern-page .fancybox__backdrop {
  background: rgba(5, 10, 14, 0.92);
}

.article-modern-page .fancybox__slide {
  padding: 68px 72px 54px;
}

.article-modern-page .fancybox__caption {
  max-width: min(840px, calc(100vw - 48px));
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.article-modern-page .fancybox__content > img,
.article-modern-page .f-panzoom__content {
  border-radius: 8px;
}

@media (max-width: 1180px) {
  .article-modern-layout {
    grid-template-columns: 300px minmax(0, 1fr);
    justify-content: stretch;
    padding-right: 0;
  }

  .article-modern-rail {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: minmax(0, 1fr);
    width: auto;
    max-height: none;
  }

  .article-modern-rail.is-floating {
    position: static;
    width: auto;
  }

  .article-modern-side {
    position: static;
  }
}

@media (max-width: 900px) {
  .article-modern-main {
    padding-top: 0;
  }

  .article-modern-page.takefu-shell-ready .article-modern-main {
    margin-top: 0;
  }

  .article-modern-wrap {
    width: min(100% - 20px, 720px);
  }

  .article-modern-breadcrumb {
    min-height: 42px;
    margin-bottom: 10px;
  }

  .article-modern-head,
  .article-reader-shell.article-modern-reader {
    padding: 18px;
  }

  .article-modern-head h1 {
    font-size: 23px;
    line-height: 1.28;
  }

  .article-modern-meta {
    gap: 7px;
    margin-top: 12px;
  }

  .article-modern-meta span {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
  }

  .article-modern-lede {
    display: block;
    max-height: none;
    margin-top: 14px;
    padding: 12px 14px;
    line-height: 1.7;
    overflow: visible;
    word-break: break-word;
    -webkit-line-clamp: unset;
  }

  .article-reader-shell.article-modern-reader {
    display: block;
  }

  .article-modern-toc ol {
    display: flex;
    max-height: none;
    padding: 8px 0 0;
    border-left: 0;
    gap: 8px;
    overflow-x: auto;
  }

  .article-modern-toc li {
    flex: 0 0 auto;
  }

  .article-modern-toc a {
    color: var(--am-muted);
    font-size: 13px;
    min-height: 0;
    margin-left: 0;
    padding: 8px 10px;
    border: 1px solid var(--am-line);
    border-radius: 999px;
    background: #fff;
    white-space: nowrap;
  }

  .article-modern-toc a::before {
    display: none;
  }

  .article-modern-toc a:hover,
  .article-modern-toc a.is-active {
    color: #8a6a35;
  }

  .article-modern-toc a:hover::after,
  .article-modern-toc a:focus-visible::after,
  .article-modern-progress {
    display: none;
  }

  .article-modern-content {
    font-size: 15px;
    line-height: 1.88;
  }

  .article-image-frame__hint {
    opacity: 1;
    transform: none;
  }

  .article-image-frame__caption {
    margin-top: -12px;
    padding: 0 8px;
  }

  .article-modern-layout,
  .article-modern-center,
  .article-modern-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-modern-side {
    order: 2;
  }

  .article-modern-rail {
    order: 3;
  }

  .article-modern-prenext {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .article-modern-page .fancybox__slide {
    padding: 58px 18px 46px;
  }

  .article-modern-page .f-carousel__toolbar {
    padding: 8px 10px;
  }

  .article-modern-page .footer-nav-buttons {
    right: 10px;
    bottom: 14px;
    gap: 8px;
  }

  .article-modern-page .footer-nav-buttons .footer-bilibili,
  .article-modern-page .footer-nav-buttons #backbottom {
    display: none !important;
  }

  .article-modern-page .footer-nav-buttons #backtop {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    line-height: 40px;
  }

  .takefu-video-modal {
    padding: 10px;
  }

  .takefu-video-modal__panel {
    width: 100%;
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    gap: 8px;
  }

  .takefu-video-modal__head {
    align-items: flex-start;
    min-height: 40px;
  }

  .takefu-video-modal__title {
    font-size: 14px;
    white-space: normal;
  }

  .takefu-video-modal__actions {
    gap: 6px;
  }

  .takefu-video-modal__source,
  .takefu-video-modal__close {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .takefu-video-modal__player {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 78px);
    border-radius: 8px;
  }

  .takefu-video-expand-button {
    right: 8px;
    top: 8px;
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .article-modern-main {
    padding-top: 0;
  }

  .article-modern-page.takefu-shell-ready .article-modern-main {
    margin-top: 0;
  }

  .article-modern-wrap {
    width: min(100% - 20px, 440px);
  }

  .article-modern-breadcrumb {
    min-height: 40px;
    margin-bottom: 8px;
    padding: 0 10px;
    font-size: 13px;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .article-modern-breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .article-modern-breadcrumb a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 6px;
  }

  .article-modern-head {
    padding: 15px 14px 14px;
  }

  .article-reader-shell.article-modern-reader {
    padding: 16px 14px;
  }

  .article-modern-head h1 {
    font-size: 22px;
  }

  .article-modern-lede {
    max-height: none;
    font-size: 14px;
  }

  .article-modern-content pre {
    margin-right: -2px;
    margin-left: -2px;
    padding-right: 14px;
    padding-left: 14px;
    font-size: 13px;
  }
}

/* ==================================================================
 * 2026-09-23 点位文章（/sj/）版面重做：对齐任务页 task-article.css
 *
 * 历史背景：本文件曾被追加过三层互相覆盖的调色板（light / dark / dark+!important），
 * 而 takefu-shell.css 又把 .article-modern-card 等容器强制刷成白底，
 * 结果"白底 + 浅字"——正文对比度只有 2.05:1、标题 1.08:1，整页看不清。
 * 此处统一为单一浅色主题（令牌见文件开头），并按任务页款式重排布局：
 *   第一行 = 通栏目录胶囊条，第二行 = 正文卡片 + 右侧栏卡片。
 * ================================================================== */

/* ------------------------------------------------------------------
 * 1. 页面底色与基础排版
 * ------------------------------------------------------------------ */
html,
body.article-modern-page {
  background: var(--am-bg);
  color: var(--am-text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

.article-modern-page.takefu-shell-ready,
.article-modern-main {
  background: var(--am-bg) !important;
}

.article-modern-main {
  padding: 18px 0 40px;
}

/* ⚠️ 2026-09-24：本规则必须限定作用域，否则共用本样式表的资源页（body.resource-url-page，
   view_article_resource.htm 的 26 个栏目 / 700+ 篇）容器会被压到 1180px；
   扣掉 resource-detail.css 为右侧栏预留的 230px 后，中栏只剩 600px（应为 820px），版面被挤坏。
   同批其它布局规则已由 body:not(.resource-url-page) 前缀隔离，本条为遗漏项。 */
body:not(.resource-url-page) .article-modern-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* ------------------------------------------------------------------
 * 2. 面包屑：任务页同款（通栏、无卡片、无缩进）
 * ------------------------------------------------------------------ */
.article-modern-breadcrumb,
body.article-modern-page:not(.article-bg-excluded) .article-modern-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 0;
  margin: 4px 0 16px !important;
  margin-left: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #60747b;
  font-size: 13px;
  font-weight: 700;
}

.article-modern-breadcrumb a {
  display: inline;
  min-height: 0;
  text-decoration: none;
}

.article-modern-breadcrumb a,
.article-modern-meta a,
.article-modern-content a {
  color: var(--am-accent);
}

.article-modern-breadcrumb a:hover,
.article-modern-breadcrumb a:focus-visible,
.article-modern-content a:hover,
.article-modern-content a:focus-visible {
  color: #0a9aa7;
  text-decoration: underline;
}

/* ------------------------------------------------------------------
 * 3. 布局：目录条通栏 + 正文卡片 + 右侧栏（任务页两栏款式）
 *    ⚠️ 2026-09-24：本块只服务「物资/数据文章」模板（body 无 .resource-url-page）。
 *    此前选择器未限定作用域，导致共用同一份 CSS 的 view_article_resource.htm
 *    （工具/查询/好站/画质等 26 个栏目、700+ 篇）正文被挤进 330px 窄栏、右侧栏消失。
 *    现统一加 body:not(.resource-url-page) 前缀，工具/资源页回到自己的 .resource-url-page 布局。
 *    .article-modern-rail 只承载目录盒，用 display:contents 把目录盒
 *    提升为栅格项，从而能在不搬 DOM 的前提下放到首行通栏。
 * ------------------------------------------------------------------ */
body:not(.resource-url-page) .article-modern-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  justify-content: stretch;
  gap: 14px;
  align-items: start;
  padding-right: 0;
}

body:not(.resource-url-page) .article-modern-rail,
body:not(.resource-url-page) .article-modern-rail.is-floating {
  display: contents;
  position: static;
  width: auto;
  max-height: none;
  overflow: visible;
}

body:not(.resource-url-page) .article-modern-toc-box {
  grid-column: 1 / -1;
  grid-row: 1;
}

body:not(.resource-url-page) .article-modern-center {
  grid-column: 1;
  grid-row: 2;
  gap: 14px;
}

body:not(.resource-url-page) .article-modern-side {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  position: static;
  gap: 14px;
  min-width: 0;
  height: var(--article-modern-side-height, auto);
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

body.resource-url-page .article-modern-side {
  height: var(--article-modern-side-height, auto);
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* ------------------------------------------------------------------
 * 4. 顶部目录条（任务页 .task-mobile-toc 同款胶囊条）
 * ------------------------------------------------------------------ */
body:not(.resource-url-page) .article-modern-toc-box {
  position: sticky;
  top: 64px;
  z-index: 60;
  padding: 8px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(25, 79, 89, 0.08);
}

.article-modern-toc-box[hidden] {
  display: none;
}

/* 任务页的目录条不显示标题与阅读进度，只留胶囊 */
body:not(.resource-url-page) .article-modern-rail-title,
body:not(.resource-url-page) .article-modern-progress,
body:not(.resource-url-page) .article-modern-toc .article-toc__title {
  display: none;
}

body:not(.resource-url-page) .article-modern-toc ol {
  position: static;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-x: auto;
  overflow-y: hidden;
  list-style: none;
  scrollbar-width: thin;
}

body:not(.resource-url-page) .article-modern-toc ol::before {
  display: none;
  content: none;
}

body:not(.resource-url-page) .article-modern-toc li,
body:not(.resource-url-page) .article-modern-toc li.is-h3 {
  flex: 0 0 auto;
  margin: 0;
}

body:not(.resource-url-page) .article-modern-toc a,
body:not(.resource-url-page) .article-modern-toc li.is-h3 a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: static;
  z-index: auto;
  width: auto;
  min-width: 0;
  min-height: 40px;
  height: auto;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--am-line);
  border-radius: 7px;
  background: #f8fbfb;
  color: #29444b;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

body:not(.resource-url-page) .article-modern-toc a::before,
body:not(.resource-url-page) .article-modern-toc a::after,
body:not(.resource-url-page) .article-modern-toc li.is-h3 a::before {
  display: none;
  content: none;
}

body:not(.resource-url-page) .article-modern-toc a span,
body:not(.resource-url-page) .article-modern-toc li.is-h3 a span {
  display: inline;
  max-height: none;
  overflow: visible;
  white-space: nowrap;
  -webkit-line-clamp: none;
}

body:not(.resource-url-page) .article-modern-toc a:hover,
body:not(.resource-url-page) .article-modern-toc a:focus-visible,
body:not(.resource-url-page) .article-modern-toc a.is-active {
  border-color: var(--am-accent);
  background: var(--am-accent);
  color: #fff;
  outline: none;
}

/* ------------------------------------------------------------------
 * 5. 正文卡片（任务页 .task-article-card 同款）
 * ------------------------------------------------------------------ */
.article-modern-card,
.article-modern-breadcrumb {
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.article-modern-card {
  padding: 0 0 26px;
  overflow: visible;
}

.article-reader-shell.article-modern-reader {
  display: block;
  padding: 22px 30px 0;
}

.article-modern-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}

.article-modern-content h2 {
  margin: 30px 0 12px;
  color: var(--am-ink);
}

.article-modern-content h3,
.article-modern-content h4 {
  color: #18323a;
}

.article-modern-content ul,
.article-modern-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.article-modern-content li {
  margin: 6px 0;
}

.article-modern-content li::marker {
  color: var(--am-muted);
}

.article-modern-content blockquote {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--am-line);
  border-left: 1px solid var(--am-line);
  border-radius: 8px;
  background: var(--am-soft);
  color: var(--am-text);
}

.article-modern-content hr {
  height: 1px;
  margin: 26px 0;
  border: 0;
  background: var(--am-row);
}

/* 正文图片：白底卡片上的截图统一描边、圆角 */
.article-modern-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #0f171d;
}

/* ------------------------------------------------------------------
 * 6. 位置截图网格（任务页 .task-item-pair 同款两列）
 * ------------------------------------------------------------------ */
.article-modern-content .article-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 22px;
}

.article-modern-content .article-shot-grid .article-image-paragraph {
  margin: 0;
}

.article-modern-content .article-image-paragraph a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: #0f171d;
}

.article-modern-content .article-image-paragraph img {
  display: block;
  width: 100%;
  margin: 0;
  border-radius: 0;
}

/* 网格内的截图统一 16:9 裁切，保证两列高度一致 */
.article-modern-content .article-shot-grid .article-image-paragraph img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-modern-content .article-image-paragraph a:hover img,
.article-modern-content .article-image-paragraph a:focus-visible img {
  filter: saturate(1.05) contrast(1.02);
}

.article-modern-content .article-image-paragraph a:focus-visible {
  outline: 2px solid var(--am-accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------
 * 7. 右侧栏卡片（任务页 .task-side-module / .task-side-image-card 同款）
 * ------------------------------------------------------------------ */
.article-modern-widget,
.article-modern-rail .article-modern-widget,
.article-modern-side .article-modern-widget {
  padding: 10px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: #fbfdfd;
  box-shadow: none;
}

.article-modern-side .article-modern-widget h2 {
  margin: -10px -10px 10px;
  padding: 10px 10px;
  border-bottom: 1px solid var(--am-line);
  color: #142d34;
  font-size: 14px;
}

.article-modern-list {
  gap: 7px;
}

.article-modern-list a,
.article-modern-side .article-modern-list a {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px;
  min-height: 0;
  padding: 7px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: #fff;
  color: #203840;
}

.article-modern-list a:hover,
.article-modern-list a:focus-visible,
.article-modern-side .article-modern-list a:hover,
.article-modern-side .article-modern-list a:focus-visible {
  border-color: #87b9c0;
  background: #f7fbfb;
}

.article-modern-list img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #e7eef1;
}

.article-modern-list strong {
  color: #142d34;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.article-modern-list span {
  margin-top: 3px;
  color: var(--am-muted);
  font-size: 12px;
  line-height: 1.45;
}

.article-modern-list a:hover strong,
.article-modern-side .article-modern-list a:hover strong {
  color: #0b5963;
}

/* 热门标签：任务页地图胶囊同款 */
.article-modern-hot-tags {
  gap: 7px;
}

.article-modern-tags a,
.article-modern-hot-tags a {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--am-line);
  border-radius: 7px;
  background: #fff;
  color: #29444b;
  font-size: 12px;
  font-weight: 900;
}

.article-modern-tags a:hover,
.article-modern-hot-tags a:hover,
.article-modern-tags a:focus-visible,
.article-modern-hot-tags a:focus-visible {
  border-color: #87b9c0;
  background: #f0f7f8;
  color: #0b5963;
}

/* ------------------------------------------------------------------
 * 8. 上一篇 / 下一篇（任务页 .task-article-prenext 同款）
 * ------------------------------------------------------------------ */
.article-modern-prenext {
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.article-modern-prenext a,
.article-modern-prenext span {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--am-line);
  border-radius: 8px;
  background: #fff;
  color: var(--am-text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.article-modern-prenext span {
  color: var(--am-muted);
  background: var(--am-soft);
}

.article-modern-prenext a:hover,
.article-modern-prenext a:focus-visible {
  border-color: #87b9c0;
  background: #f7fbfb;
  color: #0b5963;
}

.article-modern-prenext-empty {
  display: block;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px dashed var(--am-line);
  border-radius: 8px;
  background: var(--am-soft);
  color: var(--am-muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

/* 正文尾部标签（若模板输出） */
.article-modern-tags {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--am-row);
}

/* ------------------------------------------------------------------
 * 9. 响应式
 * ------------------------------------------------------------------ */
@media (min-width: 1460px) {
  .article-modern-wrap {
    width: min(1320px, calc(100% - 32px));
  }

  body:not(.resource-url-page) .article-modern-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  body:not(.resource-url-page) .article-modern-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .article-modern-content th {
    width: 34%;
  }

  body:not(.resource-url-page) .article-modern-toc-box,
  body:not(.resource-url-page) .article-modern-center,
  body:not(.resource-url-page) .article-modern-side {
    grid-column: 1;
  }

  body:not(.resource-url-page) .article-modern-toc-box {
    grid-row: 1;
    top: 56px;
    padding: 7px;
  }

  body:not(.resource-url-page) .article-modern-center {
    grid-row: 2;
  }

  body:not(.resource-url-page) .article-modern-side {
    grid-row: 3;
    position: static;
    top: auto;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  body.resource-url-page .article-modern-side {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .article-modern-head {
    padding: 18px 18px 16px;
  }

  .article-reader-shell.article-modern-reader {
    padding: 16px 18px 0;
  }

  .article-modern-head h1 {
    font-size: 24px;
    line-height: 1.28;
  }

  .article-modern-content .article-shot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-modern-prenext {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .article-modern-wrap {
    width: calc(100% - 20px);
  }

  .article-modern-content {
    font-size: 15px;
  }

  body:not(.resource-url-page) .article-modern-toc a,
  body:not(.resource-url-page) .article-modern-toc li.is-h3 a {
    min-height: 44px;
  }
}

/* ------------------------------------------------------------------
 * 10. 收回外壳（takefu-shell.css）对本页内容区的强制配色
 *
 * takefu-shell.css 用
 *   body.takefu-shell-ready:not(.takefu-theme-protected) <sel> { … !important }
 * 把所有卡片刷成白底、把所有链接刷成品牌红（--tf-plum #c83a1d）。
 * 任务页靠 body.task-article-page 落在"非托管模板"分支、被加上
 * takefu-theme-protected 而豁免；点位文章属于 article-modern-page（托管模板），
 * 拿不到豁免，因此这里用更高特异性把内容区的配色收回本页主题。
 * 选择器特异性：html(0,0,1)+body(0,0,1)+.takefu-shell-ready(0,1,0)
 *   +.article-modern-page(0,1,0)+:not(0,1,0) = (0,3,3)，高于外壳的 (0,2,2)。
 * ------------------------------------------------------------------ */
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) {
  background-color: var(--am-bg) !important;
  background-image: none !important;
  color: var(--am-text) !important;
}

/* 正文 / 面包屑 / 元信息里的链接统一青绿强调色 */
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-breadcrumb a,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-meta a,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-content a {
  color: var(--am-accent) !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-breadcrumb a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-content a:hover {
  color: #0a9aa7 !important;
}

/* 目录胶囊：未选中深板岩色，选中青绿底白字（任务页同款） */
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-toc a,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-toc li.is-h3 a {
  border-color: var(--am-line) !important;
  background: #f8fbfb !important;
  color: #29444b !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-toc a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-toc a:focus-visible,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-toc a.is-active {
  border-color: var(--am-accent) !important;
  background: var(--am-accent) !important;
  color: #fff !important;
}

/* 侧栏列表 / 上下篇 / 标签胶囊 */
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-list a,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-prenext a,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-tags a,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-hot-tags a {
  border-color: var(--am-line) !important;
  background: #fff !important;
  color: #29444b !important;
  box-shadow: none !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-prenext a {
  color: var(--am-text) !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-list a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-list a:focus-visible,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-prenext a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-prenext a:focus-visible,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-tags a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-hot-tags a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-hot-tags a:focus-visible {
  border-color: #87b9c0 !important;
  background: #f0f7f8 !important;
  color: #0b5963 !important;
  box-shadow: none !important;
}

/* 卡片 / 模块 / 目录条 / 摘要 / 引用块 */
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-card {
  border-color: var(--am-line) !important;
  background: #fff !important;
  box-shadow: none !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-breadcrumb {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-widget {
  border-color: var(--am-line) !important;
  background: #fbfdfd !important;
  box-shadow: none !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-toc-box {
  border-color: var(--am-line) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 6px 18px rgba(25, 79, 89, 0.08) !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-lede,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-content blockquote {
  border-color: var(--am-line) !important;
  background: var(--am-soft) !important;
  color: #4b6269 !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-meta span {
  border-color: var(--am-line) !important;
  background: var(--am-soft) !important;
  color: var(--am-muted) !important;
}

.article-modern-side .item-guide-map-index {
  min-width: 0;
  border-top: 1px solid #dce5ee;
  padding-top: 13px;
}

.article-modern-side .item-guide-map-index__head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.article-modern-side .item-guide-map-index__head h2 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #17202c;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.article-modern-side .item-guide-map-index__head a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.article-modern-side .item-guide-map-index__head a:hover,
.article-modern-side .item-guide-map-index__head a:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
  outline: none;
}

.article-modern-side .item-guide-map-index .item-guide-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #2563eb;
}

.article-modern-side .item-guide-map-index__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
}

.article-modern-side .item-guide-map-index__grid a {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #dfe7ef;
  border-radius: 7px;
  background: #fff;
  color: #2563eb !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 5px 6px;
  text-align: center;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-modern-side .item-guide-map-index__grid a:hover,
.article-modern-side .item-guide-map-index__grid a:focus-visible {
  border-color: #9fc5f8;
  background: #eef5ff;
  color: #1d4ed8 !important;
  outline: none;
}

.article-modern-side .item-guide-map-index__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
}

.article-modern-side .item-guide-map-index__tabs button {
  min-width: 0;
  min-height: 32px;
  border: 1px solid #dfe7ef;
  border-radius: 7px;
  background: #fff;
  color: #315f9d;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.article-modern-side .item-guide-map-index__tabs button[aria-selected="true"] {
  border-color: #2563eb;
  background: #eef5ff;
  color: #1d4ed8;
}

.article-modern-side .item-guide-map-index__tabs button[data-article-map-engine-tab="map2"][aria-selected="true"] {
  border-color: #e79a5c;
  background: #fff6ee;
  color: #9a3412;
}

.article-modern-side .item-guide-map-index__engine-status {
  margin: -2px 0 8px;
  color: #667583;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.article-modern-side .item-guide-map-index__grid[data-article-map-engine-panel="map2"] a {
  border-color: #f1d3b6;
  background: #fffaf5;
  color: #9a3412 !important;
}

.article-modern-side .item-guide-map-index__tabs button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.article-modern-side .item-guide-map-index__grid[hidden] {
  display: none;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-side .item-guide-map-index__head > a,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-side .item-guide-map-index__grid a {
  color: #2563eb !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-side .item-guide-map-index__head > a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-side .item-guide-map-index__head > a:focus-visible,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-side .item-guide-map-index__grid a:hover,
html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-side .item-guide-map-index__grid a:focus-visible {
  color: #1d4ed8 !important;
}

html body.takefu-shell-ready.article-modern-page:not(.takefu-theme-protected) .article-modern-side .item-guide-map-index__grid[data-article-map-engine-panel="map2"] a {
  border-color: #f1d3b6;
  background: #fffaf5;
  color: #9a3412 !important;
}

