/* ============================================================
   杨秀娟 · AI产品作品集 — Stylesheet
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f5f4;
  --text-primary: rgba(0,0,0,0.95);
  --text-secondary: #615d59;
  --text-muted: #a39e98;
  --accent: #0075de;
  --accent-active: #005bab;
  --border: 1px solid rgba(0,0,0,0.1);
  --card-bg: #ffffff;
  --card-radius: 12px;
  --btn-radius: 4px;
  --pill-radius: 9999px;
  --pill-bg: #f2f9ff;
  --pill-text: #097fe8;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  --shadow-md: 0 1px 2px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.03), 0 8px 16px rgba(0,0,0,0.02);
  --shadow-lg: 0 2px 4px rgba(0,0,0,0.05), 0 4px 8px rgba(0,0,0,0.04), 0 8px 16px rgba(0,0,0,0.03), 0 16px 32px rgba(0,0,0,0.02);
  --content-width: 1100px;
}

/* ===== RESET ===== */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; }
body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px; line-height: 1.65; color: var(--text-primary);
  background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* ===== PAGE WRAPPER ===== */
.page { max-width: 1200px; margin: 0 auto; }

/* ===== SECTION INNER (unified width for all sections) ===== */
.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ===== NAVIGATION ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: var(--content-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 52px;
}
.nav-logo {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  letter-spacing: -0.01em; text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: color .2s, border-color .2s;
  padding: 4px 0; border-bottom: 2px solid transparent;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }

html.dark .nav {
  background: rgba(26,26,26,0.92);
  border-bottom-color: rgba(255,255,255,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===== HERO ===== */
.hero-section {
  padding: 100px 48px 80px;
  background:
    linear-gradient(135deg, #f6f5f4 0%, #faf9f8 25%, #ffffff 60%, #f9fafb 100%),
    radial-gradient(ellipse 700px 500px at 20% 15%, rgba(0,117,222,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 600px 450px at 85% 70%, rgba(162,155,254,0.06) 0%, transparent 70%);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 0;
  background-image:
    /* 顶部右侧大圆 */
    radial-gradient(circle 280px at 85% -10%, rgba(0,117,222,0.08) 0%, transparent 70%),
    /* 底部左侧大圆 */
    radial-gradient(circle 250px at 5% 95%, rgba(162,155,254,0.06) 0%, transparent 70%),
    /* 精致网格线 */
    linear-gradient(90deg, rgba(0,117,222,0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0,117,222,0.04) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 120px 120px, 120px 120px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  opacity: 0.5;
  animation: gridFloat 20s ease-in-out infinite;
}
.hero-section::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: 0;
  background-image:
    /* 浮动元素1 - 左上蓝色块 */
    radial-gradient(circle 45px at 15% 20%, rgba(0,117,222,0.12) 0%, transparent 100%),
    /* 浮动元素2 - 右中紫色块 */
    radial-gradient(circle 55px at 88% 45%, rgba(162,155,254,0.1) 0%, transparent 100%),
    /* 浮动元素3 - 中下蓝色块 */
    radial-gradient(circle 35px at 50% 75%, rgba(0,117,222,0.08) 0%, transparent 100%),
    /* 浮动元素4 - 左下小块 */
    radial-gradient(circle 30px at 8% 65%, rgba(162,155,254,0.08) 0%, transparent 100%),
    /* 浮动元素5 - 右下块 */
    radial-gradient(circle 40px at 92% 80%, rgba(0,117,222,0.06) 0%, transparent 100%);
  animation: elementsFloat 15s ease-in-out infinite;
}
@keyframes gridFloat {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.7; }
}
@keyframes elementsFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  25% { transform: translateY(-8px) scale(1.02); }
  50% { transform: translateY(4px) scale(0.98); }
  75% { transform: translateY(-4px) scale(1.01); }
}
.hero-content > * { position: relative; z-index: 1; }

/* Hero text — centered, no illustration */
.hero-content {
  display: flex;
  position: relative; z-index: 1;
}
.hero-text { flex: 1; min-width: 0; }
.hero-em {
  font-size: 52px; font-weight: 700; letter-spacing: -0.04em;
  color: var(--accent); line-height: 1.15; white-space: nowrap;
}
.hero-break { display: none; }
.hero-dt { display: inline; }
.hero-mb { display: none; }
.hero-sub {
  font-size: 15px; font-weight: 400; color: var(--text-secondary);
  margin-top: 8px; max-width: 520px; line-height: 1.55;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 16px; border-radius: var(--pill-radius);
  font-size: 13px; font-weight: 500;
  background: var(--pill-bg); color: var(--pill-text);
  border: 1px solid rgba(0,117,222,0.12);
}

/* ===== SECTION HEADER ===== */
.section-header { margin-bottom: 36px; }
.section-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px;
}
.section-headline {
  font-size: 32px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text-primary); line-height: 1.3;
}

/* ===== SECTIONS ===== */
.section       { padding: 72px 48px; }
.section-white { background: var(--bg); }
.section-warm  { background: var(--bg-alt); }

/* ===== ABOUT STRIP ===== */
.about-strip {
  background: var(--bg-alt);
  border-bottom: var(--border);
  padding: 32px 48px;
}
.about-inner {
  max-width: var(--content-width); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 0;
}
.about-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px;
}
.about-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.about-tags span {
  padding: 4px 14px; border-radius: var(--pill-radius);
  font-size: 12px; font-weight: 500;
  background: var(--pill-bg); color: var(--pill-text);
  border: 1px solid rgba(0,117,222,0.1);
}
.about-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.about-stats span {
  padding: 4px 14px; border-radius: var(--pill-radius);
  font-size: 12px; font-weight: 500;
  background: #fff8e1; color: #e65100;
  border: 1px solid rgba(230,81,0,0.12);
}
.about-contact { display: flex; flex-direction: column; gap: 4px; }
.about-contact a, .about-contact span {
  font-size: 13px; color: var(--accent); text-decoration: none;
  font-family: "SF Mono","Fira Code","Consolas",monospace; font-weight: 500;
}
.about-contact a:hover { text-decoration: underline; }
.about-qr-row { display: flex; gap: 20px; margin-top: 16px; }
.about-qr { text-align: center; }
.about-qr img { width: 90px; height: 90px; border-radius: 8px; border: var(--border); display: block; }
.qr-label-b { font-size: 12px; font-weight: 600; color: var(--text-primary); margin-top: 5px; white-space: nowrap; }
.qr-label-l { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; }

/* ===== FEATURED SECTION ===== */
.featured-section {
  padding: 72px 48px;
  background: var(--bg);
}
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
.featured-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--border);
  box-shadow: var(--shadow-md);
  padding: 28px 28px 24px;
  transition: box-shadow .2s ease, transform .15s ease;
  position: relative; overflow: hidden;
}
.featured-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #a371f7);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}
.featured-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.featured-card .fc-award {
  display: inline-block;
  padding: 3px 10px; border-radius: var(--pill-radius);
  font-size: 11px; font-weight: 600;
  background: #fff8e1; color: #e65100;
  border: 1px solid rgba(230,81,0,0.15);
  margin-bottom: 6px;
}
.featured-card .fc-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.featured-card .fc-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: var(--pill-bg); flex-shrink: 0;
}
.featured-card .fc-name {
  font-size: 18px; font-weight: 600; color: var(--text-primary);
  letter-spacing: -0.01em;
}
.featured-card .fc-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 12px;
}
.featured-card .fc-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px;
}
.featured-card .fc-media {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.featured-card .fc-media img {
  max-width: 240px; max-height: 170px; border-radius: 8px;
  border: var(--border); cursor: zoom-in;
  object-fit: contain; background: var(--bg-alt);
  transition: transform .2s ease, box-shadow .2s ease;
}
.featured-card .fc-media img:hover {
  transform: scale(1.03); box-shadow: var(--shadow-md);
}
.featured-card .fc-media video {
  max-width: 100%; max-height: 220px; border-radius: 8px;
  border: var(--border);
}

/* Scrollable gallery */
.fc-gallery {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.fc-gallery::-webkit-scrollbar { height: 4px; }
.fc-gallery::-webkit-scrollbar-track { background: transparent; }
.fc-gallery::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
html.dark .fc-gallery::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.fc-gallery img {
  scroll-snap-align: start; flex-shrink: 0;
  max-width: 240px; max-height: 170px;
  border-radius: 8px; border: var(--border);
  cursor: zoom-in; object-fit: contain;
  background: var(--bg-alt);
  transition: transform .2s ease, box-shadow .2s ease;
}
.fc-gallery img:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.fc-count { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ===== CATEGORY CARD (uniform card style for all non-featured sections) ===== */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--border);
  box-shadow: var(--shadow-md);
  padding: 20px;
  transition: box-shadow .2s ease, transform .15s ease;
  display: flex; gap: 16px; align-items: flex-start;
}
.cat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
/* Media column */
.cat-card .cc-media-col {
  flex-shrink: 0;
  width: 180px;
}
.cat-card .cc-media-col img,
.cat-card .cc-media-col video {
  width: 100%; border-radius: 8px;
  object-fit: contain; border: var(--border);
  background: var(--bg-alt);
  max-height: 140px;
  display: block;
}
.cat-card .cc-media-col img {
  cursor: zoom-in;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card .cc-media-col img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
.cc-mini-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cc-mini-gallery::-webkit-scrollbar { height: 4px; }
.cc-mini-gallery::-webkit-scrollbar-track { background: transparent; }
.cc-mini-gallery::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
html.dark .cc-mini-gallery::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.cat-card .cc-media-col .cc-mini-gallery img {
  flex: 0 0 180px;
  scroll-snap-align: start;
}
/* Full-width gallery inside cat-card (for multi-image projects) */
.cat-card.card-with-gallery {
  flex-direction: column;
  gap: 12px;
}
.cat-card .cc-media-gallery {
  width: 100%;
}
.cat-card .cc-media-gallery .fc-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.cat-card .cc-media-gallery img {
  scroll-snap-align: start;
  flex-shrink: 0;
  max-width: 240px;
  max-height: 170px;
  border-radius: 8px;
  border: var(--border);
  cursor: zoom-in;
  object-fit: contain;
  background: var(--bg-alt);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card .cc-media-gallery img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}
/* Text body */
.cat-card .cc-body { flex: 1; min-width: 0; }
.cat-card .cc-name {
  font-size: 18px; font-weight: 600; color: var(--text-primary);
  letter-spacing: -0.01em;
}
.cat-card .cc-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px;
}
.cat-card .cc-tags .tag { font-size: 11px; padding: 2px 10px; }
.cat-card .cc-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
  margin-top: 8px;
}
.cat-card .cc-link {
  display: inline-block; margin-top: 8px;
  font-size: 13px; color: var(--accent); text-decoration: none;
  font-family: "SF Mono","Fira Code","Consolas",monospace;
  font-weight: 500;
}
.cat-card .cc-link:hover { text-decoration: underline; }
.cat-card .cc-no-link {
  display: inline-block; margin-top: 8px;
  font-size: 12px; color: var(--text-muted); font-style: italic;
}

/* ===== TAGS ===== */
.tag {
  display: inline-block;
  padding: 3px 12px; border-radius: var(--pill-radius);
  font-size: 12px; font-weight: 500; line-height: 1.6;
  background: var(--pill-bg); color: var(--pill-text);
  border: 1px solid rgba(0,117,222,0.1);
}
.tag-web  { background: #f2f9ff; color: #097fe8; border-color: rgba(0,117,222,0.12); }
.tag-mini { background: #f3faf4; color: #1a7f37; border-color: rgba(26,127,55,0.1); }
.tag-game { background: #fff8f2; color: #bc4c00; border-color: rgba(188,76,0,0.1); }
.tag-sys  { background: #faf3fc; color: #8250df; border-color: rgba(130,80,223,0.1); }
.tag-skill{ background: #fff3f6; color: #cf222e; border-color: rgba(207,34,46,0.1); }
.tag-tool { background: #f3faf7; color: #1b7c4e; border-color: rgba(27,124,78,0.1); }
.tag-ai   { background: #f4f5fb; color: #4c5fd5; border-color: rgba(76,95,213,0.1); }

/* ===== LIGHTBOX ===== */
.lb-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.94); z-index: 9999;
  align-items: center; justify-content: center; flex-direction: column;
  overflow: auto;
}
.lb-overlay.active { display: flex; }
.lb-overlay img {
  max-width: 92vw; max-height: 86vh; border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
  transition: max-width .25s ease, max-height .25s ease, transform .1s ease;
  cursor: zoom-in;
}
.lb-overlay img.zoomed {
  max-width: none; max-height: none;
  cursor: grab; border-radius: 4px;
}
.lb-overlay img.zoomed:active { cursor: grabbing; }
.lb-hint {
  color: rgba(255,255,255,0.5); font-size: 13px; margin-top: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: color .2s;
}
.lb-hint.changed { color: rgba(255,255,255,0.7); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-alt);
  padding: 40px 48px; text-align: center;
  border-top: var(--border);
}
.footer-inner {
  max-width: var(--content-width); margin: 0 auto;
  font-size: 13px; color: var(--text-secondary); line-height: 1.8;
}
.footer-inner strong { color: var(--text-primary); font-weight: 600; }
.footer-stacks {
  display: flex; justify-content: center; gap: 48px; margin-top: 10px;
}
.footer-stack-col { text-align: left; }
.footer-stack-col strong { display: block; margin-bottom: 6px; }
.footer-stack-col .footer-stack { margin-top: 0; }
.footer-stack {
  display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  margin-top: 10px;
}
.footer-stack span {
  display: inline-block; padding: 2px 10px; border-radius: var(--pill-radius);
  font-size: 11px; font-weight: 500;
  background: var(--bg); color: var(--text-muted);
  border: var(--border);
}
.footer-icp {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 11px; color: var(--text-muted);
}
.footer-icp a {
  color: var(--text-muted); text-decoration: none;
}
.footer-icp a:hover { text-decoration: underline; color: var(--accent); }

/* ===== CONTACT SECTION ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px;
  max-width: 600px;
  margin: 0 auto;
}
.contact-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--border);
  padding: 24px 20px 20px;
  text-align: center;
}
.contact-card img { width: 200px; height: 200px; max-width: 100%; border-radius: 12px; border: var(--border); display: block; margin: 0 auto; object-fit: contain; background: #fff; }
.contact-value {
  display: block; margin-top: 3px;
  font-size: 12px; color: var(--accent); text-decoration: none;
  font-family: "SF Mono","Fira Code","Consolas",monospace;
  word-break: break-all;
}
.contact-value:hover { text-decoration: underline; }
.contact-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.contact-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; gap: 24px; max-width: 100%; }
  .contact-card { padding: 16px 12px 14px; }
  .contact-card img { width: 120px; height: 120px; }
  .contact-label { font-size: 12px; }
  .contact-sub { font-size: 10px; }
}

/* ===== CONTENT CREATION (公众号) ===== */
.content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}
.content-account {
  text-align: center;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--border);
  padding: 28px 20px 24px;
}
.content-account img {
  width: 160px; height: 160px; border-radius: 12px;
  border: var(--border); margin: 0 auto 14px;
  display: block; object-fit: contain; background: #fff;
}
.content-acct-name {
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 4px;
}
.content-acct-tag {
  display: inline-block;
  padding: 2px 12px; border-radius: var(--pill-radius);
  font-size: 11px; font-weight: 500;
  background: #f2f9ff; color: #097fe8;
  border: 1px solid rgba(0,117,222,0.12);
  margin-bottom: 10px;
}
.content-acct-stats {
  font-size: 12px; color: var(--text-muted); margin-bottom: 12px;
}
.content-acct-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.7;
  text-align: left;
}
.content-articles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.article-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .15s ease;
}
.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.article-card img {
  width: 100%; height: 160px; object-fit: cover;
  display: block; border-bottom: var(--border);
}
.article-title {
  padding: 12px 14px;
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .content-layout { grid-template-columns: 1fr; gap: 20px; }
  .content-account { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; text-align: left; padding: 16px; }
  .content-account img { width: 80px; height: 80px; margin: 0; }
  .content-acct-desc { flex-basis: 100%; }
  .content-articles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .content-articles { grid-template-columns: 1fr; }
  .article-card img { height: 180px; }
}

/* ===== DARK MODE TOGGLE ===== */
.dark-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: var(--border); background: var(--bg);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all .2s;
  flex-shrink: 0;
}
.dark-toggle:hover { background: var(--bg-alt); transform: scale(1.1); }

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none; width: 36px; height: 36px;
  border: none; background: none; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all .25s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== SCROLL REVEAL ===== */
.cat-card, .featured-card {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease, box-shadow .2s ease;
}
.cat-card.visible, .featured-card.visible {
  opacity: 1; transform: translateY(0);
}

/* ===== DARK MODE ===== */
html.dark {
  --bg: #1a1a1a;
  --bg-alt: #232323;
  --text-primary: rgba(255,255,255,0.92);
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --accent: #4da6ff;
  --accent-active: #80bfff;
  --border: 1px solid rgba(255,255,255,0.1);
  --card-bg: #252525;
  --pill-bg: rgba(77,166,255,0.1);
  --pill-text: #4da6ff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.3);
}
html.dark .nav { background: rgba(26,26,26,0.88); }
html.dark .tag-web { background: rgba(77,166,255,0.12); color: #4da6ff; }
html.dark .tag-mini { background: rgba(63,185,80,0.12); color: #3fb950; }
html.dark .tag-game { background: rgba(210,153,34,0.12); color: #d29922; }
html.dark .tag-sys { background: rgba(163,113,247,0.12); color: #a371f7; }
html.dark .tag-skill { background: rgba(248,81,73,0.12); color: #f85149; }
html.dark .tag-tool { background: rgba(63,185,80,0.12); color: #3fb950; }
html.dark .tag-ai { background: rgba(121,192,255,0.12); color: #79c0ff; }
html.dark .about-stats span { background: rgba(230,81,0,0.12); color: #f0883e; }
html.dark .footer-icp { border-top-color: rgba(255,255,255,0.06); }
html.dark .footer-stack span { background: #2a2a2a; color: #888; border-color: rgba(255,255,255,0.08); }
html.dark .hero-section {
  background:
    linear-gradient(135deg, #1a1a1a 0%, #1e1e1e 25%, #232323 60%, #2a2a2a 100%),
    radial-gradient(ellipse 700px 500px at 20% 15%, rgba(77,166,255,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 600px 450px at 85% 70%, rgba(162,155,254,0.08) 0%, transparent 70%);
}
html.dark .featured-card .fc-award { background: rgba(230,81,0,0.15); color: #f0883e; }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .hero-section { padding: 64px 28px 52px; }
  .hero-content { gap: 24px; }
  .hero-em { font-size: 28px; }
  .section { padding: 48px 28px; }
  .section-headline { font-size: 26px; }
  .featured-section { padding: 48px 28px; }
  .featured-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { flex-direction: column; gap: 12px; padding: 16px; }
  .cat-card .cc-media-col { width: 100%; }
  .cat-card .cc-media-col img,
  .cat-card .cc-media-col video { max-height: 180px; }
  .cat-card .cc-media-col .cc-mini-gallery img { flex-basis: 180px; }
  /* ── 游戏类：移动端左图右文，避免 X5 横滑溢出 ── */
  #games .cat-card { flex-direction: row; gap: 12px; padding: 12px; align-items: flex-start; }
  #games .cat-card .cc-media-col { width: 140px; flex-shrink: 0; }
  #games .cat-card .cc-media-col img,
  #games .cat-card .cc-media-col video { max-height: 105px; }
  #games .cat-card .cc-media-col .cc-mini-gallery img { flex: 0 0 140px; }
  .cat-card .cc-media-gallery img { max-width: 180px; max-height: 130px; }
  .about-strip { padding: 24px 28px; }
}
@media (max-width: 640px) {
  .hero-section { padding: 48px 20px 40px; }
  .hero-em { font-size: 22px; white-space: normal; }
  .hero-break { display: inline; }
  .hero-dt { display: none; }
  .hero-mb { display: inline; }
  .hero-sub { font-size: 13px; }
  .hero-badge { font-size: 11px; padding: 4px 12px; }
  .section { padding: 40px 20px; }
  .section-headline { font-size: 22px; }
  .featured-section { padding: 40px 20px; }
  .featured-card { padding: 20px 18px 18px; }
  .featured-card .fc-media img { max-width: 180px; max-height: 130px; }
  .about-strip { padding: 20px; }
  /* mobile nav */
  .hamburger { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 52px; left: 0; right: 0;
    background: var(--bg); border-bottom: var(--border);
    flex-direction: column; padding: 16px 24px; gap: 12px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
  .nav-logo { font-size: 14px; }
}

/* ===== PRINT ===== */
@media print {
  @page { size: A4; margin: 20mm 18mm 22mm 18mm; }
  *, *::before, *::after {
    background: #fff !important; color: #000 !important;
    box-shadow: none !important; text-shadow: none !important;
  }
  html { scroll-behavior: auto; }
  body {
    background: #fff; font-size: 13px; line-height: 1.55;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .nav, .dark-toggle, .hamburger, .btn-copy, .lb-overlay, .lb-hint, .footer-stack { display: none !important; }
  .hero-section {
    padding: 20mm 0 12mm !important;
    border-bottom: 1px solid #ccc !important;
  }
  .hero-em   { font-size: 28px !important; }
  .hero-sub  { font-size: 13px !important; }
  .hero-badge { background: #eee !important; color: #333 !important; border: 1px solid #ccc !important; }
  .hero-section::before { display: none !important; }
  .section { padding: 8mm 0 !important; page-break-inside: avoid; }
  .section-warm { background: #fff !important; }
  .section-headline { font-size: 22px !important; }
  .section-label { color: #666 !important; }
  .featured-section { padding: 6mm 0 !important; }
  .featured-grid { grid-template-columns: 1fr 1fr !important; gap: 4mm !important; }
  .featured-card {
    break-inside: avoid; border: 1px solid #ccc !important;
    box-shadow: none !important; padding: 4mm !important;
  }
  .featured-card::before { display: none !important; }
  .featured-card .fc-media img { max-width: 80px !important; max-height: 60px !important; }
  .cat-grid { gap: 3mm !important; grid-template-columns: 1fr 1fr !important; }
  .cat-card {
    break-inside: avoid; border: 1px solid #ccc !important;
    box-shadow: none !important; padding: 3mm !important;
  }
  .cat-card .cc-media-col { width: 80px !important; }
  .cat-card .cc-media-col img,
  .cat-card .cc-media-col video { max-height: 60px !important; }
  .tag { background: #eee !important; color: #333 !important; border: 1px solid #ccc !important; border-radius: 4px !important; font-size: 10px !important; }
  .footer { padding: 6mm 0 !important; border-top: 1px solid #ccc !important; }
  .footer-inner { font-size: 11px !important; }
  h1, h2, h3, h4, .section-header { page-break-after: avoid; }
}

/* ===== 微信内核修补 — 游戏区媒体元素高度硬限制 ===== */
#games .cat-card .cc-media-col video,
#games .cat-card .cc-media-col img,
#games .cat-card .cc-media-col .cc-mini-gallery img {
  max-height: 140px !important;
  height: auto;
}

/* ===== 职业作战地图卡片 — 多图固定宽度，保证横向滚动（当前只露 1-2 张） ===== */
.jiuye-map,
.jiuye-map .cc-media-gallery {
  min-width: 0;
}
.jiuye-map .cc-media-gallery .fc-gallery img {
  flex: 0 0 200px;
  width: 200px;
  max-width: none;
  max-height: 260px;
  height: auto;
}

/* ===== 社团学习助手（AI工具区，2026.09 从精选区移入） — 完全沿用重点作品区同一套图片尺寸 ===== */
/* 只补 min-width:0，防止 4 图把 .cat-grid 的 1fr 轨道撑变形；图片尺寸交回全站原有规则（桌面240x170 / 手机180x130） */
.shetuan-ai,
.shetuan-ai .cc-media-gallery {
  min-width: 0;
}

/* ===== 汉字赛车横版画廊（2026.09 视频换图，3图并排连在一起） ===== */
.hc-card .hc-gallery {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; min-width: 0;
  -webkit-overflow-scrolling: touch;
}
.hc-card .hc-gallery img {
  flex: 0 0 auto; width: auto; max-width: none;
  height: auto; max-height: 170px;
  border-radius: 8px; border: var(--border);
  cursor: zoom-in;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hc-card .hc-gallery img:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.hc-card .hc-gallery::-webkit-scrollbar { height: 4px; }
.hc-card .hc-gallery::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

/* 汉字赛车：fc-count 强制换行到画廊下方（图少时避免被挤到右侧） */
.hc-feat .fc-count { flex-basis: 100%; }

/* 智能处方审核（精选区）：fc-count 强制换行到画廊下方，与同区其他作品一致 */
.cf-feat .fc-count { flex-basis: 100%; }
