:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --text: #1e2227;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e6e6e2;
  --accent: #185fa5;
  --accent-soft: #eaf2fb;
  --radius: 14px;
  --wide: 1440px;
  --gutter: clamp(16px, 3vw, 36px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
::selection { background: var(--accent-soft); color: var(--accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #d2d6da; border: 2px solid var(--bg); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #b8bec5; }

.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 var(--gutter);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; letter-spacing: 1px; white-space: nowrap; }
.mark { width: 22px; height: 22px; border-radius: 6px; flex: none; object-fit: contain; }

.topbar nav { display: flex; gap: 22px; }
.topbar nav a { position: relative; color: var(--muted); font-size: 13px; padding: 4px 0; transition: color 0.15s; }
.topbar nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; border-radius: 2px; background: var(--accent); transition: right 0.2s ease; }
.topbar nav a:hover { color: var(--accent); }
.topbar nav a:hover::after, .topbar nav a.active::after { right: 0; }
.topbar nav a.active { color: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.pill { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.random-btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
}
.random-btn:hover { background: var(--accent); color: #fff; }

.hero { position: relative; min-height: 470px; display: flex; align-items: flex-end; overflow: hidden; background: #d9dde2; cursor: pointer; }
.hero:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.hero:hover .hero-img { transform: scale(1.025); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 16, 24, 0.06) 25%, rgba(9, 16, 24, 0.78) 100%); }

.hero-content { position: relative; width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 64px; color: #fff; }
.hero-content > * { animation: heroIn 0.7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-content > *:nth-child(2) { animation-delay: 0.08s; }
.hero-content > *:nth-child(3) { animation-delay: 0.16s; }
.hero-content > *:nth-child(4) { animation-delay: 0.24s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { font-size: 11px; letter-spacing: 2.4px; opacity: 0.86; }
.dot { margin: 0 6px; }
.hero h1 { margin: 12px 0 8px; font-size: clamp(30px, 4.4vw, 48px); font-weight: 500; letter-spacing: 1px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25); }
.hero p { margin: 0 0 24px; max-width: 760px; opacity: 0.92; }

.hero-cta { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px); font-size: 13px; transition: background 0.18s ease, transform 0.18s ease; }
.hero-cta span { transition: transform 0.18s ease; }
.hero:hover .hero-cta { background: rgba(255, 255, 255, 0.24); transform: translateY(-1px); }
.hero:hover .hero-cta span { transform: translateX(3px); }

.scroll-hint { position: absolute; right: var(--gutter); bottom: 68px; color: rgba(255, 255, 255, 0.78); font-size: 11px; letter-spacing: 1px; }
.scroll-hint span { display: inline-block; margin-left: 6px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.stats-strip {
  position: relative;
  max-width: var(--wide);
  width: 100%;
  margin: -1px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 30px rgba(24, 45, 70, 0.06);
}
.stats-strip > div { padding: 14px 34px; border-right: 1px solid var(--line); }
.stats-strip > div:last-child { border-right: 0; }
.stats-strip strong { display: block; font-size: 20px; font-weight: 500; color: var(--text); line-height: 1.25; font-variant-numeric: tabular-nums; }
.stats-strip span { color: var(--muted); font-size: 12px; letter-spacing: 1px; }

main { max-width: var(--wide); margin: 0 auto; padding: 44px var(--gutter) 24px; }

.archive-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.archive-title { position: relative; padding-left: 14px; }
.archive-title::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--accent); }
.archive-title h2 { margin: 0; font-size: 22px; font-weight: 500; }
.archive-title p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: 4px; }
.filters label span { color: var(--muted); font-size: 11px; }
.filters select, .filters input { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); padding: 0 10px; outline: none; }
.filters select { min-width: 110px; }
.filters input { width: 86px; }
.filters .search input { width: 200px; }
.filters select:focus, .filters input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filters button { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
.filters button:hover { border-color: var(--accent); color: var(--accent); }

.size-note { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 12px; }
.size-note strong { color: var(--accent); font-weight: 500; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips span { padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.muted { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; animation: rise 0.35s ease both; }
.card:hover { border-color: #b9c9dc; transform: translateY(-3px); box-shadow: 0 10px 26px rgba(24, 45, 70, 0.08); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.card-media { position: relative; overflow: hidden; background: #e9e9e6; }
.card-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0; transition: transform 0.35s ease, opacity 0.4s ease; }
.card-media img.loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.035); }
.card-date, .card-badge { position: absolute; top: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: #25303a; font-size: 11px; }
.card-date { left: 10px; }
.card-badge { right: 10px; background: var(--accent); color: #fff; }
.card-hover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(14, 24, 34, 0.46); opacity: 0; transition: opacity 0.18s ease; }
.card:hover .card-hover { opacity: 1; }
.card-hover span { border: 1px solid rgba(255, 255, 255, 0.78); color: #fff; border-radius: 6px; padding: 6px 11px; font-size: 12px; }
.card-body { padding: 13px 15px 15px; }
.card h3 { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card.skeleton { pointer-events: none; }
.skeleton-img, .sk-line { background: linear-gradient(90deg, #eeeeeb 25%, #f7f7f5 50%, #eeeeeb 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton-img { aspect-ratio: 16 / 9; }
.skeleton-body { padding: 13px 15px 15px; }
.sk-line { height: 12px; border-radius: 4px; margin-bottom: 8px; }
.sk-line.short { width: 55%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.empty { color: var(--muted); text-align: center; padding: 60px 0; }
.more { display: flex; justify-content: center; padding: 30px 0 8px; }
.more button { padding: 10px 28px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; }
.more button:hover { border-color: var(--accent); color: var(--accent); }
footer { padding: 28px 16px 44px; text-align: center; color: var(--muted); font-size: 12px; }
footer span { margin-left: 8px; color: var(--accent); }
.footer-beian { margin-top: 8px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-beian a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); transition: color .2s; }
.footer-beian a:hover { color: var(--accent); }
.footer-beian .sep { margin: 0; color: var(--faint); }
.footer-beian .beian-icon { width: 14px; height: 14px; flex: none; }

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(24, 45, 70, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s, background .2s, color .2s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: #fff; }

.viewer { position: fixed; inset: 0; z-index: 50; background: #0e1216; color: #f4f6f7; }
.viewer[hidden] { display: none; }
.viewer:fullscreen { background: #000; }
.viewer-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 90px 260px 118px 96px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; cursor: zoom-in; border-radius: 3px; }
.viewer:fullscreen .viewer-stage img { cursor: zoom-out; }

.viewer-top { position: absolute; top: 0; left: 0; right: 0; padding: 24px 28px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0)); pointer-events: none; }
.viewer-meta { max-width: 55%; }
.viewer-meta .date { color: #8fc0ea; font-size: 12px; letter-spacing: 1px; }
.viewer-meta h3 { margin: 4px 0 2px; font-size: 22px; font-weight: 500; }
.viewer-meta p { margin: 0; color: rgba(255, 255, 255, 0.68); font-size: 12px; }

.viewer-panel { position: absolute; top: 20px; right: 22px; width: 220px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.97); color: #1e2227; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.panel-head strong { font-size: 12px; font-weight: 500; }
.panel-actions { display: flex; gap: 6px; }
.panel-actions button { min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #374151; font-size: 11px; cursor: pointer; }
.panel-actions button:hover { border-color: var(--accent); color: var(--accent); }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dl-grid a { padding: 7px 8px; border: 1px solid #e5e5e2; border-radius: 7px; font-size: 11px; line-height: 1.35; color: #1f2937; }
.dl-grid a span { display: block; color: #8a9099; font-size: 10px; }
.dl-grid a:hover { border-color: var(--accent); background: var(--accent-soft); }
.dl-grid a.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dl-grid a.primary span { color: rgba(255, 255, 255, 0.76); }
.dl-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid #ececea; text-align: center; font-size: 12px; line-height: 1.8; }
.dl-note span { display: block; color: #3d4652; font-weight: 500; }
.dl-note span + span { color: #56606d; }

.stage-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 50%; background: rgba(0, 0, 0, 0.28); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.stage-arrow:hover { background: rgba(255, 255, 255, 0.16); }
.stage-arrow.prev { left: 20px; }
.stage-arrow.next { right: 20px; }

.viewer-desc { position: absolute; left: 0; right: 0; bottom: 0; max-height: 28vh; overflow: auto; padding: 54px 28px 26px; background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0)); color: rgba(255, 255, 255, 0.82); font-size: 12px; line-height: 1.8; }
.viewer-pos { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.5); font-size: 11px; white-space: nowrap; }

@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip > div:nth-child(2) { border-right: 0; }
  .stats-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .viewer-stage { padding: 110px 20px 130px; }
  .viewer-meta { max-width: 60%; }
  .viewer-panel { top: 84px; right: 12px; width: 196px; }
}

@media (max-width: 640px) {
  .topbar { gap: 14px; }
  .topbar nav { gap: 12px; }
  .pill { display: none; }
  .hero { min-height: 400px; }
  .hero-content { padding-bottom: 48px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stats-strip { width: 100%; }
  .stats-strip > div { padding: 18px 14px; }
  .stats-strip strong { font-size: 18px; }
  .scroll-hint { display: none; }
  .viewer-meta { max-width: calc(100% - 150px); }
  .viewer-meta h3 { font-size: 16px; }
  .viewer-panel { top: 74px; width: 138px; padding: 8px; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-note { font-size: 11px; }
  .stage-arrow { width: 36px; height: 36px; font-size: 22px; }
  .stage-arrow.prev { left: 6px; }
  .stage-arrow.next { right: 6px; }
  .viewer-desc { max-height: 22vh; padding: 40px 16px 22px; }
}
