:root {
  --color-primary: #CFE6FB;
  --color-primary-dark: #088a50;
  --text-primary: #1f2a24;
  --text-on-primary: #1f2a24;
  --text-on-primary-dark: #ffffff;
  --tag-blue: #4a90e2;
  --muted: #999;
  --line: rgba(255, 255, 255, 0.55);
  --max: 800px;
  --card-bg: #ffffff;
}

@supports (color: lch(from #000 l c h)) {
  :root {
    --text-on-primary: lch(from var(--color-primary) calc((58 - l) * infinity) 0 0);
    --text-on-primary-dark: lch(from var(--color-primary-dark) calc((58 - l) * infinity) 0 0);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  color: var(--text-primary);
  line-height: 1.45;
  background: var(--color-primary);
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

.home-page,
.detail-page,
.static-page {
  background: var(--color-primary);
  padding-top: 45px;
  min-height: 100vh;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 45px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-inner--detail {
  justify-content: flex-start;
  position: relative;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-on-primary);
  letter-spacing: 0.2px;
}

.brand--center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.back-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 10px 28px;
}

.adv {
  width: 100%;
  margin: 10px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.adv > p {
  width: 100%;
  margin: 8px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  font-family: Arial, Helvetica, sans-serif;
  color: rgba(255, 255, 255, 0.85);
}

.adv > div {
  max-width: 100%;
}

.adv iframe {
  max-width: 100%;
}

.adv img {
  max-width: none;
  width: auto;
  height: auto;
  display: inline-block;
}

.category-page .adv > p {
  color: #888;
}

.adv-float {
  width: 100%;
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 999;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.category-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 2px 12px;
  scrollbar-width: thin;
}

.category-bar::-webkit-scrollbar {
  height: 4px;
}

.category-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.category-btn.active {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--text-on-primary-dark);
  font-weight: 600;
}

.articles-grid {
  display: flex;
  flex-direction: column;
}

.article-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 110px;
  padding: 0 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
}

.article-img {
  position: relative;
  width: 140px;
  height: 110px;
  flex: 0 0 140px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
}

.article-img img {
  width: 140px;
  height: 110px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.article-img img.is-shown {
  opacity: 1;
}

.hot-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  min-width: 34px;
  padding: 3px 6px;
  background: #f08a24;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.4px;
  line-height: 1.2;
  border-bottom-right-radius: 4px;
}

.article-info {
  flex: 1;
  min-width: 0;
  min-height: 110px;
  padding: 4px 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--tag-blue);
  color: #fff;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
}

.article-title {
  margin: 0;
  color: var(--text-on-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.article-date {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-on-primary);
  opacity: 0.85;
  font-family: Arial, Helvetica, sans-serif;
}

.loader {
  width: 28px;
  height: 28px;
  margin: 18px auto;
  border: 3px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader.is-hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-shell,
.static-shell {
  background: transparent;
}

.detail-title,
.related-title,
.static-title,
.detail-date,
.static-content,
.footer-mail,
.footer-copy,
.footer-links a,
.empty-tip {
  color: var(--text-on-primary);
}

.detail-title {
  font-size: 22px;
  line-height: 1.35;
  margin: 8px 0 10px;
}

.detail-date {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 14px;
  font-family: Arial, Helvetica, sans-serif;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.28);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.detail-cover img.is-shown {
  opacity: 1;
}

.detail-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-on-primary);
}

.detail-body p {
  margin: 0 0 14px;
}

.detail-body img,
.detail-body .content-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin: 8px 0 14px;
  background: rgba(255, 255, 255, 0.28);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.detail-body img.is-shown,
.detail-body .content-img.is-shown {
  opacity: 1;
}

.related-block {
  margin-top: 10px;
}

.related-title {
  font-size: 18px;
  margin: 8px 0 14px;
}

.static-title {
  font-size: 24px;
  margin: 10px 0 16px;
}

.static-content {
  font-size: 15px;
  line-height: 1.7;
}

.static-content h2 {
  font-size: 18px;
  margin: 18px 0 8px;
}

.static-content p {
  margin: 0 0 12px;
}

.static-content a {
  color: #e8fff3;
  text-decoration: underline;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 14px 36px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-mail {
  margin-bottom: 8px;
  font-size: 13px;
}

.footer-copy {
  font-size: 12px;
  opacity: 0.9;
  font-family: Arial, Helvetica, sans-serif;
}

.empty-tip {
  padding: 28px 10px;
  text-align: center;
  font-size: 14px;
  opacity: 0.9;
}

.float-category-btn,
.float-home-btn {

  z-index: 120;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.float-category-btn {
  position: fixed;
  right: 10px;
  bottom: 206px;
}

.float-home-btn {
  right: 16px;
  bottom: 96px;
}

.float-category-icon {
  width: 22px;
  height: 22px;
  background:
    linear-gradient(#0aa760, #0aa760) 0 0 / 9px 9px no-repeat,
    linear-gradient(#0aa760, #0aa760) 13px 0 / 9px 9px no-repeat,
    linear-gradient(#0aa760, #0aa760) 0 13px / 9px 9px no-repeat,
    linear-gradient(#0aa760, #0aa760) 13px 13px / 9px 9px no-repeat;
}

.float-home-icon {
  width: 20px;
  height: 18px;
  position: relative;
  border: 2px solid #0aa760;
  border-top: 0;
  box-sizing: border-box;
}

.float-home-icon::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -9px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 9px solid #0aa760;
}

.category-page {
  background: var(--color-primary);
  padding-top: 45px;
}

.category-page .site-header {
  background: var(--color-primary);
}

.category-wrapper {
  display: flex;
  min-height: calc(100vh - 45px);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.category-sidebar {
  width: 120px;
  flex: 0 0 120px;
  background: var(--color-primary);
  min-height: calc(100vh - 45px);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  padding: 14px 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}

.sidebar-item.active {
  background: #fff;
  color: #111;
  font-weight: 600;
}

.category-content {
  flex: 1;
  min-width: 0;
  background: var(--color-primary);
  padding: 12px 12px 72px;
}

.category-header {
  margin-bottom: 8px;
}

.category-title {
  font-size: 22px;
  color: #fff;
  font-weight: 500;
}

.category-articles .article-item {
  border-bottom: 1px solid #ddd;
  min-height: 80px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.category-articles .article-img {
  width: 100px;
  height: 80px;
  flex-basis: 100px;
  border-radius: 8px;
  background: #f2f2f2;
}

.category-articles .article-img img {
  width: 100px;
  height: 80px;
}

.category-articles .article-info {
  min-height: 80px;
  gap: 6px;
}

.category-articles .article-title {
  color: #fff;
  min-height: auto;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.category-articles .article-date {
  color: rgba(255, 255, 255, 0.85);
  opacity: 1;
}

.category-page .loader {
  border-color: rgba(10, 167, 96, 0.25);
  border-top-color: var(--color-primary);
}

.category-page .empty-tip {
  color: #fff;
}

@media (max-width: 480px) {
  .article-item {
    min-height: 96px;
  }

  .article-img {
    width: 118px;
    height: 96px;
    flex-basis: 118px;
  }

  .article-img img {
    width: 118px;
    height: 96px;
  }

  .article-info {
    min-height: 96px;
  }

  .article-title {
    font-size: 13px;
  }

  .brand {
    font-size: 18px;
  }

  .category-sidebar {
    width: 104px;
    flex-basis: 104px;
  }

  .sidebar-item {
    font-size: 13px;
    padding: 12px 8px;
  }
}
