@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&display=swap');

/* ── 变量 ── */
:root {
  --c-bg: #001e3c;
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-surface: #002a52;
  --c-surface2: #003566;
  --c-text: #d0ffe8;
  --c-text-muted: #7ab898;
  --c-border: rgba(153,255,204,0.15);
  --c-card-bg: #002a52;
  --nav-w: 220px;
  --font: 'Noto Sans Thai', system-ui, sans-serif;
  --radius: 0;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-accent); }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { cursor: pointer; }

/* ── 有机菌落背景纹理 ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60px 80px at 15% 20%, rgba(0,255,65,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 100px 60px at 80% 60%, rgba(153,255,204,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40px 40px at 50% 80%, rgba(0,255,65,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 80px 50px at 30% 70%, rgba(153,255,204,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: cell-breathe 8s ease-in-out infinite;
}

@keyframes cell-breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* ── 页面骨架 ── */
.page-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── 侧边导航 ── */
.sidenav {
  width: var(--nav-w);
  min-height: 100vh;
  background: rgba(0,15,30,0.92);
  border-right: 1px solid var(--c-border);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

.sidenav-brand {
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-mark-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--c-accent);
  color: var(--c-bg);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  animation: cell-breathe 4s ease-in-out infinite;
}

.sidenav ol {
  flex: 1;
  padding: 1rem 0;
}

.sidenav ol li { }

.sidenav ol li a {
  display: flex;
  align-items: center;
  padding: 0.7rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--c-text-muted);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  min-height: 44px;
  line-height: 1.3;
}

.sidenav ol li a:hover,
.sidenav ol li a[aria-current="page"] {
  color: var(--c-accent);
  border-left-color: var(--c-accent);
  background: rgba(0,255,65,0.06);
}

.sidenav-tagline {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--c-border);
  font-size: 0.72rem;
  color: var(--c-text-muted);
  text-align: center;
  line-height: 1.4;
}

/* ── 右侧内容区 ── */
.page-body {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Hero 首页 ── */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 70vh;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}

.hero-media {
  position: relative;
  background: var(--c-surface);
  overflow: hidden;
}

.hero-img-slot {
  position: absolute;
  overflow: hidden;
}

.hero-slot-1 {
  top: 0; left: 0;
  width: 68%;
  height: 75%;
}

.hero-slot-2 {
  bottom: 0; right: 0;
  width: 62%;
  height: 65%;
  border: 2px solid var(--c-accent);
}

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

.hero-badge {
  position: absolute;
  z-index: 5;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.cell-badge {
  background: var(--c-accent);
  color: var(--c-bg);
}

.cell-badge:first-of-type {
  top: 1rem;
  right: 1rem;
}

.cell-badge-2 {
  background: var(--c-primary);
  color: var(--c-bg);
  bottom: 1rem;
  left: 1rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 3rem 3rem 3rem 2rem;
  text-align: right;
  position: relative;
  z-index: 2;
}

.hero-h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-primary);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1rem;
  color: var(--c-text-muted);
  max-width: 380px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--c-accent);
  color: var(--c-bg);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  border: none;
  min-height: 44px;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: var(--c-primary);
  color: var(--c-bg);
  transform: translateY(-2px);
}

/* ── 分类 Hero ── */
.cat-hero {
  padding: 3rem 2.5rem 2.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 220px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0,42,82,0.8) 0%, rgba(0,30,60,0.95) 100%);
}

.cat-hero-inner { flex: 1; }

.cat-eyebrow {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(0,255,65,0.15);
  color: var(--c-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
}

.cat-hero h1 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.8rem;
  line-height: 1.25;
}

.cat-lead {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  max-width: 560px;
  line-height: 1.7;
}

/* ── 关于 Hero ── */
.about-hero {
  padding: 3rem 2.5rem 2.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 240px;
  background: linear-gradient(135deg, rgba(0,53,102,0.7) 0%, rgba(0,30,60,0.98) 100%);
  overflow: hidden;
}

.about-hero-inner { flex: 1; }

.about-lead {
  color: var(--c-text-muted);
  font-size: 1rem;
  max-width: 560px;
  line-height: 1.7;
  margin-top: 0.6rem;
}

/* ── Tag Hero ── */
.tag-hero {
  padding: 2.5rem 2.5rem 2rem;
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(135deg, rgba(0,42,82,0.9) 0%, rgba(0,30,60,0.98) 100%);
}

.tag-hero-inner h1 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.6rem;
}

.tag-hero-inner p {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  max-width: 560px;
}

/* ── 有机细胞 SVG 装饰 ── */
.cell-deco {
  width: 160px;
  height: 160px;
  opacity: 0.3;
  flex-shrink: 0;
  margin-left: 2rem;
  animation: cell-breathe 6s ease-in-out infinite;
}

.cell-deco-lg {
  width: 200px;
  height: 200px;
}

.cell-svg { width: 100%; height: 100%; }
.cell-ring { fill: none; stroke: var(--c-accent); stroke-width: 2; }
.cell-core { fill: rgba(0,255,65,0.08); stroke: var(--c-primary); stroke-width: 1.5; }
.cell-nucleus { fill: rgba(153,255,204,0.12); stroke: var(--c-primary); stroke-width: 1; }

/* ── 内容布局：侧边栏 + 主体 ── */
.content-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--c-border);
  background: rgba(0,15,30,0.5);
  order: -1;
}

.aside-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  margin-bottom: 0.7rem;
  margin-top: 1.2rem;
  text-transform: uppercase;
}

.aside-heading:first-child { margin-top: 0; }

.aside-links li + li { margin-top: 0.2rem; }

.aside-links a {
  display: block;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  border-left: 2px solid transparent;
  transition: all var(--transition);
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
}

.aside-links a:hover {
  color: var(--c-primary);
  border-left-color: var(--c-primary);
  background: rgba(153,255,204,0.05);
}

/* ── 主内容 main ── */
main {
  flex: 1;
  min-width: 0;
  padding: 2rem 0;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── div > article 结构 ── */
.home-content-section,
.cat-content-section,
.cat-entries-section,
.entry-section,
.tag-content-section,
.tag-entries-section,
.about-section,
.privacy-section,
.home-cats-section,
.home-children-section {
  margin-bottom: 2.5rem;
}

.home-article,
.cat-article,
.tag-article,
.about-article,
.privacy-article {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.8;
}

.home-article h2, .cat-article h2, .entry-article h2,
.tag-article h2, .about-article h2, .privacy-article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 1.8rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--c-border);
}

.home-article h3, .cat-article h3, .entry-article h3,
.tag-article h3, .about-article h3, .privacy-article h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--c-primary);
  margin: 1.3rem 0 0.5rem;
}

.home-article p, .cat-article p, .entry-article p,
.tag-article p, .about-article p, .privacy-article p {
  margin-bottom: 1rem;
}

.home-article ul, .home-article ol,
.cat-article ul, .cat-article ol,
.entry-article ul, .entry-article ol,
.tag-article ul, .tag-article ol,
.about-article ul, .about-article ol,
.privacy-article ul, .privacy-article ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.home-article ul { list-style: disc; }
.home-article ol { list-style: decimal; }
.cat-article ul { list-style: disc; }
.cat-article ol { list-style: decimal; }
.entry-article ul { list-style: disc; }
.entry-article ol { list-style: decimal; }
.tag-article ul { list-style: disc; }
.about-article ul { list-style: disc; }
.privacy-article ul { list-style: disc; }
.privacy-article ol { list-style: decimal; }

.home-article a, .cat-article a, .entry-article a,
.tag-article a, .about-article a, .privacy-article a {
  color: var(--c-accent);
  border-bottom: 1px solid rgba(0,255,65,0.3);
}

.home-article a:hover, .cat-article a:hover, .entry-article a:hover,
.tag-article a:hover, .about-article a:hover, .privacy-article a:hover {
  border-bottom-color: var(--c-primary);
}

/* ── 区块标题 ── */
.section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-heading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--c-accent);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* ── 分类卡片网格（子页） ── */
.cat-grid,
.child-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--c-border);
}

.cat-link,
.child-card {
  display: flex;
  flex-direction: column;
  background: var(--c-card-bg);
  padding: 1.4rem 1.2rem;
  transition: background var(--transition), transform var(--transition);
  border: none;
}

.cat-link:hover,
.child-card:hover {
  background: var(--c-surface2);
  transform: translateY(-2px);
}

.cat-link strong,
.child-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.cat-link span,
.child-card .card-desc {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

.card-img-wrap {
  display: block;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.card-img-wrap img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform var(--transition);
}

.child-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

/* ── 条目卡片网格 ── */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--c-border);
}

.entry-card {
  display: flex;
  flex-direction: column;
  background: var(--c-card-bg);
  padding: 1.2rem 1.1rem;
  transition: background var(--transition), transform var(--transition);
  position: relative;
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--c-accent);
  transform: scaleY(0);
  transition: transform var(--transition);
  transform-origin: bottom;
}

.entry-card:hover {
  background: var(--c-surface2);
  transform: translateY(-2px);
}

.entry-card:hover::before {
  transform: scaleY(1);
}

.entry-card strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.entry-card .card-desc {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  flex: 1;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.entry-card .card-date {
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

.entry-card .card-date time {
  color: var(--c-text-muted);
  font-size: 0.75rem;
}

/* ── 条目页 ── */
.entry-topbar,
.privacy-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.85rem;
  background: rgba(0,15,30,0.5);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb-link {
  color: var(--c-text-muted);
  font-size: 0.85rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0;
}

.breadcrumb-link:hover { color: var(--c-primary); }

.entry-meta-dates {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

.entry-meta-dates time {
  color: var(--c-text-muted);
}

.entry-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--c-border);
}

.entry-hero-wrap {
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.entry-hero-img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.entry-header h1 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.entry-desc {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 660px;
}

.entry-body {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.8;
}

.entry-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 1.8rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--c-border);
}

.entry-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-primary);
  margin: 1.3rem 0 0.5rem;
}

.entry-body p { margin-bottom: 1rem; }

.entry-body ul, .entry-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
  list-style: disc;
}

.entry-body ol { list-style: decimal; }

.entry-body a {
  color: var(--c-accent);
  border-bottom: 1px solid rgba(0,255,65,0.3);
}

.entry-body a:hover {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary);
}

/* ── 关于页 ── */
.about-body {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.8;
}

.about-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 1.8rem 0 0.7rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--c-border);
}

.about-body p { margin-bottom: 1rem; }
.about-body ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.about-body a { color: var(--c-accent); border-bottom: 1px solid rgba(0,255,65,0.3); }

/* ── 隐私页 ── */
.privacy-section h1 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: 1.2rem;
  line-height: 1.25;
}

.privacy-body {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.8;
}

.privacy-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 1.6rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--c-border);
}

.privacy-body p { margin-bottom: 1rem; }
.privacy-body ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.privacy-body a { color: var(--c-accent); }

.privacy-mod {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

/* ── 标签页 ── */
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag-chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(153,255,204,0.1);
  color: var(--c-primary);
  font-size: 0.78rem;
  border: 1px solid var(--c-border);
  transition: background var(--transition);
  min-height: 28px;
  line-height: 1.6;
}

.tag-chip:hover {
  background: rgba(0,255,65,0.15);
  color: var(--c-accent);
}

/* ── 页脚 ── */
.site-footer {
  border-top: 1px solid var(--c-border);
  background: rgba(0,10,20,0.8);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--c-primary);
  letter-spacing: 0.05em;
}

.footer-inner nav {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.footer-inner nav a {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--c-text-muted);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}

.footer-inner nav a:hover {
  color: var(--c-accent);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  text-align: center;
}

/* ── Stagger 动效 ── */
.entry-grid .entry-card,
.cat-grid .cat-link,
.child-grid .child-card {
  animation: fadeSlideUp 0.4s both;
}

.entry-grid .entry-card:nth-child(1) { animation-delay: 0.05s; }
.entry-grid .entry-card:nth-child(2) { animation-delay: 0.10s; }
.entry-grid .entry-card:nth-child(3) { animation-delay: 0.15s; }
.entry-grid .entry-card:nth-child(4) { animation-delay: 0.20s; }
.entry-grid .entry-card:nth-child(5) { animation-delay: 0.25s; }
.entry-grid .entry-card:nth-child(6) { animation-delay: 0.30s; }

.cat-grid .cat-link:nth-child(1),
.child-grid .child-card:nth-child(1) { animation-delay: 0.05s; }
.cat-grid .cat-link:nth-child(2),
.child-grid .child-card:nth-child(2) { animation-delay: 0.12s; }
.cat-grid .cat-link:nth-child(3),
.child-grid .child-card:nth-child(3) { animation-delay: 0.19s; }
.cat-grid .cat-link:nth-child(4),
.child-grid .child-card:nth-child(4) { animation-delay: 0.26s; }

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

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── 移动端断点 ── */
@media (max-width: 900px) {
  :root { --nav-w: 0px; }

  .sidenav {
    position: relative;
    width: 100%;
    min-height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    overflow: visible;
  }

  .sidenav-brand {
    border-bottom: none;
    border-right: 1px solid var(--c-border);
    padding: 0.6rem 1rem;
  }

  .sidenav ol {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    flex: 1;
  }

  .sidenav ol li a {
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    min-height: 44px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .sidenav ol li a:hover,
  .sidenav ol li a[aria-current="page"] {
    border-left: none;
    border-bottom-color: var(--c-accent);
    background: rgba(0,255,65,0.06);
  }

  .sidenav-tagline { display: none; }

  .page-body { margin-left: 0; }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media { min-height: 220px; }

  .hero-copy {
    align-items: flex-start;
    text-align: left;
    padding: 2rem 1.5rem;
  }

  .content-layout { flex-direction: column; }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    order: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.2rem;
  }

  .aside-heading { margin-top: 0; }

  .aside-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
  }

  .aside-links a {
    min-height: 40px;
    padding: 0.4rem 0.7rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .aside-links a:hover {
    border-left: none;
    border-bottom-color: var(--c-primary);
    background: rgba(153,255,204,0.05);
  }

  .cat-hero, .about-hero {
    flex-direction: column;
    padding: 2rem 1.5rem;
    min-height: auto;
  }

  .cell-deco { display: none; }

  .wrap { padding: 0 1.2rem; }

  .cat-grid,
  .child-grid,
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  .sidenav ol { display: none; }

  .sidenav {
    justify-content: space-between;
    align-items: center;
  }

  .sidenav::after {
    content: '☰ 导航';
    padding: 0.6rem 1rem;
    color: var(--c-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
  }

  .hero-h1 { font-size: 1.4rem; }

  main { padding: 1rem 0; }
}
