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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: radial-gradient(circle at top, #e5f0ff 0, #f3f4f6 45%, #f9fafb 100%);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 12px 16px;
}

/* ===== Header ===== */

.site-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 10px 12px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
  margin-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* LOGO：渐变蓝 + 三层台阶 */

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: radial-gradient(circle at 0% 0%, #60a5fa, #1d4ed8 50%, #0b1120 100%);
  position: relative;
  box-shadow: 0 0 0 1px rgba(191, 219, 254, 0.4), 0 10px 25px rgba(15, 23, 42, 0.8);
  overflow: hidden;
}

.logo-stair-step {
  position: absolute;
  background: rgba(248, 250, 252, 0.95);
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.4);
}

.logo-stair-step.step-1 {
  bottom: 6px;
  left: 6px;
  width: 28px;
  height: 8px;
}

.logo-stair-step.step-2 {
  bottom: 16px;
  left: 12px;
  width: 22px;
  height: 8px;
}

.logo-stair-step.step-3 {
  bottom: 26px;
  left: 18px;
  width: 16px;
  height: 8px;
}

.brand-text {
  flex: 1;
}

.site-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.site-subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: #9ca3af;
}

.site-tagline {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.nav-link {
  font-size: 0.8rem;
  color: #e5e7eb;
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.6);
}

.nav-link:hover {
  background: rgba(55, 65, 81, 0.85);
}

.nav-link.active {
  border-color: rgba(191, 219, 254, 0.8);
  background: rgba(15, 23, 42, 0.95);
}

/* ===== Main ===== */

.main {
  margin-top: 10px;
}

/* ===== Filters ===== */

.filters {
  background: #ffffff;
  border-radius: 18px;
  padding: 10px 10px 8px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  margin-bottom: 10px;
}

.style-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.filter-label {
  font-size: 0.8rem;
  color: #6b7280;
  padding-top: 6px;
  min-width: 70px;
}

/* 风格 tab */

.style-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
}

.style-tab {
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 0.78rem;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}

.style-tab:hover {
  background: #e5e7eb;
}

.style-tab.active {
  background: #111827;
  color: #f9fafb;
}

/* 材质：label 一行，按钮一行 */

.material-filter-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin-top: 6px;
}

.material-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.material-pill {
  border: 1px solid #e5e7eb;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f9fafb;
  font-size: 0.76rem;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
}

.material-pill:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.material-pill.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #f9fafb;
}

/* 搜索 & 只看已收藏 */

.other-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.keyword-group {
  flex: 1 1 200px;
}

.fav-only-group {
  flex: 0 0 auto;
}

.filter-group label {
  font-size: 0.76rem;
  color: #6b7280;
}

#keywordInput {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  font-size: 0.8rem;
  outline: none;
}

#keywordInput:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.fav-toggle-btn {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
  font-size: 0.8rem;
  background: #f9fafb;
  cursor: pointer;
}

.fav-toggle-btn.active,
.fav-toggle-btn:hover {
  background: #fef3c7;
  border-color: #fbbf24;
}

/* ===== 统计 & 翻页 ===== */

.stats-bar {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #4b5563;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.stats-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pager-btn {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 3px 10px;
  font-size: 0.78rem;
  background: #f9fafb;
  cursor: pointer;
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.page-info {
  min-width: 80px;
  text-align: center;
}

/* ===== Gallery ===== */

.gallery-section {
  margin-bottom: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

/* 平板两列 */
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 桌面三列 */
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: rgba(15,23,42,0.96);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148,163,184,0.45);
}

.card-img-wrapper {
  position: relative;
  padding-top: 100%; /* 1:1 */
  overflow: hidden;
  background: #111827;
}

.card-img-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 收藏按钮：心形 */

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  border: none;
  padding: 3px 7px;
  font-size: 0.9rem;
  cursor: pointer;
  background: rgba(17, 24, 39, 0.78);
  color: #f9fafb; /* 默认白色心形 */
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.7);
}

.fav-btn.fav-active {
  background: rgba(17, 24, 39, 0.9);
  color: #ef4444; /* 红色爱心 */
}

/* 点赞按钮 */

.like-btn {
  position: absolute;
  left: 8px;
  bottom: 8px;
  border-radius: 999px;
  border: none;
  padding: 2px 8px 3px;
  font-size: 0.78rem;
  cursor: pointer;
  background: rgba(17, 24, 39, 0.75);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.7);
}

.like-btn .like-icon {
  line-height: 1;
}

.like-btn .like-count {
  min-width: 14px;
}

.like-btn.liked {
  background: rgba(248, 250, 252, 0.95);
  color: #b91c1c;
}

.card-body {
  padding: 8px 10px 9px;
  color: #e5e7eb;
}

/* 图集卡片文字颜色统一为浅色，增强对比度 */
.card-body p,
.card-meta {
  color: #9ca3af;
}

.card-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

/* 卡片下方操作区：查看提示词 */

.card-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.card-btn {
  font-size: 0.76rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  cursor: pointer;
}

.card-btn:hover {
  background: rgba(37,99,235,0.15);
  border-color: rgba(96,165,250,0.9);
}

/* 通用按钮样式 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,0.55);
  background: radial-gradient(circle at top left, #38bdf8, #1d4ed8);
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  border-color: rgba(129,140,248,0.9);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.45);
  background: transparent;
  color: #e5e7eb;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(15,23,42,0.75);
}

/* Empty */


.empty-state {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  padding: 20px 8px;
}

/* ===== Footer ===== */

.site-footer {
  font-size: 0.76rem;
  color: #6b7280;
  text-align: center;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.6);
}

.footer-links {
  margin-bottom: 4px;
}

.footer-links a {
  color: #4b5563;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links .dot {
  margin: 0 6px;
}

.footer-ops-row {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-logo {
  height: 18px;
  width: auto;
  display: block;
}

.footer-ops {
  margin: 0;
  font-size: 0.72rem;
  color: #9ca3af;
}

.footer-ops a {
  color: #6b7280;
  text-decoration: none;
}

.footer-ops a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin: 2px 0 0;
}

/* ===== Modal（大图遮罩） ===== */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  max-width: 96%;
  max-height: 90%;
  border-radius: 18px;
  background: #020617;
  padding: 32px 40px 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 10;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}


.modal-canvas-wrap {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightboxCanvas {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #e5e7eb;
}

.modal-caption {
  flex: 1 1 auto;
}

.modal-counter {
  flex: 0 0 auto;
  opacity: 0.85;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border-radius: 999px;
  border: none;
  width: 26px;
  height: 26px;
  font-size: 1rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

.modal-nav.prev {
  left: 8px;
}

.modal-nav.next {
  right: 8px;
}

/* 小屏 modal 简化 */

@media (max-width: 640px) {
  .site-header {
    padding: 10px 10px 10px;
  }

  .modal-dialog {
    padding: 26px 14px 12px;
  }

  .modal-nav {
    display: none;
  }
}

/* 小屏：风格/材质上下堆叠 */

@media (max-width: 640px) {
  .style-filter-row {
    flex-direction: column;
  }

  .filter-label {
    padding-top: 0;
  }
}

/* ===== AI 生图提示词 iframe 区域（ai.html 用） ===== */

.prompt-section {
  margin-top: 10px;
  padding: 10px 10px 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.prompt-title {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
}

.prompt-desc {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #6b7280;
}

.prompt-iframe-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

/* 高度可按需要调整 */
.prompt-iframe {
  width: 100%;
  height: 1100px;
  border: none;
}

/* ===== About 页面 ===== */

.about-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.about-hero-left,
.about-hero-right {
  flex: 1 1 260px;
}

/* 手机先上下排布 */
@media (max-width: 768px) {
  .about-hero {
    flex-direction: column;
  }
}

.about-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  background: #eef2ff;
  color: #4338ca;
  margin-bottom: 6px;
}

.about-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
}

.about-lead {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: #4b5563;
  line-height: 1.6;
}

.about-highlight-list {
  margin: 0 0 10px;
}

.about-highlight-item {
  font-size: 0.8rem;
  color: #4b5563;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.about-highlight-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #60a5fa;
  margin-top: 5px;
}

.about-hero-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.about-chip {
  font-size: 0.76rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
}

.about-chip.subtle {
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* KPI 卡片 */

.about-kpi-card {
  border-radius: 16px;
  background: radial-gradient(circle at top, #1d4ed8 0, #020617 65%);
  padding: 12px 14px 10px;
  color: #e5e7eb;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.7);
}

.about-kpi-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.about-kpi {
  flex: 1;
}

.kpi-label {
  font-size: 0.74rem;
  opacity: 0.75;
}

.kpi-value {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2px;
}

.about-kpi-note {
  margin-top: 4px;
  font-size: 0.74rem;
  opacity: 0.85;
}

/* 通用 section */

.about-section {
  margin-bottom: 14px;
  padding: 10px 10px 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.about-section-title {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
}

/* 三列布局（小屏自动变一列） */

.about-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .about-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.about-col h4 {
  margin: 0 0 4px;
  font-size: 0.86rem;
  color: #111827;
}

.about-col p {
  margin: 0;
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.6;
}

/* Tech 区 */

.about-tech-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 768px) {
  .about-tech-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.about-tech-card {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.about-tech-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #eff6ff;
  color: #1d4ed8;
  margin-bottom: 4px;
}

.about-tech-card h4 {
  margin: 0 0 4px;
  font-size: 0.86rem;
  color: #111827;
}

.about-tech-card p {
  margin: 0;
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.6;
}

/* 声明区 */

.about-note ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.6;
}



/* ========== 首页样式 ========== */
.home-hero {
  margin-top: 12px;
  padding: 20px 18px;
  border-radius: 22px;
  background: radial-gradient(circle at top left, rgba(59,130,246,0.35), transparent 60%),
              radial-gradient(circle at bottom right, rgba(244,114,182,0.35), transparent 55%),
              rgba(15,23,42,0.9);
  box-shadow: 0 20px 45px rgba(15,23,42,0.75);
  color: #f9fafb;
}

.home-hero-copy h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.home-hero-copy p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #e5e7eb;
}

.home-hero-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(37,99,235,0.55);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(148,163,184,0.6);
  color: #e5e7eb;
}

.home-section {
  margin-top: 24px;
}

.home-section-title {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #60a5fa;
}

.home-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-card {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.3);
  box-shadow: 0 12px 30px rgba(15,23,42,0.7);
}

.home-card-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  color: #e5e7eb;
  background: rgba(59,130,246,0.25);
  margin-bottom: 6px;
}

.home-card h4 {
  font-size: 0.95rem;
  margin: 2px 0 6px;
  color: #f9fafb;
}

.home-card p {
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.6;
}

.home-tag-list {
  margin: 8px 0 6px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.home-tag-list li {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(31,41,55,0.9);
  color: #e5e7eb;
}

.home-card-link {
  display: inline-flex;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #60a5fa;
  text-decoration: none;
}

/* Pad 上可以两列展示 */
@media (min-width: 768px) {
  .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========== AI 生图标签页样式 ========== */

.hero-section-ai {
  margin-top: 12px;
  padding: 18px 16px;
  border-radius: 22px;
  background: radial-gradient(circle at top, rgba(129,140,248,0.35), transparent 60%),
              radial-gradient(circle at bottom right, rgba(56,189,248,0.3), transparent 55%),
              rgba(15,23,42,0.96);
  box-shadow: 0 22px 50px rgba(15,23,42,0.9);
  color: #f9fafb;
}

.hero-section-ai .hero-copy h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.hero-section-ai .hero-copy p {
  font-size: 0.86rem;
  line-height: 1.7;
  color: #e5e7eb;
}

.prompt-tabs {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-tab {
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  box-shadow: 0 0 0 1px rgba(148,163,184,0.45);
  cursor: pointer;
}

.prompt-tab.active {
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  box-shadow: 0 10px 26px rgba(37,99,235,0.7);
}

.prompt-iframe-wrap {
  margin-top: 12px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.5);
}

.prompt-iframe {
  width: 100%;
  min-height: 480px;
  border: none;
  background: #020617;
}

/* 首页浏览量文案 */
.home-hero-views {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #cbd5f5;
  opacity: 0.9;
}

/* 首页卡片缩略图预览 */
.home-card-thumbs {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 5fr 3fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 4px;
  height: 320px;
  position: relative;
  overflow: hidden;
}

/* 桌面端略微加高，避免裁切过多 */
@media (min-width: 1024px) {
  .home-card-thumbs {
    height: 400px;
  }
}

/* 左侧大图占三行，右侧 3 张小图 */
.home-card-thumb:nth-child(1) {
  grid-column: 1 / 2;
  grid-row: 1 / 4;
  min-height: 100px;
}

.home-card-thumb:nth-child(2),
.home-card-thumb:nth-child(3),
.home-card-thumb:nth-child(4) {
  grid-column: 2 / 3;
}

.home-card-thumb:nth-child(2) { grid-row: 1 / 2; }
.home-card-thumb:nth-child(3) { grid-row: 2 / 3; }
.home-card-thumb:nth-child(4) { grid-row: 3 / 4; }

/* 限制每个首页卡片最多显示 4 张缩略图（1 大 + 3 小） */
.home-card-thumbs .home-card-thumb:nth-of-type(n+5) {
  display: none;
}

.home-card-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #020617;
  min-height: 40px;
}

.home-card-thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.home-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.75);
  transition: filter 0.25s ease-out, transform 0.6s ease-out;
}

/* 悬停时取消蒙版效果 */
.home-card:hover .home-card-thumb img {
  filter: brightness(1);
}

/* NEW 角标 */
.thumb-badge-new {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  background: #f97316;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.6);
}

.about-stats-line {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #111827;
}


/* 关于我们 · 横版使用建议 + 站点数据 */
.about-section-row .about-row-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

@media (min-width: 880px) {
  .about-section-row .about-row-2col {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
    align-items: flex-start;
  }
}

.about-subsection {
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 14px 16px;
}

.about-site-stats .about-stats-line {
  margin: 4px 0;
  font-size: 0.88rem;
  color: #4b5563;
}

/* 关于我们 · 访客留言 */
.about-section-wide .about-guestbook {
  max-width: 960px;
  margin: 16px auto 0;
}

.about-guestbook {
  margin-top: 8px;
  padding: 16px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.guestbook-form .form-row {
  margin-bottom: 12px;
}

.guestbook-form label {
  display: block;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.2);
}

.guestbook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  align-items: center;
}

.guestbook-tip {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.guestbook-list {
  margin-top: 16px;
  border-top: 1px dashed #e5e7eb;
  padding-top: 12px;
}

.guestbook-empty {
  font-size: 13px;
  color: #9ca3af;
}

.guestbook-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

.guestbook-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
  color: #374151;
}

.guestbook-item-meta {
  font-size: 12px;
  color: #9ca3af;
}

.guestbook-item-message {
  font-size: 14px;
  color: #111827;
  white-space: pre-wrap;
  margin-top: 4px;
}


/* 图集页：返回顶部（浮动 Tab，滚动停止时出现） */
.back-to-top-wrapper {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  margin: 0;
  text-align: center;
  pointer-events: none;
}

.back-to-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(8px);
}

.back-to-top-wrapper.show .back-to-top-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top-btn:active {
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .back-to-top-wrapper {
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .back-to-top-btn {
    padding: 10px 14px;
    font-size: 0.88rem;
  }
}

/* 首页卡片大图悬停平移动画，仅作用于第一张大图 */
.home-card:hover .home-card-thumbs .home-card-thumb:first-child img {
  transform: translateX(-10px);
}


/* ========= 图集视图切换：网格 / 瀑布流 ========== */

/* 图集页面：基础卡片无阴影 + hover 轻微动效 */
.page-gallery .card {
  box-shadow: none;
  transition: transform 0.2s ease-out,
              border-color 0.2s ease-out,
              background 0.2s ease-out;
}

.page-gallery .card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(96, 165, 250, 0.85);
  background: radial-gradient(circle at top, rgba(59,130,246,0.10), transparent 55%),
              rgba(15,23,42,0.98);
}

/* 视图切换按钮 */
.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.view-toggle-label {
  font-size: 12px;
  color: #9ca3af;
}

.view-toggle-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease-out,
              border-color 0.15s ease-out,
              color 0.15s ease-out,
              transform 0.15s ease-out;
}

.view-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(96,165,250,0.9);
}

.view-toggle-btn.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.95), rgba(37,99,235,0.95));
  border-color: rgba(191,219,254,0.9);
  color: #f9fafb;
}

/* 默认网格模式：使用原有 grid 样式，无需额外规则 */

/* 瀑布流 Masonry 模式 */
.page-gallery .gallery-grid.masonry {
  display: block;
  column-gap: 12px;
}

.page-gallery .gallery-grid.masonry .card {
  display: inline-block;
  width: 100%;
  margin-bottom: 12px;
}

/* 响应式列数 */
@media (min-width: 640px) {
  .page-gallery .gallery-grid.masonry {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .page-gallery .gallery-grid.masonry {
    column-count: 3;
  }
}


/* 楼梯占地长度估算工具样式 */
.runlen-tool-row,
.stepest-tool-row {
  margin-bottom: 8px;
}

.runlen-tool-label,
.stepest-tool-label {
  display: block;
  margin-bottom: 3px;
  color: #e5e7eb;
}

.stepest-range-row {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 6px;
}

@media (min-width: 640px) {
  .stepest-range-row {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

/* 共享 baluster-tool 输入风格，保证工具视觉统一 */
.runlen-tool input,
.stepest-tool input {
  width: 100%;
}


/* 斜面长度小工具布局 */
.hyp-tool-row {
  margin-bottom: 8px;
}
.hyp-tool-label {
  display: block;
  margin-bottom: 3px;
  color: #e5e7eb;
}
.hyp-tool input {
  width: 100%;
}


}


/* Tools 页面：统一各个计算按钮的视觉与尺寸 */
.page-tools .tool-card .btn-primary {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  padding: 8px 0;
  font-size: 0.9rem;
  border-radius: 999px;
}


/* Tools 页面：07-09 小工具按钮使用线框样式（去掉蓝色实底） */
#tool-run-length .btn-primary,
#tool-step-estimate .btn-primary,
#tool-hypotenuse .btn-primary {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148,163,184,0.8);
}

#tool-run-length .btn-primary:hover,
#tool-step-estimate .btn-primary:hover,
#tool-hypotenuse .btn-primary:hover {
  background: rgba(37,99,235,0.12);
  border-color: rgba(96,165,250,0.95);
}


/* ====== Gallery slug highlight + copy link ====== */
.card-actions{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-copy-link{
  font-size: 0.78rem;
  padding: 6px 12px;
}

.card.hash-highlight{
  border-color: rgba(226,232,240,0.95);
  box-shadow: 0 0 0 4px rgba(148,163,184,0.18), 0 16px 40px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}


/* ====== Gallery UX upgrades (slug + copy + lightbox) ====== */
.card{ scroll-margin-top: 92px; }

.card.hash-highlight{
  animation: hashPulse 1.6s ease-out 1;
}
@keyframes hashPulse{
  0%{ box-shadow: 0 0 0 0 rgba(148,163,184,0.0), 0 10px 30px rgba(0,0,0,0.15); }
  35%{ box-shadow: 0 0 0 6px rgba(148,163,184,0.22), 0 16px 40px rgba(0,0,0,0.35); }
  100%{ box-shadow: 0 0 0 0 rgba(148,163,184,0.0), 0 10px 30px rgba(0,0,0,0.15); }
}

.card-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn-copy-link.is-ok{ border-color: rgba(34,197,94,0.55); }
.btn-copy-link.is-fail{ border-color: rgba(239,68,68,0.55); }

.modal-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(148,163,184,0.18);
}

.toast{
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 24px));
  background: rgba(15,23,42,0.92);
  color: rgba(241,245,249,0.96);
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.25;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}


/* ===== Lightbox 信息层（标题/标签） ===== */
.modal-meta{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
}
.modal-meta-left{min-width:0;}
.modal-title{
  font-weight:700;
  font-size:14px;
  line-height:1.35;
  color:var(--text, #111);
  margin-bottom:4px;
  word-break:break-word;
}
.modal-sub{
  font-size:12px;
  opacity:.75;
  margin-bottom:8px;
  word-break:break-all;
}
.modal-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.modal-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.7);
  font-size:12px;
  line-height:1.2;
}
.modal-chip b{
  font-weight:700;
}
@media (max-width:768px){
  .modal-meta{padding:10px 10px;}
  .modal-title{font-size:13px;}
}

/* =========================================================
   Lightbox UX Patch
   - Full image display (contain)
   - Better contrast for style/material chips
   ========================================================= */

#lightbox,
.lightbox-overlay {
  background: rgba(0,0,0,.88);
}

/* Stage container: center and prevent overflow scrollbars */
#lightbox .lb-stage,
.lightbox-overlay .lb-stage,
#lightbox .lightbox-stage,
.lightbox-overlay .lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: calc(100vh - 190px); /* adjust if your info bar height differs */
}

/* Main image: show full image without cropping */
#lightbox img,
.lightbox-overlay img,
#lightbox .lb-img,
.lightbox-overlay .lb-img,
#lightbox .lightbox-img,
.lightbox-overlay .lightbox-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Info layer text contrast */
#lightbox .lb-info,
.lightbox-overlay .lb-info,
#lightbox .lb-meta,
.lightbox-overlay .lb-meta {
  color: rgba(255,255,255,.90);
}

#lightbox .lb-sub,
.lightbox-overlay .lb-sub {
  color: rgba(255,255,255,.65);
}

/* Style/material chips */
#lightbox .lb-chip,
.lightbox-overlay .lb-chip,
#lightbox .tag-chip,
.lightbox-overlay .tag-chip {
  color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
}

#lightbox .lb-chip b,
.lightbox-overlay .lb-chip b,
#lightbox .tag-chip b,
.lightbox-overlay .tag-chip b {
  color: rgba(255,255,255,.78);
}


/* ===== PC Lightbox 4:3 frame (fit 4:3 images cleanly) ===== */
@media (min-width: 992px){
  #lightbox .lb-stage,
  .lightbox-overlay .lb-stage,
  #lightbox .lightbox-stage,
  .lightbox-overlay .lightbox-stage{
    /* keep a 4:3 viewing window on desktop */
    aspect-ratio: 4 / 3;
    height: min(78vh, calc(100vh - 220px));
    width: auto;            /* derived from aspect-ratio + height */
    max-width: 92vw;        /* never exceed viewport width */
    margin: 0 auto;
    border-radius: 16px;
    background: rgba(0,0,0,.25);
  }

  /* ensure image respects the 4:3 frame */
  #lightbox img,
  .lightbox-overlay img,
  #lightbox .lb-img,
  .lightbox-overlay .lb-img{
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}


/* ===== PC Lightbox: 最大化显示 4:3 图片（尽可能大且完整显示） ===== */
@media (min-width: 992px){
  /* 图片舞台区域：按 4:3 计算，尽量占满视口，同时给信息层/按钮留空间 */
  #lightbox .lb-stage,
  .lightbox-overlay .lb-stage,
  #lightbox .lightbox-stage,
  .lightbox-overlay .lightbox-stage{
    /* 预留顶部/底部信息与按钮高度，避免溢出 */
    width: min(92vw, calc(86vh * 1.3333333));   /* 86vh 的 4/3 */
    height: min(86vh, calc(92vw * 0.75));       /* 92vw 的 3/4 */
    margin: 0 auto;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  /* 图片仍然完整显示（不裁切） */
  #lightbox img,
  .lightbox-overlay img,
  #lightbox .lb-img,
  .lightbox-overlay .lb-img,
  #lightbox .lightbox-img,
  .lightbox-overlay .lightbox-img{
    object-fit: contain;
  }
}




/* ===== PC 沉浸式图片查看器（方案A增量升级）：滚轮缩放/拖拽/自动隐藏UI ===== */
@media (min-width: 992px){
  /* 画廊背景 */
  #lightbox.modal{
    background: transparent;
  }
  #lightbox .modal-backdrop{
    background: rgba(0,0,0,.12);
  }

  /* 对话框吃满视口 */
  #lightbox .modal-dialog{
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* 图片舞台：最大化占满（PC） */
  #lightbox .modal-canvas-wrap{
    flex: 1 1 auto;
    width: 100%;
    /* 留出少量边距，尽可能贴近参考图的大图展示 */
    padding: 12px 72px 12px 220px; /* 右侧给箭头，左侧给信息卡 */
    box-sizing: border-box;
    overflow: hidden; /* 用我们自己的平移，而不是滚动条 */
    background: #f5f6f8;
    display:flex;
    align-items:center;
    justify-content:center;
  }
/* Canvas：完整显示 + 轻微阴影 */
  #lightboxCanvas{
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    transform-origin: center center;
    transition: transform .18s ease;
    cursor: zoom-in;
  }

  /* 缩放状态下：可拖拽 */
  #lightbox.lb-zoomed #lightboxCanvas{
    cursor: grab;
  }
  #lightbox.lb-panning #lightboxCanvas{
    cursor: grabbing;
    transition: none;
  }

  /* 控件淡入淡出 */
  #lightbox .modal-close,
  #lightbox .modal-nav,
  #lightbox .modal-meta{
    transition: opacity .18s ease, transform .18s ease;
  }

  /* UI 自动隐藏 */
  #lightbox.lb-ui-hidden .modal-close,
  #lightbox.lb-ui-hidden .modal-nav,
  #lightbox.lb-ui-hidden .modal-meta{
    opacity: 0;
    pointer-events: none;
  }
  #lightbox.lb-ui-hidden .modal-close{
    transform: translateY(-6px);
  }
}

/* 可访问性：减少动画时禁用过渡 */
@media (prefers-reduced-motion: reduce){
  #lightboxCanvas{ transition: none !important; }
  #lightbox .modal-close,
  #lightbox .modal-nav,
  #lightbox .modal-meta{ transition: none !important; }
}


/* ===== PC 沉浸式查看：按钮/文字黑色增强（左下角） ===== */
@media (min-width: 992px){
  #lightbox .modal-actions .btn-ghost,
  #lightbox .modal-actions a.btn-ghost,
  .modal-actions .btn-ghost{
    color: #111 !important;
    border-color: rgba(0,0,0,.22) !important;
    background: rgba(255,255,255,.85) !important;
  }
  #lightbox .modal-actions .btn-ghost:hover,
  #lightbox .modal-actions a.btn-ghost:hover{
    background: rgba(255,255,255,.95) !important;
  }
  #lightbox .modal-meta,
  #lightbox .modal-title,
  #lightbox .modal-sub{
    color:#111;
  }
  #lightbox .modal-chips .chip,
  #lightbox .modal-chips .modal-chip,
  #lightbox .modal-chips span{
    color:#111;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(0,0,0,.15);
  }

  /* 左侧信息与操作：居中上移（固定在左侧，不占用图片高度） */
  #lightbox .modal-meta{
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-55%);
    width: 180px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    z-index: 20;
  }
  #lightbox .modal-actions{
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(28%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    z-index: 20;
  }

  /* 右侧控件：统一为上下箭头（固定右侧垂直排列） */
  #lightbox .modal-nav{
    position: fixed;
    right: 24px;
    left: auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    z-index: 25;
  }
  #lightbox .modal-nav.prev{
    top: calc(50% - 30px);
  }
  #lightbox .modal-nav.next{
    top: calc(50% + 30px);
  }

  /* 计数器：右下角轻量显示 */
  #lightbox .modal-counter{
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 25;
  }
}


/* ===== Lightbox fallback (image load error) ===== */
.lb-fallback{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
  text-align:center;
  padding:24px;
  box-sizing:border-box;
  background:rgba(255,255,255,.88);
  color:#111;
  z-index:5;
}
.lb-fallback-title{font-size:18px;font-weight:700;}
.lb-fallback-sub{font-size:13px;opacity:.8;max-width:520px;}
.lb-fallback-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;}
.lb-fallback-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(0,0,0,.85);
  color:#fff;
  text-decoration:none;
  border:1px solid rgba(0,0,0,.2);
}
.lb-fallback-btn.outline{
  background:rgba(255,255,255,.92);
  color:#111;
  border:1px solid rgba(0,0,0,.25);
}



/* ===== PC Lightbox: 4:3 大图 + 右侧关闭/上下翻页 + 左侧信息 ===== */
@media (min-width: 992px){
  /* 整体覆盖层：画廊白底 */
  #lightbox.modal[aria-hidden="false"] .modal-backdrop,
  #lightbox.modal .modal-backdrop{
    background: rgba(245,246,248,.96);
  }
  #lightbox .modal-dialog{
    position: fixed;
    inset: 0;
    padding: 12px 84px 6px 84px; /* 更贴近底部，舞台更大 */
    box-sizing: border-box;
    display: flex;
    align-items: flex-end; /* 让 4:3 大图更贴近底部 */
    justify-content: center;
  }
  /* 4:3 舞台：尽量大，保持比例 */
  #lightbox .modal-canvas-wrap{
    width: min(1480px, calc(100vw - 260px)); /* 更大：更接近参考图；仍预留左右控件 */
    aspect-ratio: 4 / 3;
    max-height: calc(100vh - 18px);
    height: auto;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0,0,0,.16);
    background: #fff;
  }
  #lightboxCanvas{
    width: 100% !important;
    height: 100% !important;
    display: block;
  }

  /* 关闭按钮：右上角 */
  #lightbox .modal-close{
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 10002;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(0,0,0,.72);
    color: #fff;
    border: 0;
    font-size: 22px;
    line-height: 40px;
    cursor: pointer;
  }

  /* 翻页按钮：右侧上下 */
  #lightbox .modal-nav{
    position: fixed;
    right: 22px;
    z-index: 10002;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0,0,0,.10);
    border: 1px solid rgba(0,0,0,.12);
    color: rgba(0,0,0,.78);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
  }
  #lightbox .modal-nav.prev{
    top: calc(50% - 30px);
  }
  #lightbox .modal-nav.next{
    top: calc(50% + 30px);
  }
  /* 用伪元素替换为上下箭头 */
  #lightbox .modal-nav.prev,
  #lightbox .modal-nav.next{
    color: transparent; /* 隐藏原字符 */
  }
  #lightbox .modal-nav.prev::before{
    content: "˄";
    color: rgba(0,0,0,.78);
    font-size: 22px;
    line-height: 1;
  }
  #lightbox .modal-nav.next::before{
    content: "˅";
    color: rgba(0,0,0,.78);
    font-size: 22px;
    line-height: 1;
  }

  /* 左侧信息区：左侧居中（信息+按钮整体上移居中） */
  #lightbox .modal-meta{
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-64%);
    z-index: 10002;
    width: 260px;
    padding: 14px 14px 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    color: rgba(0,0,0,.88);
  }
  #lightbox .modal-title{
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: rgba(0,0,0,.90);
  }
  #lightbox .modal-sub{
    font-size: 12px;
    color: rgba(0,0,0,.55);
    margin-bottom: 8px;
  }
  #lightbox .modal-chips .chip{
    background: rgba(0,0,0,.05);
    border: 1px solid rgba(0,0,0,.08);
    color: rgba(0,0,0,.78);
  }

  /* 左下角按钮区 */
  #lightbox .modal-actions{
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(8%);
    z-index: 10002;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  #lightbox .modal-actions .btn-ghost{
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(0,0,0,.12);
    color: rgba(0,0,0,.80);
  }

  /* 计数器放到左侧信息里（隐藏右侧） */
  #lightbox .modal-meta-right{ display:none; }
}


/* ===== PC Lightbox immersive 4:3 viewer tweaks (v4) ===== */
@media (min-width: 992px){
  /* Make dialog truly full-screen, let canvas take all space */
  #lightbox .modal-dialog{
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    max-width: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
  }

  /* Canvas area fills viewport; meta/actions are floating, not taking layout height */
  #lightbox .modal-canvas-wrap{
    position: absolute;
    inset: 0;
    padding: 12px 12px 6px;
    overflow: hidden;          /* prevent scrollbars */
    display: flex;
    justify-content: center;
    align-items: flex-end;     /* push image towards bottom */
  }

  /* Canvas scales to fit the available area */
  #lightboxCanvas{
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 18px);
    width: auto;
    height: auto;
  }

  /* Left info block: vertically centered */
  #lightbox .modal-meta{
    position: fixed;
    left: 18px;
    top: 50%;
    transform: translateY(-70%);
    width: 240px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    padding: 12px 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
    color: #111827;
    z-index: 40;
    pointer-events: auto;
  }
  #lightbox .modal-title{ color:#111827; font-weight:700; }
  #lightbox .modal-sub{ color: rgba(17,24,39,.65); }

  #lightbox .modal-chips .lb-chip,
  #lightbox .modal-chips .tag-chip{
    color:#111827;
    background: rgba(17,24,39,.06);
    border: 1px solid rgba(17,24,39,.10);
  }
  #lightbox .modal-chips .lb-chip b,
  #lightbox .modal-chips .tag-chip b{ color: rgba(17,24,39,.72); }

  /* Left action buttons: move up, centered under info */
  #lightbox .modal-actions{
    position: fixed;
    left: 18px;
    top: 50%;
    transform: translateY(18%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 40;
  }

  /* Right-side nav: stack up/down on the right */
  #lightbox .modal-nav{
    left: auto;
    right: 18px;
    transform: none;
    background: rgba(15,23,42,.72);
    color: #fff;
  }
  #lightbox .modal-nav.prev{
    right: 18px;
    top: calc(50% - 26px);
  }
  #lightbox .modal-nav.next{
    right: 18px;
    top: calc(50% + 26px);
  }

  /* Close button */
  #lightbox .modal-close{
    position: fixed;
    right: 18px;
    top: 18px;
    z-index: 50;
  }
}


/* ===== PC Lightbox v5 tweaks: 图像居中无底部空白 + 左侧信息不重叠 ===== */
@media (min-width: 992px){
  /* 画布舞台：占满视口可用空间（给左右控件预留），并垂直居中 */
  #lightbox .modal-dialog{
    display: flex;
    flex-direction: column;
  }
  #lightbox .modal-canvas-wrap{
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 让大图更贴近参考图：减少留白，右侧留给上下箭头 */
    padding: 10px 76px 10px 76px;
    box-sizing: border-box;
  }
  /* canvas 本身不再额外限制为 auto height */
  #lightboxCanvas{
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 18px;
    background: transparent;
  }

  /* 左侧信息与按钮：组成一个不重叠的左侧居中列 */
  #lightbox .modal-meta{
    position: fixed;
    left: 24px;
    top: 46%;
    transform: translateY(-50%);
    width: 230px;
    pointer-events: none;
  }
  #lightbox .modal-meta-left{
    pointer-events: auto;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
    border-radius: 14px;
    padding: 12px 12px;
  }
  #lightbox .modal-chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:8px;
  }
  /* 右上角计数器保持右侧，不挤左侧 */
  #lightbox .modal-meta-right{
    position: fixed;
    right: 86px;
    bottom: 18px;
    top: auto;
    left: auto;
    transform: none;
  }

  #lightbox .modal-actions{
    position: fixed;
    left: 24px;
    top: 62%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  #lightbox .modal-actions .btn-ghost,
  #lightbox .modal-actions a.btn-ghost{
    pointer-events: auto;
    min-width: 120px;
  }
}


/* ===== PC Lightbox 4:3 大图查看器（v5.1） ===== */
@media (min-width: 992px) {
  #lightbox.modal.active { align-items: stretch; justify-content: stretch; }
  #lightbox .modal-dialog{
    width:100vw; height:100vh; max-width:none; max-height:none;
    background: transparent; padding:0; border-radius:0; box-shadow:none;
    overflow: hidden;
  }
  /* 画廊背景 */
  #lightbox .modal-backdrop{ background: rgba(243,244,246,0.95); }
  /* 4:3 舞台：居中且尽可能大，不留底部空白 */
  #lightbox .modal-canvas-wrap{
    position: relative;
    flex: 1 1 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    padding: 8px 12px;
    background: transparent;
  }
  #lightbox .modal-canvas-wrap{
    /* 让容器本身形成 4:3 框 */
  }
  #lightbox #lightboxImg{
    width: min(calc((100vh - 24px) * 4 / 3), calc(100vw - 240px));
    height: calc(100vh - 24px);
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
  }
  #lightbox #lightboxCanvas{ display:none !important; }

  /* 右侧上下翻页 */
  #lightbox .modal-nav{
    position: fixed;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    color:#fff;
    border: none;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index: 60;
  }
  #lightbox .modal-nav.prev{ top: 46%; transform: translateY(-100%); }
  #lightbox .modal-nav.next{ top: 54%; transform: translateY(0); }

  /* 关闭按钮右上 */
  #lightbox .modal-close{
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 60;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    color:#fff;
  }

  /* 左侧信息与按钮：上下分区，避免重叠 */
  #lightbox .modal-meta{
    position: fixed;
    left: 18px;
    top: 46%;
    transform: translateY(-100%);
    z-index: 60;
    width: 220px;
    margin: 0;
    padding: 14px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.90);
    color: #111827;
    box-shadow: 0 14px 40px rgba(0,0,0,.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  #lightbox .modal-meta .modal-sub{ color: rgba(17,24,39,.60); }
  #lightbox .modal-chips .chip{
    background: rgba(17,24,39,.06);
    border: 1px solid rgba(17,24,39,.10);
    color: #111827;
  }
  #lightbox .modal-actions{
    position: fixed;
    left: 18px;
    top: 54%;
    transform: translateY(0);
    z-index: 60;
    display:flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  #lightbox .modal-actions .btn-ghost{
    background: rgba(255,255,255,.92);
    color: #111827;
    border: 1px solid rgba(17,24,39,.12);
    box-shadow: 0 10px 30px rgba(0,0,0,.14);
  }
}



/* =========================================================
   PC Lightbox Viewer (4:3, centered stage, polished)
   - Stage centered, no bottom blank
   - Right-side vertical nav (up/down)
   - Left-side info + actions (no overlap)
   ========================================================= */
@media (min-width: 992px){
  #lightbox.modal{
    background: rgba(245,246,248,.92) !important;
    backdrop-filter: blur(2px);
  }

  /* Modal dialog fills viewport, stage centered */
  #lightbox .modal-dialog{
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: block;
  }
  #lightbox .modal-content{
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* Center stage */
  #lightbox .modal-canvas-wrap{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 12px 12px 12px;
    box-sizing: border-box;
  }

  /* 4:3 stage size: maximize while respecting viewport */
  #lightbox #lightboxImg{
    display: block;
    width: min(92vw, calc((100vh - 24px) * (4 / 3)));
    height: calc(min(92vw, calc((100vh - 24px) * (4 / 3))) * (3 / 4));
    max-height: calc(100vh - 24px);
    object-fit: contain;
    object-position: center;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0,0,0,.16);
    image-rendering: auto;
  }
  #lightbox #lightboxCanvas{ display:none !important; }

  /* Close button */
  #lightbox .modal-close{
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(0,0,0,.62);
    color: #fff;
    border: 0;
    box-shadow: 0 10px 26px rgba(0,0,0,.22);
    cursor: pointer;
    z-index: 6;
  }
  #lightbox .modal-close:hover{ background: rgba(0,0,0,.72); }

  /* Right nav: up/down */
  #lightbox .modal-nav{
    position: absolute;
    right: 22px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: rgba(0,0,0,.16);
    color: #111;
    backdrop-filter: blur(4px);
    cursor: pointer;
    z-index: 6;
  }
  #lightbox .modal-nav:hover{ background: rgba(0,0,0,.22); }
  #lightbox .modal-nav.prev{ top: 46%; transform: translateY(-50%); }
  #lightbox .modal-nav.next{ top: 54%; transform: translateY(-50%); }

  /* Left side panel */
  #lightbox .modal-side{
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    z-index: 6;
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: none; /* make stage clickable; inner buttons re-enable */
  }
  #lightbox .modal-info{
    pointer-events: auto;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    padding: 12px 12px;
    box-shadow: 0 18px 46px rgba(0,0,0,.10);
  }
  #lightbox .modal-title{ font-size: 16px; color:#111; }
  #lightbox .modal-sub{ font-size: 12px; color: rgba(0,0,0,.55); margin-bottom: 10px; }
  #lightbox .modal-chips{ display:flex; flex-wrap:wrap; gap:8px; }
  #lightbox .modal-chips .chip{
    background: rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.08);
    color: rgba(0,0,0,.84);
  }

  #lightbox .modal-side-actions{
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  #lightbox .modal-side-actions .btn-ghost{
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(0,0,0,.10);
    color: #111;
    border-radius: 999px;
    padding: 10px 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
  }
  #lightbox .modal-side-actions .btn-ghost:hover{
    background: rgba(255,255,255,.98);
    border-color: rgba(0,0,0,.16);
  }

  /* Counter: subtle */
  #lightbox .modal-counter.floating{
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.55);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    z-index: 6;
  }
}


/* ===== Lightbox PC Center Fix v2 (stage-centered, overlays not affecting layout) ===== */
@media (min-width: 992px){
  /* Make the dialog full-viewport so stage can truly center */
  #lightbox .modal-dialog{
    position: fixed !important;
    inset: 0 !important;
    max-width: none !important;
    max-height: none !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  /* Stage wrapper: full screen + center */
  #lightbox .modal-body{
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important; /* minimal margins like reference */
    box-sizing: border-box !important;
  }

  /* 4:3 stage */
  #lightbox .modal-canvas-wrap{
    position: relative !important;
    aspect-ratio: 4 / 3 !important;
    width: min(92vw, calc((100vh - 24px) * 4 / 3)) !important;
    height: auto !important;
    max-height: calc(100vh - 24px) !important;
    border-radius: 16px !important;
    background: #fff !important;
    /* 上下留一点白边（内边距只加上下，不加左右） */
    padding: 12px 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    box-shadow: 0 30px 80px rgba(0,0,0,.16) !important;
  }

  /* Use <img> as primary renderer on PC */
  #lightbox #lightboxImg{
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    /* 图片四边圆角（配合舞台白底可看到圆角） */
    border-radius: 14px !important;
  }
  #lightbox #lightboxCanvas{ display: none !important; }

  /* Left panel overlays (do not affect centering) */
  #lightbox .modal-side{
    position: fixed !important;
    left: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 220px !important;
    pointer-events: none !important;
    z-index: 20 !important;
  }
  #lightbox .modal-info,
  #lightbox .modal-side-actions{ pointer-events: auto !important; }

  #lightbox .modal-info{ margin-bottom: 12px !important; }
  #lightbox .modal-side-actions{ gap: 10px !important; }

  /* Right-side up/down nav rail */
  #lightbox .modal-nav-rail{
    position: fixed !important;
    right: 22px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    /* 上下翻页箭头间距拉开 */
    gap: 26px !important;
    z-index: 30 !important;
    pointer-events: auto !important;
  }
  #lightbox .modal-nav-rail .modal-nav{
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 40px !important;
    height: 40px !important;
    /* 删除灰色背景：去掉按钮底色，仅保留箭头 */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    color: rgba(0,0,0,.78) !important;
  }

  #lightbox .modal-nav-rail .modal-nav:hover{
    background: rgba(0,0,0,.06) !important;
    color: rgba(0,0,0,.92) !important;
  }

  /* Close button fixed top-right */
  #lightbox .modal-close{
    position: fixed !important;
    right: 22px !important;
    top: 22px !important;
    z-index: 40 !important;
  }

  /* Counter bottom-center */
  #lightbox .modal-counter{
    position: fixed !important;
    left: 50% !important;
    bottom: 18px !important;
    transform: translateX(-50%) !important;
    z-index: 35 !important;
  }
}



/* ===== Patch: nav arrows single + no bg, and image rounded corners ===== */
.modal-nav-rail{
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 18px; /* 拉开上下间距 */
  z-index: 10060;
}

.modal-nav{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: transparent; /* 删除灰色背景 */
  box-shadow: none;
  color: rgba(15, 23, 42, .72);
  font-size: 20px;        /* 单箭头更清晰 */
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-nav:hover{
  background: rgba(0,0,0,.06);
}
.modal-nav:active{
  background: rgba(0,0,0,.10);
}

/* 大图圆角：保证 img 与 canvas 同步圆角，并裁切 */
.modal-canvas-wrap{
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}
#lightboxImg{ border-radius: 18px; }
#lightboxCanvas{
  border-radius: 18px;
}





/* ===== Lightbox: right thumbnail rail (4 visible, scrollable) ===== */
#lightbox .modal-thumbs-rail{
  position: fixed;
  right: 76px; /* leave space for nav rail (right:22px) */
  top: 50%;
  transform: translateY(-50%);
  width: 240px;
  max-height: min(772px, calc(100vh - 160px));
  z-index: 29;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox .modal-thumbs{
  width: 240px;
  max-height: min(772px, calc(100vh - 160px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 6px;
  border-radius: 14px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 14px 40px rgba(0,0,0,.10);
  -ms-overflow-style: none; /* IE/Edge legacy */
  scrollbar-width: none;    /* Firefox */
}
#lightbox .modal-thumbs::-webkit-scrollbar{
  width: 0;
  height: 0;
}
#lightbox .lb-thumb{
  all: unset;
  cursor: pointer;
  display: block;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
#lightbox .lb-thumb:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
}
#lightbox .lb-thumb.active{
  border-color: rgba(15, 23, 42, .72);
}
#lightbox .lb-thumb img{
  width: 100%;
  height: 180px; /* 240px * 3/4 */
  object-fit: cover;
  display: block;
}
@media (max-width: 920px){
  /* 小屏：缩略图条略窄，避免挡住主体 */
  #lightbox .modal-thumbs-rail{ right: 64px; width: 240px; }
  #lightbox .modal-thumbs{ width: 240px; }
  #lightbox .lb-thumb img{ height: 180px; }
}

/* ===== Gallery-only: hide right scrollbar (keep scrolling) ===== */
html[data-page="gallery"]{
  overflow: hidden;
  height: 100%;
}
html[data-page="gallery"] body.page-gallery{
  height: 100%;
  overflow-y: auto;
  -ms-overflow-style: none; /* IE/Edge legacy */
  scrollbar-width: none;    /* Firefox */
}
html[data-page="gallery"] body.page-gallery::-webkit-scrollbar{
  width: 0;
  height: 0;
}

/* ===== Lightbox nav: force single-arrow only (no pseudo caret) ===== */
#lightbox .modal-nav.prev,
#lightbox .modal-nav.next{
  color: rgba(15, 23, 42, .72) !important;
}
#lightbox .modal-nav.prev::before,
#lightbox .modal-nav.next::before{
  content: "" !important;
}



/* ===== Lightbox: 4 张缩略图（与图集缩略图同尺寸）并放在大图与翻页箭头之间 ===== */
.modal-dialog{ position: relative; }

/* 翻页箭头始终最右 */
.modal-nav-rail{
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
}

/* 缩略图列：竖排在大图与箭头中间 */
.modal-thumbs-rail{
  position: absolute;
  right: 64px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 132px;
  padding: 10px;
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* 只显示 4 张（无需滚动） */
.modal-thumbs{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 缩略图大小：按图集页 4:3 观感 */
.modal-thumbs .lb-thumb{ border:0; padding:0; background:transparent; cursor:pointer; }
.modal-thumbs .lb-thumb img{
  width: 112px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display:block;
  border-radius: 12px;
}
.modal-thumbs .lb-thumb.active img{
  outline: 2px solid rgba(0,0,0,0.4);
  outline-offset: 2px;
}

/* 手机端隐藏缩略图列，避免遮挡 */
@media (max-width: 768px){
  .modal-thumbs-rail{ display:none; }
}


/* Lightbox 收藏按钮状态 */
.btn-ghost.is-active{font-weight:600;}
