/* ============================================================
   依凡视觉 · 苹果风格
   白底 + 浅灰分区 + 苹果蓝点缀
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --bg-secondary: #F5F5F7;
  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --border: #D2D2D7;
  --accent: #0071E3;
  --accent-dark: #0066CC;
  --accent-light: rgba(0, 113, 227, 0.08);
  --radius-card: 18px;
  --radius-btn: 980px;
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 16px 44px rgba(0, 0, 0, 0.12);
  --nav-height: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
img[loading="lazy"] { background: #f0f0f2; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- 毛玻璃导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}
.nav-inner {
  max-width: 1800px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 32px;
  padding: 0 20px;
}
.brand {
  font-size: 18px; font-weight: 600; letter-spacing: 0.5px;
  display: flex; align-items: baseline; gap: 8px;
}
.brand-logo { height: 30px; width: auto; display: block; }
.brand-en {
  font-size: 10px; font-weight: 500; letter-spacing: 2px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 26px; }
.nav-link {
  font-size: 14px; color: var(--text-secondary);
  padding: 6px 2px; position: relative; transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1.5px; background: var(--text); transition: right .25s;
}
.nav-link:hover::after { right: 0; }
.nav-actions { display: flex; gap: 14px; align-items: center; margin-left: auto; }
.nav-btn {
  font-size: 13px; padding: 6px 16px; border-radius: 980px;
  border: 1px solid currentColor; color: var(--text-secondary);
  transition: all .2s; white-space: nowrap;
}
.nav-btn:hover { color: var(--text); background: rgba(0, 0, 0, 0.05); }
.nav-home .nav-btn { color: rgba(255,255,255,.9); }
.nav-home .nav-btn:hover { background: rgba(255,255,255,.15); }
.nav-home.scrolled .nav-btn { color: var(--text-secondary); }
.nav-icon {
  color: var(--text-secondary); padding: 6px; border-radius: 8px;
  display: flex; align-items: center; gap: 5px; font-size: 13px;
  position: relative; transition: color .2s, background .2s;
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-icon:hover { color: var(--text); background: rgba(0, 0, 0, 0.05); }
.cart-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 600;
  min-width: 17px; height: 17px; border-radius: 980px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ---------- 通用容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; }

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 40px;
  text-align: center;
  background: var(--bg);
}
.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: clamp(16px, 2.4vw, 21px);
  color: var(--text-secondary);
  max-width: 560px; margin: 0 auto;
}
.hero-featured {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  grid-auto-rows: 260px;
}
.hero-card { position: relative; overflow: hidden; border-radius: var(--radius-card); cursor: pointer; }
.hero-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-card:hover img { transform: scale(1.05); }
.hero-card .hc-label {
  position: absolute; left: 16px; bottom: 16px;
  color: #fff; font-size: 15px; font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.25); backdrop-filter: blur(8px);
  padding: 6px 14px; border-radius: 980px;
}
.hc-1 { grid-column: span 6; }
.hc-2 { grid-column: span 3; }
.hc-3 { grid-column: span 3; }

/* ---------- 区块标题 ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 36px;
}
.section-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.01em;
}
.section-more {
  font-size: 14px; color: var(--accent); font-weight: 500;
  display: flex; align-items: center; gap: 4px; transition: gap .2s;
}
.section-more:hover { gap: 8px; }

/* ---------- 作品网格（瀑布流） ---------- */
.work-grid {
  columns: 4; column-gap: 20px;
}
.work-card {
  break-inside: avoid; margin-bottom: 20px;
  border-radius: var(--radius-card); overflow: hidden;
  background: var(--bg-secondary);
  position: relative; cursor: pointer;
  box-shadow: none; transition: box-shadow .35s, transform .35s;
}
.work-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.work-card img {
  width: 100%; height: auto;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.work-card:hover img { transform: scale(1.03); }
.work-info {
  padding: 14px 16px 16px;
  background: var(--bg);
  position: relative;
}
.work-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-tertiary);
}
.work-price { color: var(--accent); font-weight: 600; font-size: 14px; }
.work-price.free { color: var(--text-secondary); }
.work-hover-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; gap: 8px; opacity: 0; transform: translateY(-6px);
  transition: opacity .25s, transform .25s;
}
.work-card:hover .work-hover-actions { opacity: 1; transform: translateY(0); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: transform .15s, color .2s;
}
.icon-btn:hover { transform: scale(1.08); color: var(--accent); }
.icon-btn.liked { color: var(--accent); }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center; padding: 100px 0 120px; color: var(--text-tertiary);
}
.empty-state svg { margin-bottom: 20px; opacity: 0.4; }
.empty-state h3 { font-size: 20px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }

/* ---------- 栏目页 ---------- */
.category-hero {
  padding-top: calc(var(--nav-height) + 90px);
  padding-bottom: 50px;
}
.category-title { font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.category-desc { color: var(--text-secondary); font-size: 17px; max-width: 600px; }

/* ---------- 作品详情 ---------- */
.detail-wrap { padding-top: calc(var(--nav-height) + 30px); padding-bottom: 90px; }
.detail-main {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px; align-items: start;
}
.detail-image {
  border-radius: var(--radius-card); overflow: hidden;
  background: var(--bg-secondary);
  cursor: zoom-in; position: relative;
  box-shadow: var(--shadow-card);
}
.detail-image img { width: 100%; }
.detail-side { position: sticky; top: calc(var(--nav-height) + 24px); }
.detail-cat {
  font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: 1px;
  margin-bottom: 12px;
}
.detail-title { font-size: 32px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.detail-desc { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag {
  font-size: 12px; color: var(--text-secondary);
  background: var(--bg-secondary); padding: 4px 12px;
  border-radius: 980px;
}
.detail-price-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
}
.detail-price { font-size: 34px; font-weight: 700; color: var(--accent); }
.detail-price-unit { color: var(--text-tertiary); font-size: 14px; }
.detail-stats { display: flex; gap: 24px; color: var(--text-tertiary); font-size: 13px; margin-bottom: 28px; }
.detail-stats span { display: flex; align-items: center; gap: 5px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-btn); font-size: 15px; font-weight: 600;
  padding: 12px 26px; transition: all .2s; user-select: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary { background: var(--bg-secondary); color: var(--text); }
.btn-secondary:hover { background: #E8E8ED; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--accent-light); border-color: var(--accent); }
.btn-row { display: flex; gap: 12px; margin-bottom: 20px; }
.btn-row .btn { flex: 1; }

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 88vh; border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; color: #fff; background: rgba(255,255,255,0.12);
  border-radius: 50%; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; z-index: 2;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-info {
  position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,0.8); font-size: 14px;
}
.lightbox-hint { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.5); font-size: 12px; letter-spacing: 1px; }

/* ---------- 相关作品 ---------- */
.related { background: var(--bg-secondary); }

/* ---------- Footer ---------- */
.footer { background:#F5F5F7; border-top:1px solid rgba(0,0,0,.08); padding:44px 24px 24px; }
.f-inner { max-width:1800px; margin:0 auto; }
.f-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:40px 64px; padding-bottom:34px; }
.f-brand { display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
.f-logo { height:40px; }
.f-tag { margin:0; font-size:13px; line-height:1.6; color:#86868B; max-width:340px; }
.f-col { display:flex; flex-direction:column; gap:11px; }
.f-t { font-size:13px; font-weight:600; color:#1d1d1f; margin-bottom:2px; }
.f-col a { font-size:14px; color:#515154; text-decoration:none; }
.f-col a:hover { color:#0071E3; }
.f-bottom { border-top:1px solid rgba(0,0,0,.08); padding-top:16px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px 24px; font-size:12px; color:#86868B; }
.f-filing { display:inline-flex; gap:18px; }
.f-filing a { color:#86868B; text-decoration:none; }
.f-filing a:hover { color:#0071E3; }
@media (max-width:768px){ .f-grid{ grid-template-columns:1fr 1fr; gap:26px; } .f-brand{ grid-column:1/-1; } .f-bottom{ flex-direction:column; align-items:flex-start; } }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .work-grid { columns: 3; }
  .detail-main { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .hero-card .hc-1 { grid-column: span 12; }
  .hc-2, .hc-3 { grid-column: span 6; }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .work-grid { columns: 2; column-gap: 12px; }
  .work-card { margin-bottom: 12px; border-radius: 14px; }
  .work-info { padding: 10px 12px 12px; }
  .nav-links { display: none; }
  .nav-inner { padding: 0 16px; }
  .hero { padding-top: calc(var(--nav-height) + 50px); }
  .hero-featured { grid-auto-rows: 180px; margin-top: 40px; }
  .section-title { font-size: 24px; }
  .footer-inner { gap: 24px; }
  .footer-links { gap: 10px; }
  .detail-wrap { padding-bottom: 60px; }
  .detail-title { font-size: 24px; }
  .detail-price { font-size: 28px; }
  .work-hover-actions { opacity: 1; transform: none; top: 8px; right: 8px; }
  .icon-btn { width: 32px; height: 32px; }
}
@media (max-width: 480px) {
  .work-grid { columns: 2; }
  .work-title { font-size: 13px; }
  .work-meta { font-size: 11px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

/* ---------- 动效 ---------- */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%) translateY(-16px);
  background: rgba(29, 29, 31, 0.92); color: #fff;
  padding: 10px 22px; border-radius: 980px; font-size: 14px;
  z-index: 2000; opacity: 0; pointer-events: none; transition: all .3s;
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: rgba(0, 113, 227, 0.95); }
/* ============================================================
   首页满屏图墙版式（v2 追加）
   ============================================================ */

/* ---------- 首页透明导航 ---------- */
.nav-home {
  height: 64px;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), transparent);
  color: #fff;
}
/* 手机端：首屏图深浅不定，导航渐变加深，保证 logo/按钮在任何图上都清晰可见 */
@media (max-width: 768px) {
  .nav-home:not(.scrolled) {
    background: linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,.38) 55%, transparent);
  }
}
.nav-home .nav-link, .nav-home .nav-icon { color: #fff; opacity: .9; }
.nav-home .nav-link:hover, .nav-home .nav-icon:hover { opacity: 1; }
.nav-home.scrolled {
  background: rgba(255,255,255,.85);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(0,0,0,.1);
}
.nav-home.scrolled .nav-link, .nav-home.scrolled .nav-icon { color: var(--text-secondary); }
.nav-home.scrolled .nav-link:hover { color: var(--text); }

/* ---------- 导航搜索框 ---------- */
.nav-search { flex: 0 1 240px; min-width: 0; }
.nav-search form { margin: 0; }
.nav-search input {
  width: 100%; height: 34px; border-radius: 980px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14);
  padding: 0 16px; font-size: 13px; color: #fff; outline: none;
  transition: all .25s; backdrop-filter: blur(8px);
}
.nav-search input::placeholder { color: rgba(255,255,255,.65); }
.nav-search input:focus { border-color: var(--accent); background: rgba(255,255,255,.24); }
.nav-home.scrolled .nav-search input {
  border-color: var(--border); background: rgba(0,0,0,.04); color: var(--text);
}
.nav-home.scrolled .nav-search input::placeholder { color: var(--text-tertiary); }
@media (max-width: 900px) {
  .nav-search { display: none; }  /* 移动端收进作品库页搜索条 */
}

/* ---------- 手机端汉堡菜单 ---------- */
.nav-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; color: inherit;
  background: none; border: none; cursor: pointer; padding: 0;
  transition: background .2s;
}
.nav-menu-btn:hover { background: rgba(0,0,0,.08); }
.nav-home .nav-menu-btn:hover { background: rgba(255,255,255,.15); }
@media (max-width: 768px) {
  .nav-menu-btn { display: flex; margin-right: -24px; } /* 抵消 nav-inner gap，紧贴 logo */
}
.nav-mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 0.5px solid var(--border);
  padding: 4px 0; z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.nav-home .nav-mobile-menu {
  background: rgba(0,0,0,.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-color: rgba(255,255,255,.1);
}
.nav-home.scrolled .nav-mobile-menu {
  background: rgba(255,255,255,.98);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-color: var(--border);
}
.nav-mobile-link {
  display: block; padding: 12px 20px; font-size: 15px; font-weight: 500;
  color: var(--text); transition: background .2s;
}
.nav-mobile-link:hover { background: var(--bg-secondary); }
.nav-home .nav-mobile-link { color: #fff; }
.nav-home .nav-mobile-link:active { background: rgba(255,255,255,.1); }
.nav-home.scrolled .nav-mobile-link { color: var(--text); }
.nav-home.scrolled .nav-mobile-link:active { background: var(--bg-secondary); }

/* ---------- 统一网格图墙（固定尺寸，避免瀑布流在安卓渲染错位） ---------- */
.wall {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  max-width: 1800px; margin: 0 auto; padding: 0 20px;
}
@media (max-width: 1280px) { .wall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .wall { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .wall { padding: 0 10px; } }
.wall-item {
  position: relative; overflow: hidden; border-radius: 12px; background: #f0f0f2;
  aspect-ratio: 4 / 3; display: block;
}
.wall-item img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
/* ---------- 关键修复：图片不接收指针事件 ----------
   触摸起点落在 <img> 上时，Chromium 的滚动链会把手势吞在 img 上（图墙区域完全无法滑动）。
   pointer-events:none 让触摸穿透到卡片容器，页面滚动恢复正常；
   点击/灯箱/加购事件全部在父级 a 上委托处理，不受影响；顺带防止图片被拖拽/右键保存。 */
.wall-item img, .mini-item img, .cat img, .hero-card img, .work-card img,
.topic-main img, .topic-sub img, .collection-hero-cover img,
.wlb-related-grid img, .detail-image img, .cart-item img {
  pointer-events: none;
}
.wall-item:hover img { transform: scale(1.03); }
.wall-mask {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent 45%);
  opacity: 0; transition: opacity .25s;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; color: #fff;
}
.wall-item:hover .wall-mask { opacity: 1; }
.wm-title { font-size: 16px; font-weight: 600; }
.wm-loc { font-size: 12px; opacity: .8; margin-top: 2px; letter-spacing: 1px; }
.wm-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.wm-price { font-size: 15px; font-weight: 700; }
.wm-license { font-size: 11px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.6); border-radius: 980px; letter-spacing: 1px; }
/* 移动端：hover 不可用，信息常显 */
@media (max-width: 640px) {
  .wall-mask { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.62), transparent 40%); padding: 12px; }
  .wm-title { font-size: 14px; }
  .wm-price { font-size: 14px; }
  .wm-license { font-size: 10px; padding: 3px 10px; }
}

/* ---------- 小图墙（最新发布/作品库） ---------- */
.mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 1800px; margin: 0 auto; padding: 0 10px; }
@media (max-width: 1024px) { .mini { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .mini { grid-template-columns: repeat(2, 1fr); } }
.mini-item { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 4/3; background: #f0f0f2; display: block; }
.mini-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mini-item:hover img { transform: scale(1.05); }
.mini-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 10px 12px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
  font-size: 12px; display: flex; justify-content: space-between; gap: 8px;
}
.mini-cap .no { font-size: 10px; opacity: .7; letter-spacing: 1px; }

/* ---------- 分类大图卡 ---------- */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 1800px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 1024px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .cats { padding: 0 10px; } }
.cat { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 3/4; background: #f0f0f2; display: block; }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat:hover img { transform: scale(1.06); }
.cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), transparent 55%); }
.cat-label { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px; color: #fff; }
.cat-name { font-size: 16px; font-weight: 600; letter-spacing: 2px; }
.cat-count { font-size: 11px; opacity: .75; margin-top: 2px; letter-spacing: 1px; }
.cat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #B0B0B5; background: linear-gradient(135deg, #f5f5f7, #e8e8ed); }

/* ---------- 作品库页：搜索条 + 分类筛选 ---------- */
.filterbar { max-width: 1800px; margin: 0 auto; padding: 96px 10px 0; }
.filterbar-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filterbar form { flex: 1 1 260px; max-width: 420px; }
.filterbar input {
  width: 100%; height: 42px; border-radius: 980px;
  border: 1px solid var(--border); padding: 0 20px; font-size: 14px; color: var(--text);
  outline: none; transition: border .2s; background: #fff;
}
.filterbar input:focus { border-color: var(--accent); }
.filterbar .cat-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filterbar .cat-pill {
  font-size: 13px; color: var(--text-secondary); padding: 8px 16px; border-radius: 980px;
  border: 1px solid var(--border); transition: all .2s;
}
.filterbar .cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.filterbar .cat-pill.active { background: var(--text); color: #fff; border-color: var(--text); }
.works-count { max-width: 1800px; margin: 0 auto; padding: 26px 20px 18px; font-size: 13px; color: var(--text-secondary); }

/* ---------- 空状态 ---------- */
.empty-state { max-width: 1800px; margin: 40px auto; text-align: center; padding: 60px 20px; }
.empty-state h3 { font-size: 20px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--text-tertiary); }

/* ---------- 站点 Logo（双版本切换，彩色图形永不变色） ----------
   白字版 logo.png（首页顶部透明导航/深色背景用） + 黑字版 logo-dark.png（白底导航用）。
   不用 filter: invert —— 整图反色会把彩色图形也反掉。 */
.footer-logo { height: 36px; width: auto; display: block; }
.brand { position: relative; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-logo-white { display: none; }
/* 默认（白底导航：普通页/首页滚动后）显示黑字版；首页顶部透明导航显示白字版 */
.nav-home:not(.scrolled) .brand-logo-white { display: block; }
.nav-home:not(.scrolled) .brand-logo-dark { display: none; }

/* ---------- 富文本内容渲染（Quill 编辑器输出兼容） ----------
   后台页面管理用 Quill 编辑，生成的 HTML 依赖这些规则才能正确显示：
   列表圆点/序号（data-list + ql-ui）、对齐、缩进、颜色、字号。 */
.ql-content { counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; }
.ql-content ol { padding-left: 1.5em; }
.ql-content li { list-style-type: none; padding-left: 1.5em; position: relative; }
.ql-content li > .ql-ui:before {
  display: inline-block; margin-left: -1.5em; margin-right: .3em;
  text-align: right; white-space: nowrap; width: 1.2em;
}
.ql-content li[data-list=bullet] > .ql-ui:before { content: '\2022'; }
.ql-content li[data-list=checked] > .ql-ui:before { content: '\2611'; }
.ql-content li[data-list=unchecked] > .ql-ui:before { content: '\2610'; }
.ql-content li[data-list=ordered] { counter-increment: list-0; }
.ql-content li[data-list=ordered] > .ql-ui:before { content: counter(list-0, decimal) '. '; }
/* 多级缩进列表（数字/字母/罗马） */
.ql-content li[data-list=ordered].ql-indent-1 { counter-increment: list-1; }
.ql-content li[data-list=ordered].ql-indent-1 > .ql-ui:before { content: counter(list-1, lower-alpha) '. '; }
.ql-content li[data-list=ordered].ql-indent-2 { counter-increment: list-2; }
.ql-content li[data-list=ordered].ql-indent-2 > .ql-ui:before { content: counter(list-2, lower-roman) '. '; }
.ql-content .ql-indent-1:not(.ql-direction-rtl) { padding-left: 3em; }
.ql-content li.ql-indent-1:not(.ql-direction-rtl) { padding-left: 4.5em; }
.ql-content .ql-indent-2:not(.ql-direction-rtl) { padding-left: 6em; }
.ql-content li.ql-indent-2:not(.ql-direction-rtl) { padding-left: 7.5em; }
.ql-content .ql-indent-3:not(.ql-direction-rtl) { padding-left: 9em; }
.ql-content li.ql-indent-3:not(.ql-direction-rtl) { padding-left: 10.5em; }
/* 对齐 */
.ql-content .ql-align-center { text-align: center; }
.ql-content .ql-align-right { text-align: right; }
.ql-content .ql-align-justify { text-align: justify; }
/* 字号 */
.ql-content .ql-size-small { font-size: .75em; }
.ql-content .ql-size-large { font-size: 1.5em; }
.ql-content .ql-size-huge { font-size: 2.5em; }
/* 字体 */
.ql-content .ql-font-serif { font-family: Georgia, 'Times New Roman', serif; }
.ql-content .ql-font-monospace { font-family: Monaco, 'Courier New', monospace; }
/* 引用块（编辑器用 blockquote 标签，与项目样式一致） */
.ql-content blockquote { border-left: 3px solid var(--border); padding-left: 14px; color: var(--text-secondary); }
/* 列表段落间距（Quill 输出 li 里还有 p 时） */
.ql-content li p { margin: 0; }
/* 列表标记元素：absolute 定位到 li 内，before 显示圆点/序号 */
.ql-content .ql-ui { position: absolute; }

/* 自定义字号映射（Quill class size 12px~40px） */
.ql-content .ql-size-12px { font-size: 12px; }
.ql-content .ql-size-14px { font-size: 14px; }
.ql-content .ql-size-16px { font-size: 16px; }
.ql-content .ql-size-18px { font-size: 18px; }
.ql-content .ql-size-20px { font-size: 20px; }
.ql-content .ql-size-24px { font-size: 24px; }
.ql-content .ql-size-28px { font-size: 28px; }
.ql-content .ql-size-32px { font-size: 32px; }
.ql-content .ql-size-40px { font-size: 40px; }
