/* ==========================================================================
   趣玩攻略堡 · 清新杂志流  portal.css
   清新绿 #12a150 + 暖橙 #f97316
   ========================================================================== */

:root {
  --st-green: #12a150;
  --st-green-d: #0b7d3c;
  --st-green-t: #e8f7ee;
  --st-orange: #f97316;
  --st-orange-t: #fff3e8;
  --st-ink: #12211a;
  --st-text: #1d2b25;
  --st-text2: #46584f;
  --st-muted: #7a8b83;
  --st-line: #e4ebe7;
  --st-bg: #f7faf8;
  --st-card: #ffffff;
  --st-r: 10px;
}

html[data-theme="dark"] {
  --st-green-t: #0d2419;
  --st-orange-t: #2a1a0c;
  --st-ink: #eaf2ed;
  --st-text: #dde8e2;
  --st-text2: #b0c1b8;
  --st-muted: #849790;
  --st-line: #22302a;
  --st-bg: #0a1210;
  --st-card: #111c18;
}

* {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--st-bg);
  color: var(--st-text);
  font-size: 15.5px;
  line-height: 1.8;
  -webkit-text-size-adjust: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.hide {
  display: none !important;
}

/* ------------------------------ 顶部栏 ------------------------------ */
.st-top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--st-card);
  border-bottom: 1px solid var(--st-line);
}

.st-top.scrolled {
  box-shadow: 0 5px 20px rgba(18, 40, 30, .07);
}

.st-top-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.st-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.st-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: var(--st-green);
  border-radius: 8px;
}

.st-brand-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .4px;
  color: var(--st-ink);
  white-space: nowrap;
}

.st-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.st-nav a {
  font-size: 14px;
  color: var(--st-text2);
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}

.st-nav a:hover {
  color: var(--st-green);
  border-bottom-color: var(--st-orange);
}

.st-search {
  display: flex;
  flex: 0 0 auto;
}

.st-search input {
  width: 196px;
  height: 34px;
  padding: 0 13px;
  font-size: 13.5px;
  color: var(--st-text);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-right: 0;
  border-radius: 17px 0 0 17px;
  outline: none;
}

.st-search input::placeholder {
  color: var(--st-muted);
}

.st-search input:focus {
  border-color: var(--st-green);
}

.st-search button {
  height: 34px;
  padding: 0 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--st-green);
  border: 0;
  border-radius: 0 17px 17px 0;
  cursor: pointer;
  transition: background .2s;
}

.st-search button:hover {
  background: var(--st-green-d);
}

.st-theme {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--st-text2);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 50%;
  cursor: pointer;
  transition: all .2s;
}

.st-theme:hover {
  color: var(--st-orange);
  border-color: var(--st-orange);
}

.st-menu-btn {
  display: none;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0 6px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.st-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--st-text2);
  border-radius: 1px;
}

/* ------------------------------ 抽屉 ------------------------------ */
.st-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 59;
  background: var(--st-card);
  border-bottom: 1px solid var(--st-line);
  padding: 15px 18px 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.st-drawer.open {
  display: block;
}

.st-drawer-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.st-drawer-search input {
  flex: 1;
  height: 38px;
  padding: 0 13px;
  font-size: 14px;
  color: var(--st-text);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 6px;
  outline: none;
}

.st-drawer-search button {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--st-green);
  border: 0;
  border-radius: 6px;
}

.st-drawer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--st-line);
}

.st-drawer-nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--st-ink);
}

.st-drawer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.st-drawer-cats a {
  font-size: 13px;
  color: var(--st-text2);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 5px 12px;
}

/* ------------------------------ HERO ------------------------------ */
.st-hero {
  background: linear-gradient(180deg, var(--st-green-t), var(--st-bg));
  border-bottom: 1px solid var(--st-line);
  padding: 40px 0 36px;
}

html[data-theme="dark"] .st-hero {
  background: linear-gradient(180deg, #0d2419, #0a1210);
}

.st-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
}

.st-hero-head {
  max-width: 760px;
  margin-bottom: 26px;
}

.st-hero-kicker {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 1.6px;
  color: var(--st-green);
  font-weight: 700;
  margin-bottom: 12px;
  border-left: 3px solid var(--st-orange);
  padding-left: 10px;
}

.st-hero-title {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--st-ink);
}

.st-hero-sub {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--st-muted);
}

.st-hero-cards {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px;
}

.st-hero-card {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 12px;
  transition: all .24s;
}

.st-hero-card:hover {
  transform: translateY(-3px);
  border-color: var(--st-green);
  box-shadow: 0 12px 28px rgba(18, 40, 30, .1);
}

.st-hero-tag {
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--st-orange);
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 12px;
}

.st-hero-ctitle {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--st-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.st-hero-card:hover .st-hero-ctitle {
  color: var(--st-green);
}

.st-hero-cdesc {
  font-size: 13px;
  line-height: 1.75;
  color: var(--st-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.st-hero-cmeta {
  margin-top: auto;
  font-size: 12px;
  color: var(--st-muted);
}

.st-hero-lead {
  background: var(--st-card);
}

.st-hero-lead .st-hero-ctitle {
  font-size: 21px;
  -webkit-line-clamp: 2;
}

.st-hero-lead .st-hero-cdesc {
  -webkit-line-clamp: 4;
  font-size: 13.5px;
}

/* ------------------------------ 容器 ------------------------------ */
.st-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 22px 40px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.st-main {
  flex: 1 1 auto;
  min-width: 0;
}

.st-rail {
  flex: 0 0 288px;
  width: 288px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.st-shell-article .st-rail-sticky {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ------------------------------ 区块 ------------------------------ */
.st-section {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: var(--st-r);
  padding: 20px 22px 22px;
  margin-bottom: 16px;
}

.st-section-inline {
  margin-top: 18px;
}

.st-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--st-line);
  flex-wrap: wrap;
}

.st-section-title {
  position: relative;
  margin: 0;
  padding-left: 13px;
  font-size: 18.5px;
  font-weight: 800;
  color: var(--st-ink);
}

.st-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  background: var(--st-orange);
  border-radius: 2px;
}

.st-section-more,
.st-section-hint {
  font-size: 13px;
  color: var(--st-muted);
}

.st-section-more:hover {
  color: var(--st-green);
}

/* ------------------------------ 主题 tabs ------------------------------ */
.st-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.st-tab {
  padding: 7px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--st-text2);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 18px;
  cursor: pointer;
  transition: all .2s;
}

.st-tab:hover {
  color: var(--st-green);
  border-color: var(--st-green);
}

.st-tab.on {
  color: #fff;
  background: var(--st-green);
  border-color: var(--st-green);
}

.st-tab .cnt {
  margin-left: 6px;
  font-size: 11.5px;
  opacity: .75;
}

/* ------------------------------ 频道卡 ------------------------------ */
.st-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.st-channel {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 16px;
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-left: 3px solid var(--st-green);
  border-radius: 8px;
  transition: all .22s;
}

.st-channel:hover {
  border-left-color: var(--st-orange);
  transform: translateY(-2px);
  background: var(--st-card);
}

.st-channel-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--st-ink);
}

.st-channel:hover .st-channel-name {
  color: var(--st-green);
}

.st-channel-desc {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--st-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------------------------------ 列表 ------------------------------ */
.st-list {
  display: flex;
  flex-direction: column;
}

.st-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--st-line);
}

.st-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.st-item:first-child {
  padding-top: 0;
}

.st-item-idx {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--st-muted);
  background: var(--st-bg);
  border-radius: 5px;
  margin-top: 4px;
}

.st-item-main {
  flex: 1 1 auto;
  min-width: 0;
}

.st-item-title {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--st-text);
}

.st-item-title a:hover {
  color: var(--st-green);
}

.st-item-desc {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--st-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-item-meta {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--st-muted);
}

.st-dot {
  color: var(--st-line);
}

/* ------------------------------ 横向卡片带 ------------------------------ */
.st-rail {
  display: flex;
}

.st-rail-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 8px;
  transition: all .22s;
}

.st-rail-card:hover {
  border-color: var(--st-green);
  background: var(--st-card);
}

.st-rail-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--st-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-rail-card:hover .st-rail-title {
  color: var(--st-green);
}

.st-rail-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--st-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-rail-meta {
  margin-top: auto;
  font-size: 11.5px;
  color: var(--st-muted);
}

/* 横向滚动容器（JS 加入，避免与侧栏 .st-rail 冲突） */
.st-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.st-slider::-webkit-scrollbar {
  height: 5px;
}

.st-slider::-webkit-scrollbar-thumb {
  background: var(--st-line);
  border-radius: 3px;
}

/* ------------------------------ 侧栏 ------------------------------ */
.st-card {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: var(--st-r);
  padding: 18px;
}

.st-card-title {
  display: flex;
  align-items: center;
  margin: 0 0 14px;
  padding-left: 11px;
  position: relative;
  font-size: 15px;
  font-weight: 700;
  color: var(--st-ink);
}

.st-card-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 13px;
  background: var(--st-orange);
  border-radius: 2px;
}

.st-rank {
  list-style: none;
  margin: 0;
  padding: 0;
}

.st-rank li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px dashed var(--st-line);
}

.st-rank li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.st-rank .no {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  line-height: 19px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--st-muted);
  background: var(--st-bg);
  border-radius: 4px;
  margin-top: 3px;
}

.st-rank .no.hot {
  color: #fff;
  background: var(--st-orange);
}

.st-rank a {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--st-text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-rank a:hover {
  color: var(--st-green);
}

.st-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.st-cats a {
  font-size: 12.5px;
  color: var(--st-text2);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 4px 11px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all .2s;
}

.st-cats a:hover {
  color: #fff;
  background: var(--st-green);
  border-color: var(--st-green);
}

.st-cats-refresh {
  margin-top: 11px;
  width: 100%;
  height: 30px;
  font-size: 12px;
  color: var(--st-muted);
  background: transparent;
  border: 1px dashed var(--st-line);
  border-radius: 5px;
  cursor: pointer;
  transition: all .2s;
}

.st-cats-refresh:hover {
  color: var(--st-green);
  border-color: var(--st-green);
}

.st-about {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--st-muted);
}

/* 目录 */
.st-toc {
  max-height: 44vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.st-toc::-webkit-scrollbar {
  width: 4px;
}

.st-toc::-webkit-scrollbar-thumb {
  background: var(--st-line);
  border-radius: 2px;
}

.st-toc a {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--st-text2);
  padding: 5px 0 5px 10px;
  border-left: 2px solid transparent;
  transition: all .2s;
}

.st-toc a.lv3 {
  padding-left: 21px;
  font-size: 12.5px;
  color: var(--st-muted);
}

.st-toc a:hover {
  color: var(--st-green);
}

.st-toc a.on {
  color: var(--st-green);
  border-left-color: var(--st-orange);
  font-weight: 600;
}

/* ------------------------------ 分页 ------------------------------ */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  margin-top: 22px;
}

.pager .page-link {
  display: inline-block;
  width: auto;
  min-width: 38px;
  height: 38px;
  line-height: 36px;
  text-align: center;
  padding: 0 12px;
  white-space: nowrap;
  flex: 0 0 auto;
  font-size: 13.5px;
  color: var(--st-text2);
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 19px;
  transition: all .2s;
}

.pager .page-link:hover {
  color: var(--st-green);
  border-color: var(--st-green);
}

.pager .page-link.current {
  color: #fff;
  background: var(--st-green);
  border-color: var(--st-green);
  font-weight: 700;
}

/* ------------------------------ 文章页 ------------------------------ */
.st-crumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--st-muted);
  margin-bottom: 16px;
}

.st-crumb a:hover {
  color: var(--st-green);
}

.st-article {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: var(--st-r);
  padding: 28px 32px;
}

.st-art-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--st-line);
  margin-bottom: 22px;
}

.st-art-cat {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--st-green);
  background: var(--st-green-t);
  border-radius: 14px;
  padding: 3px 12px;
  margin-bottom: 12px;
}

.st-art-cat:hover {
  color: #fff;
  background: var(--st-green);
}

.st-art-title {
  margin: 0 0 14px;
  font-size: 29px;
  line-height: 1.42;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--st-ink);
}

.st-art-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--st-muted);
}

/* 要点 */
.st-keypoints {
  margin: 0 0 24px;
  padding: 18px 22px;
  background: var(--st-green-t);
  border-left: 3px solid var(--st-green);
  border-radius: 0 var(--st-r) var(--st-r) 0;
}

.st-keypoints-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--st-ink);
  margin-bottom: 10px;
}

.st-keypoints-icon {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--st-green);
  border-radius: 3px;
  padding: 1px 7px;
}

.st-keypoints-list {
  margin: 0;
  padding-left: 19px;
}

.st-keypoints-list li {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--st-text2);
  margin-bottom: 3px;
}

/* 正文 */
.st-content {
  font-size: 16.5px;
  line-height: 2;
  color: var(--st-text2);
  overflow-wrap: break-word;
  word-break: break-word;
}

.st-content p {
  margin: 0 0 1.15em;
}

.st-content h2 {
  position: relative;
  margin: 1.9em 0 .8em;
  padding-left: 13px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--st-ink);
}

.st-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .4em;
  width: 4px;
  height: 1em;
  background: var(--st-orange);
  border-radius: 2px;
}

.st-content h3 {
  margin: 1.5em 0 .7em;
  font-size: 18px;
  font-weight: 700;
  color: var(--st-ink);
}

.st-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 8px;
  cursor: zoom-in;
}

.st-content a {
  color: var(--st-green);
  border-bottom: 1px solid rgba(18, 161, 80, .3);
}

html[data-theme="dark"] .st-content a {
  color: #5ed08c;
}

.st-content blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  background: var(--st-bg);
  border-left: 3px solid var(--st-orange);
  border-radius: 0 6px 6px 0;
  color: var(--st-muted);
}

.st-content ul,
.st-content ol {
  margin: 0 0 1.15em;
  padding-left: 1.6em;
}

.st-content li {
  margin-bottom: .45em;
}

.st-content code {
  background: var(--st-bg);
  color: #b3261e;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: .9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.st-content pre {
  background: #0c1a13;
  color: #dcebe2;
  padding: 15px 17px;
  border-radius: 6px;
  overflow-x: auto;
  max-width: 100%;
  font-size: 13.5px;
  line-height: 1.7;
}

.st-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  white-space: pre;
}

.st-content table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
}

.st-content table th,
.st-content table td {
  border: 1px solid var(--st-line);
  padding: 8px 12px;
  font-size: 14.5px;
  white-space: nowrap;
}

.st-content table th {
  background: var(--st-bg);
  font-weight: 700;
}

.st-art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--st-line);
}

.st-art-tags a {
  font-size: 12.5px;
  color: var(--st-text2);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 14px;
  padding: 3px 11px;
}

.st-art-tags a:hover {
  color: #fff;
  background: var(--st-green);
  border-color: var(--st-green);
}

/* 上下篇 */
.st-prevnext {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.st-prevnext-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 18px;
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: var(--st-r);
  transition: all .2s;
}

.st-prevnext-link:hover {
  border-color: var(--st-green);
}

.st-prevnext-label {
  font-size: 12px;
  color: var(--st-muted);
}

.st-prevnext-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--st-text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-prevnext-link:hover .st-prevnext-title {
  color: var(--st-text);
}

.st-prevnext-link.is-empty {
  border-style: dashed;
  background: transparent;
  cursor: default;
}

.st-prevnext-link.is-empty .st-prevnext-title {
  color: var(--st-muted);
  font-weight: 400;
}

/* 相关 */
.st-related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}

.st-related-item {
  font-size: 14px;
  line-height: 1.7;
  color: var(--st-text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-related-item:hover {
  color: var(--st-green);
}

/* ------------------------------ 列表页头 / 面板 ------------------------------ */
.st-page-head {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: var(--st-r);
  padding: 22px 24px 18px;
  margin-bottom: 16px;
}

.st-page-head h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: var(--st-ink);
}

.st-page-head p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--st-muted);
}

.st-panel {
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: var(--st-r);
  padding: 24px 28px;
}

.st-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.st-tagpill {
  display: inline-block;
  padding: 6px 15px;
  font-size: 13px;
  color: var(--st-text2);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 15px;
  transition: all .2s;
}

.st-tagpill:hover {
  color: #fff;
  background: var(--st-green);
  border-color: var(--st-green);
}

.st-empty {
  margin: 0;
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
  color: var(--st-muted);
}

/* 错误页 */
.st-error {
  max-width: 620px;
  margin: 56px auto;
  padding: 44px 30px;
  text-align: center;
  background: var(--st-card);
  border: 1px solid var(--st-line);
  border-radius: 12px;
}

.st-error-code {
  font-size: 58px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--st-green);
  opacity: .28;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
}

.st-error h1 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 800;
  color: var(--st-ink);
}

.st-error p {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--st-muted);
}

.st-error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.st-btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  transition: all .2s;
}

.st-btn-primary {
  color: #fff;
  background: var(--st-green);
}

.st-btn-primary:hover {
  background: var(--st-green-d);
}

.st-btn-plain {
  color: var(--st-text2);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
}

.st-btn-plain:hover {
  color: var(--st-green);
  border-color: var(--st-green);
}

/* ------------------------------ 留言板 ------------------------------ */
.guestbook-form {
  max-width: 700px;
  margin: 0 auto;
}

.guestbook-form .form-item {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.guestbook-form .form-label {
  flex: 0 0 92px;
  padding-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--st-text2);
  text-align: right;
}

.guestbook-form .form-value {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.guestbook-form input[type="text"],
.guestbook-form input[type="number"],
.guestbook-form input[type="email"],
.guestbook-form input[type="file"],
.guestbook-form textarea,
.guestbook-form select {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  font-size: 14.5px;
  color: var(--st-text);
  background: var(--st-bg);
  border: 1px solid var(--st-line);
  border-radius: 7px;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
  color: var(--st-muted);
}

.guestbook-form input:focus,
.guestbook-form textarea:focus,
.guestbook-form select:focus {
  border-color: var(--st-green);
}

.guestbook-form textarea {
  resize: vertical;
  line-height: 1.75;
}

.st-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.st-captcha-row input[type="text"] {
  flex: 1 1 auto;
}

.guestbook-form .form-captcha {
  flex: 0 0 auto;
  width: 116px;
  height: 42px;
  border: 1px solid var(--st-line);
  border-radius: 7px;
  cursor: pointer;
  object-fit: cover;
}

.guestbook-form .form-control {
  padding-left: 108px;
  margin-top: 10px;
}

.guestbook-form .form-btn {
  min-width: 146px;
  height: 42px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--st-green);
  border: 0;
  border-radius: 21px;
  cursor: pointer;
  transition: background .2s;
}

.guestbook-form .form-btn:hover {
  background: var(--st-green-d);
}

/* ------------------------------ 页脚 ------------------------------ */
.st-foot {
  background: #0d2218;
  color: #8fa89a;
  padding-top: 38px;
}

html[data-theme="dark"] .st-foot {
  background: #060e0a;
}

.st-foot-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.st-foot-col h4 {
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 700;
  color: #e6f2ea;
}

.st-foot-col p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: #82988b;
}

.st-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.st-foot-links a {
  font-size: 13px;
  color: #82988b;
  transition: color .2s;
}

.st-foot-links a:hover {
  color: var(--st-orange);
}

.st-foot-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #6c8277;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

/* ------------------------------ 回到顶部 / 灯箱 ------------------------------ */
.st-totop {
  position: fixed;
  right: 26px;
  bottom: 30px;
  z-index: 40;
  width: 42px;
  height: 42px;
  font-size: 17px;
  color: #fff;
  background: var(--st-green);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 8px 22px rgba(18, 161, 80, .32);
  transition: all .25s;
}

.st-totop.show {
  opacity: 1;
  visibility: visible;
}

.st-totop:hover {
  background: var(--st-orange);
}

.st-viewer {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 14, 10, .93);
}

.st-viewer.open {
  display: flex;
}

.st-viewer img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.st-viewer .close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  font-size: 22px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media screen and (max-width: 1080px) {
  .st-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .st-main {
    width: 100%;
  }

  .st-rail {
    width: 100%;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .st-shell-article .st-rail-sticky {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .st-hero-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .st-hero-lead {
    grid-column: 1 / -1;
  }

  .st-channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 860px) {
  .st-hero-title {
    font-size: 26px;
  }

  .st-foot-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .st-art-title {
    font-size: 23px;
  }

  .st-related {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 680px) {
  .st-top-inner {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }

  .st-menu-btn {
    display: flex;
  }

  .st-nav,
  .st-search {
    display: none;
  }

  .st-brand-text {
    font-size: 16px;
  }

  .st-drawer {
    top: 56px;
  }

  .st-theme {
    margin-left: auto;
    width: 32px;
    height: 32px;
  }

  .st-hero {
    padding: 26px 0 26px;
  }

  .st-hero-inner,
  .st-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .st-hero-title {
    font-size: 22px;
  }

  .st-hero-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .st-hero-lead .st-hero-ctitle {
    font-size: 18px;
  }

  .st-section {
    padding: 16px;
  }

  .st-channels {
    grid-template-columns: minmax(0, 1fr);
  }

  .st-item {
    gap: 10px;
  }

  .st-item-title {
    font-size: 15.5px;
  }

  .st-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .st-shell-article .st-rail-sticky {
    grid-template-columns: minmax(0, 1fr);
  }

  .st-rail-card {
    flex: 0 0 84%;
  }

  .st-article {
    padding: 20px 16px;
  }

  .st-art-title {
    font-size: 20px;
  }

  .st-content {
    font-size: 16px;
  }

  .st-content h2 {
    font-size: 19px;
  }

  .st-prevnext {
    grid-template-columns: minmax(0, 1fr);
  }

  .st-page-head {
    padding: 16px;
  }

  .st-page-head h1 {
    font-size: 21px;
  }

  .st-panel {
    padding: 18px 16px;
  }

  .st-error {
    margin: 28px 14px;
    padding: 30px 20px;
  }

  .guestbook-form .form-item {
    flex-direction: column;
    gap: 6px;
  }

  .guestbook-form .form-label {
    flex: none;
    width: 100%;
    text-align: left;
    padding-top: 0;
  }

  .guestbook-form .form-control {
    padding-left: 0;
  }

  .st-totop {
    right: 14px;
    bottom: 18px;
    width: 38px;
    height: 38px;
  }
}

/* 横向轨内的卡片：固定宽度 + 吸附 */
.st-slider .st-rail-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--st-bg);
}

@media screen and (max-width: 680px) {
  .st-slider .st-rail-card {
    flex: 0 0 84%;
  }
}
