:root {
  --fg: #1f1f1f;
  --muted: #8c857b;
  --line: #e7e1d6;
  --bg: #ffffff;
  --card: #ffffff;
  --accent: #c0392b;        /* 截图里的主红色 */
  --accent-2: #a52e22;
  --gold: #c9a063;
  --blue: #4a7bff;
  --ink: #111111;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.app { max-width: 1180px; margin: 0 auto; padding: 0 0 60px; }

/* ---------- 标题区 / 简介区：直接采用用户成品截图裁图 ---------- */
.top-shot {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
/* 手机端强制按屏幕可视宽度铺满，消除任何细微缝隙 */
@media (max-width: 1180px) {
  .top-shot { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
}

/* ---------- 分类栏 ---------- */
.catbar {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 0 0 22px;
  padding: 10px 14px 6px;
  background: var(--bg);
}
.tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.tabs::-webkit-scrollbar { display: none; }
.swipe-hint {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  font-size: 12px;
  color: var(--accent-2);
  letter-spacing: 1px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 14px;
  width: fit-content;
  margin: 8px 0 0 auto;
}
.catbar.can-scroll .swipe-hint { display: flex; }
.swipe-hint .chev { font-style: normal; animation: swipeX 1.3s ease-in-out infinite; }
@keyframes swipeX { 0%,100% { transform: translateX(0); opacity: .55; } 50% { transform: translateX(5px); opacity: 1; } }
.tab {
  flex: 0 0 auto;
  white-space: nowrap;
  scroll-snap-align: start;
  border: none;
  background: transparent;
  color: var(--fg);
  padding: 8px 0 10px;
  cursor: pointer;
  font-size: 16px;
  letter-spacing: 1px;
  transition: .15s;
  position: relative;
}
.tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); font-weight: 700; }
.tab.active::after { transform: scaleX(1); }
.subtabs { margin: 8px 0 0; }
.subtabs .tab {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 20px;
  background: #f3efe7;
  color: var(--muted);
  margin-right: 8px;
}
.subtabs .tab::after { display: none; }
.subtabs .tab:hover { background: #ece5d8; color: var(--ink); }
.subtabs .tab.active { background: var(--accent); color: #fff; font-weight: 600; }

/* ---------- 图片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; padding: 0 12px; }
.card {
  margin: 0;
  background: var(--card);
  border: 1px solid #ede8df;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: .25s;
  box-shadow: 0 4px 14px rgba(60,50,35,.06);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(60,50,35,.13); border-color: #e0d8c8; }
.thumb { position: relative; aspect-ratio: 1 / 1; background: #f0ece3; display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.04); }
.pic-no {
  padding: 12px 14px;
  border-top: 1px solid #f1ece2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pic-no .pq {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .5px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pic-no .zoom-hint { font-size: 12px; color: #999; white-space: nowrap; }
.card figcaption { padding: 10px 12px; font-size: 14px; color: var(--fg); text-align: center; }

.empty {
  text-align: center; color: var(--muted); padding: 50px 20px;
  border: 2px dashed var(--line); border-radius: 14px; line-height: 1.8;
}

/* ---------- 下拉刷新指示条 ---------- */
.ptr {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px; display: flex; align-items: center; justify-content: center;
  gap: 8px; color: #fff; background: var(--accent);
  font-size: 13px; letter-spacing: 1px;
  transform: translateY(-56px); transition: transform .3s ease; z-index: 300;
  pointer-events: none;
}
.ptr.dragging { transition: none; }
.ptr-ico { font-size: 16px; line-height: 1; }

/* ---------- Lightbox（点击放大） ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(20, 18, 15, .94); display: grid; place-items: center; z-index: 100; }
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); z-index: 1; touch-action: none; transform-origin: center center; -webkit-user-select: none; user-select: none; }
.lb-close {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  width: 44px; height: 44px; display: grid; place-items: center;
  color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
  background: rgba(192, 57, 43, .85); border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5);
}
.lb-close:hover { background: rgba(165, 46, 34, .95); }

@media (max-width: 600px) {
  .app { padding: 16px 12px 40px; }
  .brand-title { font-size: 15px; }
  .brand-inner { gap: 12px; }
  .intro-bar { padding: 12px 14px; }
  .intro-avatar { width: 50px; height: 50px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 0 12px; }
  .tab { font-size: 15px; }
  .badge { font-size: 11px; padding: 3px 8px; }
}
