/* 橙芯科技 — 养生生活资讯 H5（www.cxxinc.com） */
:root {
  --primary: #0a8f7a;
  --primary-dark: #066b5c;
  --primary-light: #12b89e;
  --accent: #f4a261;
  --accent-soft: #ffe8d6;
  --bg: #f5f3ef;
  --bg-card: #ffffff;
  --text: #1a2b2e;
  --text-muted: #6b7c80;
  --border: #e8e4dc;
  --shadow: 0 4px 24px rgba(10, 79, 68, 0.08);
  --shadow-lg: 0 12px 40px rgba(10, 79, 68, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --header-height: 56px;
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

.app {
  max-width: 750px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 10px 16px 14px;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  backdrop-filter: blur(8px);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.05em;
}

.search-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 4px 4px 4px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}

.search-input::placeholder {
  color: #aab5b8;
}

.search-btn {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.search-btn:active {
  transform: scale(0.96);
  background: var(--primary-dark);
}

.menu-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.menu-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

/* Category nav */
.nav-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-tabs {
  display: flex;
  padding: 0 12px;
  gap: 4px;
  min-width: max-content;
}

.nav-tab {
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-tab.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* Hero banner */
.hero {
  padding: 16px 16px 12px;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 200px;
  box-shadow: var(--shadow-lg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  cursor: pointer;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: #c5d0d2;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s;
}

.hero-dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--primary);
}

.hero-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 180px;
  box-shadow: var(--shadow-lg);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 43, 38, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.hero-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 6px;
}

/* Article list */
.hot-scroll-wrap {
  padding: 8px 0 4px;
}

.hot-scroll-wrap .section-title {
  padding-left: 16px;
  margin-bottom: 12px;
}

.hot-scroll {
  padding: 0 16px 8px;
}

.hot-scroll.waterfall {
  column-count: 2;
  column-gap: 12px;
}

.hot-card,
.waterfall-card {
  break-inside: avoid;
  margin-bottom: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: block;
  width: 100%;
  animation: fadeUp 0.5s ease both;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hot-card:active,
.waterfall-card:active {
  transform: scale(0.98);
}

.waterfall-thumb {
  position: relative;
  overflow: hidden;
}

.waterfall-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.waterfall-card:nth-child(odd) .waterfall-thumb img {
  aspect-ratio: 3 / 4;
}

.waterfall-card:nth-child(3n) .waterfall-thumb img {
  aspect-ratio: 16 / 10;
}

.waterfall-tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 10px;
  color: #fff;
  background: rgba(10, 143, 122, 0.88);
  padding: 2px 8px;
  border-radius: 10px;
  max-width: calc(100% - 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waterfall-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  width: 22px;
  height: 22px;
  background: rgba(10, 143, 122, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waterfall-card:nth-child(1) .waterfall-rank {
  background: #e07a5f;
}

.waterfall-card:nth-child(2) .waterfall-rank {
  background: #f4a261;
}

.waterfall-body {
  padding: 10px 12px 12px;
}

.waterfall-card.text-only {
  border: 1px solid rgba(10, 143, 122, 0.12);
}

.waterfall-card.text-only .waterfall-body {
  position: relative;
  padding: 14px 12px 12px;
}

.waterfall-card.text-only .waterfall-rank {
  position: static;
  display: inline-flex;
  margin-right: 6px;
  vertical-align: middle;
}

.waterfall-tag-inline {
  display: inline-block;
  font-size: 10px;
  color: var(--primary);
  background: rgba(10, 143, 122, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}

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

.waterfall-summary {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.waterfall-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  gap: 8px;
}

/* legacy hot-card inner (unused, kept for rank colors above) */
.hot-card img {
  width: 100%;
  object-fit: cover;
}

.hot-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  background: rgba(10, 143, 122, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hot-card-body {
  padding: 10px 12px;
}

.hot-card-body h4 {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hot-card-body span {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

/* Topic blocks */
.topic-blocks {
  margin-bottom: 20px;
}

.topic-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.topic-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.topic-block-label {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
}

.topic-more {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}

.topic-mini-list {
  column-count: 2;
  column-gap: 10px;
}

.topic-mini-list.waterfall .waterfall-card {
  margin-bottom: 10px;
}

.topic-mini-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.topic-mini-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.topic-mini-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.topic-mini-item h4 {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topic-mini-item span {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.article-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article list */
.article-section {
  padding: 0 16px 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}

.article-list {
  column-count: 2;
  column-gap: 12px;
}

.article-list.waterfall .waterfall-card {
  margin-bottom: 12px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.5s ease both;
}

.article-card:active {
  transform: scale(0.98);
}

.article-card.featured {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 0;
  align-items: stretch;
}

.article-card.featured .article-body {
  padding: 14px 14px 14px 16px;
}

.article-card.featured .article-thumb {
  height: 100%;
  min-height: 110px;
}

.article-card.triple .article-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 12px 12px;
}

.article-card.triple .article-thumbs img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.article-body {
  padding: 14px 16px;
}

.article-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.article-meta .tag {
  color: var(--primary);
  background: rgba(10, 143, 122, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.article-thumb {
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.article-card:not(.featured):not(.triple) .article-thumb {
  padding: 0 12px 12px;
}

.article-card:not(.featured):not(.triple) .article-thumb img {
  border-radius: var(--radius-sm);
  height: 160px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.4;
}

/* Load more */
.load-more {
  text-align: center;
  padding: 16px;
}

.load-more-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.load-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 28px 16px 32px;
  margin-top: 8px;
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.12em;
}

.footer-contact-list {
  margin: 0 0 20px;
}

.footer-contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.footer-contact-row:last-child {
  border-bottom: none;
}

.footer-contact-row dt {
  flex-shrink: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.footer-contact-row dd {
  text-align: right;
  color: var(--text);
  margin: 0;
}

.footer-contact-row a {
  color: var(--primary);
  text-decoration: none;
}

.footer-contact-row a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-icp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-bottom: 14px;
  font-size: 12px;
}

.footer-icp-label {
  color: var(--text-muted);
}

.footer-icp-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.footer-icp-link:hover {
  text-decoration: underline;
}

.footer-notice {
  font-size: 11px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: left;
}

.footer-notice a {
  color: var(--primary);
}

.footer-copy {
  font-size: 11px;
  color: #9aa5a8;
  margin-top: 14px;
  letter-spacing: 0.02em;
}

.footer-divider {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.2em;
}

.footer-info {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 2;
}

.footer-info a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Back to top */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 90;
}

.to-top.visible {
  opacity: 1;
  visibility: visible;
}

.to-top:active {
  transform: scale(0.92);
}

/* Category drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100%;
  background: var(--bg-card);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 20px;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav button {
  padding: 14px 16px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.drawer-nav button.active,
.drawer-nav button:active {
  background: rgba(10, 143, 122, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
}

/* Article detail page */
.detail-page {
  background: var(--bg-card);
  min-height: 100vh;
}

.detail-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.back-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-header-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  color: var(--text);
  text-decoration: none;
}

.detail-header-title:hover {
  color: var(--primary);
}

.detail-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.detail-content {
  padding: 20px 16px 40px;
  max-width: 750px;
  margin: 0 auto;
}

.detail-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-meta .tag {
  color: var(--primary);
  background: rgba(10, 143, 122, 0.08);
  padding: 2px 10px;
  border-radius: 4px;
}

.detail-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-tag-chip {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(10, 143, 122, 0.1);
  color: var(--primary-dark);
}

.detail-body {
  font-size: 16px;
  line-height: 1.85;
  color: #2c3e40;
}

.detail-body p {
  margin-bottom: 16px;
}

.detail-body h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 24px 0 12px;
  color: var(--text);
}

.detail-body blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  color: var(--primary-dark);
}

.recommend-section {
  padding: 20px 16px;
  background: var(--bg);
}

.detail-sidebar {
  padding: 20px 16px;
  background: var(--bg);
}

.detail-layout {
  display: block;
}

.detail-main {
  min-width: 0;
}

.recommend-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}

.recommend-list {
  column-count: 2;
  column-gap: 12px;
}

.recommend-list.waterfall .waterfall-card {
  margin-bottom: 12px;
}

.recommend-item {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s;
}

.recommend-item:active {
  transform: scale(0.98);
}

.recommend-item img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.recommend-item h4 {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
}

.recommend-item span {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— 平板 (≥768px) —— */
@media (min-width: 768px) {
  .header {
    padding: 12px 24px 16px;
  }

  .header-inner {
    max-width: var(--layout-max);
    margin: 0 auto;
  }

  .search-wrap {
    max-width: 420px;
  }

  .hero {
    padding: 20px 24px 12px;
  }

  .hero-slider {
    height: 260px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hot-scroll-wrap .section-title {
    padding-left: 24px;
  }

  .hot-scroll {
    padding: 0 24px 12px;
  }

  .hot-scroll.waterfall {
    column-count: 3;
    column-gap: 14px;
  }

  .topic-mini-list.waterfall {
    column-count: 2;
    column-gap: 12px;
  }

  .article-section {
    padding: 0 24px 32px;
  }

  .article-list {
    column-count: 3;
    column-gap: 16px;
  }

  .recommend-list.waterfall {
    column-count: 2;
    column-gap: 14px;
  }

  .topic-blocks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .topic-block {
    margin-bottom: 0;
  }

  .footer {
    padding: 36px 32px 40px;
  }

  .footer-inner {
    max-width: 720px;
  }

  .footer-notice {
    text-align: center;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  .detail-cover {
    height: 300px;
  }

  .detail-content {
    padding: 28px 24px 48px;
  }

  .detail-title {
    font-size: 26px;
  }

  .to-top {
    right: 24px;
    bottom: 32px;
  }
}

/* —— PC (≥1024px) —— */
@media (min-width: 1024px) {
  :root {
    --layout-max: 1120px;
  }

  body {
    background: #e8e4dc;
  }

  .app {
    max-width: var(--layout-max);
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(10, 79, 68, 0.12);
  }

  .menu-btn {
    display: none;
  }

  .nav-scroll {
    overflow: visible;
    border-bottom: 1px solid var(--border);
  }

  .nav-tabs {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 0 24px;
    justify-content: center;
    flex-wrap: wrap;
    min-width: auto;
  }

  .nav-tab {
    padding: 14px 18px;
    font-size: 15px;
  }

  .nav-tab:hover {
    color: var(--primary);
  }

  #homeExtras {
    padding: 24px 24px 8px;
  }

  .hero-slider {
    height: 340px;
  }

  .hot-scroll-wrap {
    padding-bottom: 8px;
  }

  .hot-scroll-wrap .section-title {
    padding-left: 24px;
    margin-bottom: 16px;
  }

  .hot-scroll {
    padding: 0 24px;
  }

  .hot-scroll.waterfall {
    column-count: 4;
    column-gap: 16px;
  }

  .article-list {
    column-count: 4;
    column-gap: 20px;
  }

  .topic-mini-list.waterfall {
    column-count: 2;
    column-gap: 12px;
  }

  .recommend-list.waterfall {
    column-count: 1;
    column-gap: 12px;
  }

  .topic-blocks {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .detail-page {
    max-width: var(--layout-max);
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(10, 79, 68, 0.12);
    background: var(--bg);
  }

  .detail-header {
    max-width: var(--layout-max);
    margin: 0 auto;
    padding: 14px 24px;
  }

  .detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 0;
    max-width: var(--layout-max);
    margin: 0 auto;
    align-items: start;
  }

  .detail-main {
    background: var(--bg-card);
  }

  .detail-cover {
    height: 380px;
    border-radius: 0;
  }

  .detail-content {
    max-width: none;
    padding: 32px 40px 48px;
  }

  .detail-title {
    font-size: 28px;
  }

  .detail-sidebar {
    padding: 24px 20px 40px;
    border-left: 1px solid var(--border);
    position: sticky;
    top: 0;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }

  .detail-sidebar .recommend-title {
    margin-bottom: 16px;
  }

  .detail-page .footer {
    max-width: var(--layout-max);
    margin: 0 auto;
  }

  .to-top {
    right: max(24px, calc((100vw - var(--layout-max)) / 2 + 24px));
  }

  .drawer,
  .drawer-overlay {
    display: none;
  }
}

/* PC 悬停交互 */
@media (hover: hover) and (pointer: fine) {
  .search-btn:hover {
    background: var(--primary-dark);
  }

  .menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
  }

  .waterfall-card:hover,
  .article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }

  .hot-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }

  .topic-mini-item:hover h4,
  .waterfall-card:hover .waterfall-title {
    color: var(--primary);
  }

  .recommend-item:hover,
  .waterfall-card:hover {
    box-shadow: var(--shadow-lg);
  }

  .load-more-btn:hover {
    background: rgba(10, 143, 122, 0.06);
  }

  .topic-more:hover {
    text-decoration: underline;
  }

  .back-btn:hover {
    background: rgba(10, 143, 122, 0.1);
    color: var(--primary);
  }
}

/* 移动端安全区 + 顶部适配 */
@media (max-width: 767px) {
  .header {
    padding: 8px 12px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    overflow: hidden;
  }

  .header-inner {
    gap: 8px;
  }

  .logo-text {
    display: none;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .search-wrap {
    padding: 3px 3px 3px 10px;
    border-radius: 20px;
  }

  .search-input {
    font-size: 13px;
  }

  .search-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .menu-btn {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .nav-scroll {
    mask-image: linear-gradient(to right, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent);
  }

  .nav-tabs {
    padding: 0 8px 0 4px;
    gap: 0;
  }

  .nav-tab {
    padding: 10px 12px;
    font-size: 14px;
  }

  .to-top {
    bottom: max(24px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .logo-text {
    display: inline;
    font-size: 16px;
  }
}
