/* ============================================================
   Atelier · 私密作品门户 — 样式表
   基于截图结构改造:浅色默认 + 顶部「点击右侧→展开分区→分类→搜索」
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --font-display: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --maxw: 1280px;

  /* 主题色(默认 light,匹配截图) */
  --bg: #f8f7f5;
  --bg-2: #efede9;
  --surface: #ffffff;
  --surface-2: rgba(0, 0, 0, 0.03);
  --text: #1a1a1a;
  --text-2: rgba(26, 26, 26, 0.58);
  --text-3: rgba(26, 26, 26, 0.32);
  --accent: #c9a96e;       /* 金色(品牌) */
  --accent-2: #d8bd8c;
  --danger: #e24c4c;       /* NEW 徽章红 */
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.12);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.18);
  color-scheme: light;
}

/* 显式暗色 */
:root[data-theme='dark'] {
  --bg: #0e0d0b;
  --bg-2: #161411;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.07);
  --text: #f2f0ec;
  --text-2: rgba(242, 240, 236, 0.58);
  --text-3: rgba(242, 240, 236, 0.32);
  --accent: #c9a96e;
  --accent-2: #d8bd8c;
  --danger: #ff6b6b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --card-bg: #1a1814;
  --card-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* 系统模式跟随 OS */
@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] {
    --bg: #0e0d0b; --bg-2: #161411;
    --surface: rgba(255, 255, 255, 0.05); --surface-2: rgba(255, 255, 255, 0.07);
    --text: #f2f0ec; --text-2: rgba(242, 240, 236, 0.58); --text-3: rgba(242, 240, 236, 0.32);
    --accent: #c9a96e; --accent-2: #d8bd8c; --danger: #ff6b6b;
    --border: rgba(255, 255, 255, 0.08); --border-strong: rgba(255, 255, 255, 0.18);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); background: var(--bg); color: var(--text);
  line-height: 1.6; font-weight: 400; overflow-x: hidden;
  transition: background 0.45s var(--ease), color 0.45s var(--ease);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
code { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.86em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

/* 平滑主题过渡 */
body, .topbar, .latest, .about, .contact, .footer, .gallery__card,
.gate, .lightbox, .drawer, .contact__card, .search__input {
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease),
              border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* ---------- 通用 ---------- */
.section-eyebrow { font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.section-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0.5rem 0 0.8rem; letter-spacing: -0.01em; }
.mark-serif { font-family: var(--font-display); font-weight: 600; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; color: var(--text-2); border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); transform: translateY(-2px); }
.icon-btn svg { display: block; }

/* 主题图标: 显示当前主题对应的一个图标 */
#theme-toggle .i-sun,
#theme-toggle .i-moon,
#theme-toggle .i-system { display: none; }
:root[data-theme='dark'] #theme-toggle .i-moon,
:root[data-theme='system'] #theme-toggle .i-system { display: block; }
:root[data-theme='light'] #theme-toggle .i-sun { display: block; }

/* ============================================================
   密码门禁层
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background-image: url('images/skyline.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow-y: auto; overflow-x: hidden;
  padding: 1rem;
}
.gate::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.7));
  z-index: 1;
}
.gate > * {
  position: relative;
  z-index: 2;
}
.gate__inner { color: #fff; }
.gate__eyebrow { color: var(--accent); }
.gate__title { color: #fff; }
.gate__sub { color: rgba(255,255,255,0.8); }
.gate__mark { background: rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.3); color: var(--accent); }
.gate__field { background: rgba(255,255,255,0.95); }
.gate__foot { color: rgba(255,255,255,0.6); }
.gate__grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04; pointer-events: none;
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%{transform:translate(0,0)} 20%{transform:translate(-4%,3%)} 40%{transform:translate(3%,-4%)}
  60%{transform:translate(-3%,4%)} 80%{transform:translate(4%,-3%)} 100%{transform:translate(0,0)}
}
.gate__inner { position: relative; z-index: 2; text-align: center; padding: 2.5rem; max-width: 440px; width: 100%; animation: gateIn 1s var(--ease) both; }
@keyframes gateIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.gate__mark { width: 64px; height: 64px; margin: 0 auto 1.8rem; display: grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: 50%; font-size: 1.7rem; color: var(--accent); background: var(--surface); }
.gate__eyebrow { font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin-bottom: 0.7rem; }
.gate__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 5vw, 2.8rem); }
.gate__sub { color: var(--text-2); margin: 0.8rem 0 2rem; font-size: 0.95rem; }
.gate__form { display: flex; flex-direction: column; gap: 0.9rem; }
.gate__field { display: flex; align-items: stretch; gap: 0.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 0.45rem 0.45rem 0.45rem 1.3rem; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.gate__field:focus-within { border-color: var(--border-strong); box-shadow: 0 0 0 4px rgba(201,169,110,0.08); }
.gate__input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 1rem; letter-spacing: 0.05em; }
.gate__input::placeholder { color: var(--text-3); letter-spacing: 0.12em; }
.gate__submit { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--accent); color: #fff;
  padding: 0 1.3rem; border-radius: 100px; font-weight: 500; transition: background 0.3s var(--ease), transform 0.3s var(--ease); }
.gate__submit:hover { background: var(--accent-2); transform: translateX(2px); }
.gate__submit svg { transition: transform 0.3s var(--ease); }
.gate__submit:hover svg { transform: translateX(3px); }
.gate__error { min-height: 1.2em; color: #e0856a; font-size: 0.85rem; }
.gate__foot { margin-top: 2.5rem; color: var(--text-3); font-size: 0.78rem; letter-spacing: 0.08em; }
.gate__field.shake { animation: shake 0.45s var(--ease); }
@keyframes shake {
  0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(7px)}
  60%{transform:translateX(-5px)} 80%{transform:translateX(3px)}
}
.gate.is-unlocked { animation: gateUp 0.9s var(--ease) forwards; pointer-events: none; }
@keyframes gateUp { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-6%); opacity: 0; visibility: hidden; } }

/* 访问码页面移动端适配 */
@media (max-width: 480px) {
  .gate { padding: 0.5rem; }
  .gate__inner { padding: 1.5rem 1.2rem; }
  .gate__mark { width: 52px; height: 52px; margin-bottom: 1.2rem; font-size: 1.4rem; }
  .gate__title { font-size: 1.7rem; }
  .gate__sub { margin: 0.6rem 0 1.5rem; font-size: 0.88rem; }
  .gate__foot { margin-top: 1.5rem; }
}

/* ============================================================
   内容门户
   ============================================================ */
.portal { opacity: 0; visibility: hidden; transition: opacity 0.8s var(--ease); }
.portal.is-open { opacity: 1; visibility: visible; }

/* ---------- 顶部导航(截图同款) ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px; padding: 0.6rem clamp(1rem, 4vw, 2.4rem);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.topbar__left { display: flex; align-items: center; gap: 1.6rem; flex: 1; min-width: 0; }
.topbar__brand { font-size: 1.2rem; color: var(--text); letter-spacing: 0.02em; flex-shrink: 0; }

.menu-trigger { display: inline-flex; align-items: center; gap: 0.55rem; flex-shrink: 0; color: var(--text); }
.menu-trigger__label { font-size: 0.92rem; font-weight: 500; }
.menu-trigger__icon { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-trigger__icon span { height: 1.5px; background: currentColor; border-radius: 2px; }
.menu-trigger__icon span:nth-child(1) { width: 100%; }
.menu-trigger__icon span:nth-child(2) { width: 75%; }
.menu-trigger__icon span:nth-child(3) { width: 55%; }
.menu-trigger__text { font-size: 0.92rem; font-weight: 500; }
.menu-trigger__arrow { color: #e24c4c; font-weight: 700; font-size: 1rem; }

.categories { display: flex; gap: 1.5rem; }
.category { font-size: 0.92rem; color: var(--text-2); position: relative; padding: 0.2rem 0; transition: color 0.25s var(--ease); }
.category::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--accent); transition: width 0.3s var(--ease); }
.category:hover { color: var(--text); }
.category.is-active { color: var(--text); font-weight: 500; }
.category.is-active::after { width: 100%; }

.topbar__right { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.search { position: relative; display: flex; align-items: center; }
.search__icon { position: absolute; left: 0.85rem; color: var(--text-3); pointer-events: none; }
.search__input {
  width: clamp(160px, 18vw, 240px); height: 38px; padding: 0 0.9rem 0 2.2rem;
  border: 1px solid var(--border); border-radius: 100px; background: var(--surface);
  color: var(--text); font-size: 0.88rem; outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.25s var(--ease);
}
.search__input::placeholder { color: var(--text-3); }
.search__input:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(201,169,110,0.08); }

.mobile-menu-btn { display: none; width: 38px; height: 38px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); }
.mobile-menu-btn span { width: 18px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.35s var(--ease); }
.mobile-menu-btn[aria-expanded='true'] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.mobile-menu-btn[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.mobile-menu-btn[aria-expanded='true'] span:nth-child(3) { transform: translateY(-3px) rotate(-45deg); }

/* 分类抽屉(移动端 + 桌面端展开) */
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 82vw); z-index: 60;
  background: var(--bg); border-right: 1px solid var(--border);
  padding: 1.5rem; transform: translateX(-105%);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
  box-shadow: 10px 0 40px rgba(0,0,0,0);
}
.drawer.open { transform: translateX(0); box-shadow: 10px 0 40px rgba(0,0,0,0.12); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.drawer__title { font-family: var(--font-display); font-size: 1.3rem; }
.drawer__close { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); border: 1px solid var(--border); }
.drawer__close:hover { color: var(--text); border-color: var(--border-strong); }
.drawer__nav { display: flex; flex-direction: column; gap: 0.6rem; }
.drawer__item { padding: 0.85rem 1rem; border-radius: var(--radius-sm); font-size: 1rem; color: var(--text-2); transition: all 0.25s var(--ease); }
.drawer__item:hover { background: var(--surface-2); color: var(--text); }
.drawer__item.is-active { background: var(--surface-2); color: var(--text); font-weight: 500; border-left: 3px solid var(--accent); }

/* ---------- 最新发布 ---------- */
.latest { max-width: var(--maxw); margin: 0 auto; padding: calc(64px + 3rem) 1.5rem 4rem; }
.latest__head { display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 2rem; }
.latest__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: 0.02em; }
.new-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 0.55rem; border-radius: 100px;
  background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; }
.latest__desc { color: var(--text-2); font-size: 0.95rem; margin-bottom: 2.2rem; max-width: 54ch; }
.latest__intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-2);
}
.latest__intro p { margin: 0; }
@media (max-width: 768px) {
  .latest__intro {
    padding: 1rem 1.1rem;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    line-height: 1.7;
    border-left-width: 3px;
  }
}
@media (max-width: 480px) {
  .latest__intro {
    padding: 0.85rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
  }
}

/* ---------- 照片网格(信息流卡片:白底+1px 边+图+信息常驻) ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.gallery__card {
  position: relative; border-radius: 10px; overflow: hidden; background: var(--card-bg);
  border: 1px solid var(--card-border);
  cursor: pointer; opacity: 0; transform: translateY(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.gallery__card.in { opacity: 1; transform: translateY(0); }
.gallery__card:hover { box-shadow: 0 6px 18px -10px rgba(0,0,0,0.18); border-color: var(--border-strong); }

/* 媒体区(纯图,无徽章) */
.gallery__media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-2); }
.gallery__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); display: block; }
.gallery__card:hover .gallery__img { transform: scale(1.04); }

/* 信息区(白底,常驻两行:标题/时间 + 统计) */
.gallery__body {
  padding: 0.85rem 1rem 1rem;
  display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--card-bg);
}
.gallery__title {
  font-size: 0.95rem; font-weight: 500; color: var(--text);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.gallery__meta-row {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
}
.gallery__time { font-size: 0.8rem; color: var(--text-3); white-space: nowrap; }
.gallery__stats { display: flex; gap: 0.85rem; flex-shrink: 0; color: var(--text-3); font-size: 0.8rem; }
.gallery__stat { display: inline-flex; align-items: center; gap: 0.25rem; }
.gallery__stat svg { width: 14px; height: 14px; opacity: 0.8; }
.gallery__stat--likes:hover svg { color: #e24c4c; opacity: 1; }
.gallery__stat--likes.is-liked svg { color: #e24c4c; opacity: 1; fill: currentColor; }

/* 多图模式:画廊卡片缩略图网格 */
.gallery__media--multi {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: var(--bg-2);
}
.gallery__media--multi .gallery__thumb {
  overflow: hidden;
  background: var(--bg-2);
}
.gallery__media--multi .gallery__thumb--0 {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}
.gallery__media--multi .gallery__thumb--1 {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.gallery__media--multi .gallery__thumb--2 {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}
.gallery__media--multi .gallery__img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gallery__badge {
  position: absolute;
  right: 8px; bottom: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.gallery__badge--video {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(226, 76, 76, 0.9);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}
.gallery__badge--video svg { width: 12px; height: 12px; }

/* 文章内视频播放器 */
.article__video {
  text-align: center;
  margin-bottom: 1.5rem;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.article__video video {
  width: 100%;
  max-height: 70vh;
  display: block;
  background: #000;
}

.empty-state { text-align: center; color: var(--text-2); padding: 3rem 1rem; font-size: 0.95rem; }

/* ---------- 分页 ---------- */
.pagination {
  display: flex; justify-content: flex-start; align-items: center; gap: 0.5rem;
  margin-top: 2.6rem; padding: 0.5rem 0;
}
.pagination[hidden] { display: none; }
.pagination__page, .pagination__btn {
  min-width: 38px; height: 38px; padding: 0 0.75rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.2rem;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text-2);
  font-size: 0.88rem; font-weight: 500; font-family: inherit;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}
.pagination__page:hover, .pagination__btn:hover:not(:disabled) {
  background: var(--surface-2); color: var(--text); border-color: var(--border-strong);
}
.pagination__page.is-active {
  background: #1a1a1a; color: #fff; border-color: #1a1a1a; cursor: default;
}
:root[data-theme='dark'] .pagination__page.is-active {
  background: var(--accent); color: #1a1a1a; border-color: var(--accent);
}
.pagination__btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pagination__gap { color: var(--text-3); padding: 0 0.2rem; user-select: none; }

/* ---------- 关于 / 联系 / 页脚 ---------- */
.about { padding: 4rem 1.5rem; background: var(--bg-2); }
.about__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.about__text p + p { margin-top: 1rem; }
.about__stats { list-style: none; display: grid; gap: 1rem; }
.about__stats li { display: flex; flex-direction: column; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat-num { font-family: var(--font-display); font-size: 2.2rem; color: var(--accent); line-height: 1; }
.stat-label { color: var(--text-2); font-size: 0.82rem; margin-top: 0.25rem; }

.contact { padding: 5rem 1.5rem; }
.contact__card { max-width: 640px; margin: 0 auto; text-align: center; padding: 2.6rem 2rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.contact__desc { color: var(--text-2); margin: 0.5rem 0 1.4rem; }
.contact__links { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.contact__link { color: var(--accent); font-weight: 500; border-bottom: 1px solid transparent; transition: border-color 0.3s var(--ease); }
.contact__link:hover { border-color: var(--accent); }
.contact__sep { color: var(--text-3); }

/* ============================================================
   双段 footer(浅灰免责 + 深蓝版权)
   ============================================================ */
.site-footer { margin-top: 3rem; }
.site-footer--inner { margin-top: 0; border-top: none; }
.site-footer--inner .footer__disclaimer {
  background: #2e323e;
  border-top: none;
}
.site-footer--inner .footer__brand { color: #fff; }
.site-footer--inner .footer__notice { color: rgba(255,255,255,0.7); }
.site-footer--inner .footer__email { color: #ccc9c9; border-color: rgba(255,255,255,0.2); }
.site-footer--inner .footer__email:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.4); }
.footer__container {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.4rem);
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
}
.footer__disclaimer {
  background: #2e323e;
  padding: 2.4rem clamp(1rem, 4vw, 2.4rem);
  border-top: 1px solid var(--border);
}
.footer__disclaimer .footer__container { align-items: center; }
.footer__disclaimer-text { flex: 1; min-width: 0; }
.footer__brand {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 500;
  color: white; margin-bottom: 0.4rem; letter-spacing: 0.01em;
}
.footer__notice { color: white; font-size: 0.86rem; max-width: 60ch; line-height: 1.6; }
.footer__email {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2);
  transition: all 0.3s var(--ease);
}
.footer__email:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); background: var(--bg-2); }

.footer__copyright {
  background: #1a2333; color: rgba(255, 255, 255, 0.62);
  padding: 1.1rem clamp(1rem, 4vw, 2.4rem);
  font-size: 0.82rem;
}
:root[data-theme='dark'] .footer__copyright { background: #0a0e16; }
.footer__copyright .footer__container { flex-wrap: wrap; gap: 0.6rem; }
.footer__heart { color: #e24c4c; font-style: normal; }

/* ============================================================
   回到顶部按钮
   ============================================================ */
.back-to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 90;
  width: 56px; height: 56px; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: #2a2a2a; color: #fff;
  border: none; border-radius: 50%;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em;
  font-family: inherit;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.35);
  opacity: 1; transform: translateY(0); pointer-events: auto;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), background 0.3s var(--ease);
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #000; transform: translateY(-3px); }
.back-to-top svg { width: 18px; height: 18px; }

/* ============================================================
   文章详情页(灯箱)
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: #fff; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.lightbox.open { display: block; animation: lbFadeIn 0.3s var(--ease); }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.topbar--inner {
  position: sticky; top: 0; z-index: 125;
  background: #fff; border-bottom: 1px solid #eee;
}

#lb-category-drawer { z-index: 135; }

.lightbox__close {
  position: absolute; top: 0.7rem; right: 1rem; z-index: 130;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: #fff; color: #333; border: 1px solid #e0e0e0; border-radius: 50%;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.25s var(--ease);
}
.lightbox__close:hover { background: #333; color: #fff; border-color: #333; }

.lb-back-to-top {
  position: absolute; right: 1.2rem; bottom: 1.2rem; z-index: 130;
  opacity: 0; transform: translateY(10px); pointer-events: none;
}
.lb-back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.article {
  position: relative;
  max-width: 1200px; margin: 0 auto; padding: 1.5rem 2rem 4rem;
  display: grid; grid-template-columns: 1fr 280px; gap: 2.5rem;
  overflow-x: hidden;
}
.article__main { background: #fff; padding: 0 1rem 0 0; }
.article__sidebar { background: #fff; padding: 1rem 1.2rem; }

.article__breadcrumb { font-size: 0.82rem; margin-bottom: 0.8rem; }
.article__breadcrumb a { color: var(--accent); transition: opacity 0.2s; }
.article__breadcrumb a:hover { opacity: 0.7; text-decoration: underline; }
.article__title {
  font-size: 2rem; font-weight: 700; color: #222; line-height: 1.4;
  margin-bottom: 1rem; font-family: var(--font-noto, 'Noto Sans SC', sans-serif);
}
.article__meta {
  display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: #888;
  padding-bottom: 1rem; border-bottom: 1px solid #eee; margin-bottom: 1.2rem;
}
.article__meta .article__sep { color: #ddd; }
.article__body {
  font-size: 0.95rem; line-height: 1.8; color: #555; margin-bottom: 1.5rem;
  text-align: justify;
}
.article__img { text-align: center; }
.article__img img {
  max-width: 100%; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* 灯箱内多图画廊 */
.article__gallery { margin-bottom: 1.5rem; }
.article__gallery[hidden] { display: none; }
.article__gallery-main { display: none; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  z-index: 2;
  transition: background 0.2s;
}
.gallery-nav:hover { background: rgba(0,0,0,0.8); }
.gallery-nav svg { width: 24px; height: 24px; }
.gallery-nav--prev { left: 12px; }
.gallery-nav--next { right: 12px; }
.gallery-counter {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.article__gallery-img {
  width: 100%;
  display: block;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}
@media (max-width: 768px) {
  .gallery-nav { width: 36px; height: 36px; }
  .gallery-nav svg { width: 20px; height: 20px; }
  .gallery-nav--prev { left: 8px; }
  .gallery-nav--next { right: 8px; }
  .gallery-thumb { width: 48px; height: 48px; }
}

.article__search {
  display: flex; align-items: center; background: #fff; border: 1px solid #e0e0e0;
  border-radius: 4px; overflow: hidden; margin-bottom: 1.5rem;
}
.article__search input {
  flex: 1; padding: 0.55rem 0.8rem; border: none; outline: none;
  font-size: 0.85rem; background: transparent; color: #333;
}
.article__search button {
  padding: 0.55rem 0.75rem; border: none; background: transparent;
  color: #888; cursor: pointer; display: grid; place-items: center;
}
.article__search button:hover { color: #333; }
.article__sidebar-title {
  font-size: 0.95rem; font-weight: 600; color: #333; margin: 0 0 0.8rem;
  padding-bottom: 0.5rem; border-bottom: 2px solid #333;
  display: inline-block;
}
.article__recent, .article__comments {
  list-style: none; padding: 0; margin: 0 0 1.8rem;
}
.article__recent li, .article__comments li {
  font-size: 0.82rem; color: #666; padding: 0.45rem 0;
  border-bottom: 1px dashed #eee; line-height: 1.5;
  cursor: pointer; transition: color 0.2s;
}
.article__recent li:hover { color: #2563eb; }
.article__comments li { color: #888; }
.article__comments li:hover { color: #333; }

/* 点赞按钮 */
.article__like { text-align: center; margin: 1.8rem 0 1rem; }
.article__like-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.6rem; border-radius: 999px;
  background: #fff; border: 1.5px solid #e85a5a; color: #e85a5a;
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all 0.25s var(--ease);
}
.article__like-btn:hover { background: #e85a5a; color: #fff; }
.article__like-btn.is-liked { background: #e85a5a; color: #fff; }
.article__like-btn svg { transition: fill 0.25s; }
.article__like-btn.is-liked svg { fill: #fff; }

/* 转载声明 */
.article__notice {
  text-align: center; font-size: 0.78rem; color: #aaa;
  padding: 0.8rem 0; margin-bottom: 1.5rem;
  border-top: 1px dashed #e8e8e8; border-bottom: 1px dashed #e8e8e8;
}

/* 上一篇/下一篇 */
.article__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.article__pager-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.7rem; background: #fafafa; border: 1px solid #eee;
  border-radius: 6px; text-decoration: none; color: inherit;
  transition: all 0.25s var(--ease);
}
.article__pager-item:hover { border-color: #ccc; background: #f5f5f5; }
.article__pager-item:hover .article__pager-title { color: #2563eb; }
.article__pager-thumb {
  flex-shrink: 0; width: 60px; height: 60px; border-radius: 4px; overflow: hidden;
  background: #eee;
}
.article__pager-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article__pager-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.article__pager-prev .article__pager-info { text-align: left; }
.article__pager-next .article__pager-info { text-align: right; align-items: flex-end; }
.article__pager-label { font-size: 0.72rem; color: #aaa; }
.article__pager-title {
  font-size: 0.85rem; font-weight: 500; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}

/* 相关文章 */
.article__related {
  grid-column: 1 / -1;
  margin-top: 1.5rem;
  padding: 1.5rem 1.5rem 0;
  background: #f5f5f5; border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.article__related-title {
  font-size: 1.15rem; font-weight: 700; color: #222;
  margin: 0 0 1.5rem; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
}
.article__related-badge {
  display: inline-block; padding: 2px 8px; font-size: 0.65rem; font-weight: 700;
  background: #ff4d4f; color: #fff; border-radius: 3px; letter-spacing: 0.05em;
}
.article__related-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem; padding-bottom: 1.5rem;
}
.article__related-card {
  cursor: pointer; border-radius: 6px; overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  background: #f5f5f5;
}
.article__related-card:hover {
  transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.article__related-media {
  position: relative; padding-top: 125%; background: #eee; overflow: hidden;
}
.article__related-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.article__related-body { padding: 0.6rem 0.7rem; background: #fff; }
.article__related-title-text {
  font-size: 0.82rem; font-weight: 500; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 0.3rem;
}
.article__related-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.7rem; color: #999;
}
.article__related-meta-stats { display: flex; gap: 0.5rem; align-items: center; }
.article__related-meta-stats span { display: inline-flex; align-items: center; gap: 2px; }
.article__related-meta svg { width: 11px; height: 11px; }

@media (max-width: 860px) {
  .article { grid-template-columns: 1fr; padding: 4rem 1rem 3rem; gap: 1.5rem; }
  .article__main { padding: 1.2rem 1.2rem; }
  .article__title { font-size: 1.6rem; }
  .article__related-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
  .article__related { padding: 1.2rem 1rem 0; }
  .lightbox__close { top: 0.5rem; right: 0.5rem; width: 32px; height: 32px; }
  .lb-back-to-top { right: 0.8rem; bottom: 0.8rem; }
}
@media (max-width: 480px) {
  .article { padding: 3.5rem 0.6rem 2.5rem; gap: 1rem; }
  .article__main { padding: 1rem 0.8rem; }
  .article__title { font-size: 1.4rem; }
  .article__pager { grid-template-columns: 1fr; gap: 0.6rem; }
  .article__pager-thumb { width: 50px; height: 50px; }
  .article__related-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .article__sidebar { padding: 0.8rem 1rem; }
  .article__body { font-size: 0.9rem; }
  .lightbox__close { top: 0.4rem; right: 0.4rem; }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .categories { display: none; }
  .menu-trigger__label { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .footer__disclaimer .footer__container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .topbar { padding: 0.6rem 1rem; }
  .search__input { width: 42px; padding: 0; background: transparent; border-color: transparent; color: transparent; cursor: pointer; }
  .search__input::placeholder { color: transparent; }
  .search__input:focus { width: 160px; padding-left: 2.2rem; padding-right: 0.9rem; background: var(--surface); border-color: var(--border); color: var(--text); cursor: text; }
  .search__icon { left: 50%; transform: translateX(-50%); }
  .search__input:focus ~ .search__icon { left: 0.85rem; transform: none; }
  .icon-btn { display: none; } /* 小屏只保留搜索+菜单 */
  .mobile-menu-btn { display: flex; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .gallery__body { padding: 0.7rem 0.8rem 0.85rem; gap: 0.6rem; }
  .gallery__title { font-size: 0.88rem; }
  .gallery__time, .gallery__stats { font-size: 0.72rem; }
  .gallery__stat svg { width: 12px; height: 12px; }
  .latest { padding-top: calc(64px + 2rem); }
  .about__grid { grid-template-columns: 1fr; gap: 2rem; }
  .pagination { gap: 0.3rem; }
  .pagination__page, .pagination__btn { min-width: 34px; height: 34px; font-size: 0.82rem; padding: 0 0.55rem; }
  .back-to-top { right: 0.9rem; bottom: 0.9rem; width: 44px; height: 44px; }
}

/* 减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .gallery__card { opacity: 1; transform: none; }
}
