:root {
  --ink: #111214;
  --ink-2: #6b7078;
  --ink-3: #a2a7ae;
  --line: #ebedf0;
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --accent: #111214;
  --radius: 10px;
  --maxw: 1440px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-2);
  object-fit: cover;
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.head-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 14px;
  height: 38px;
  width: 260px;
  transition: border-color .15s, background .15s;
}
.search-box:focus-within { background: #fff; border-color: var(--ink); }
.search-box input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 100%;
  color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }

.btn-filter {
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-filter:hover { border-color: var(--ink); }
.btn-filter .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .25; }
.btn-filter.on .dot { opacity: 1; }

/* ---------- category rail ---------- */
.rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.rail::-webkit-scrollbar { display: none; }
.rail-inner { display: flex; gap: 22px; padding: 0 20px; max-width: var(--maxw); margin: 0 auto; }
.rail button {
  position: relative;
  border: 0;
  background: transparent;
  padding: 14px 0 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.rail button.on { color: var(--ink); font-weight: 600; }
.rail button.on::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
}

/* ---------- grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
  padding: 22px 0 8px;
}
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; padding-top: 14px; }
  .wrap { padding: 0 12px; }
  .rail-inner { padding: 0 12px; gap: 18px; }
  .search-box { width: 100%; }
  .head-row { height: 58px; gap: 10px; }
  .brand-sub { display: none; }
}

.card { display: block; }
.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .thumb img { transform: scale(1.045); }
.card-title {
  margin: 9px 2px 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #3a3f46;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* ---------- status / loaders ---------- */
.status {
  padding: 26px 0 60px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}
.status .bar {
  width: 180px;
  height: 3px;
  margin: 12px auto 0;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.status .bar i { display: block; height: 100%; width: 30%; background: var(--ink); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

.load-more {
  display: block;
  margin: 26px auto 0;
  height: 42px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.load-more:hover { border-color: var(--ink); }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; }
.foot-nav a { color: var(--ink-2); }
.foot-nav a:hover { color: var(--ink); }

/* ---------- category drawer ---------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 18, 20, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 60;
}
.drawer-mask.on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(680px, 92vw);
  background: #fff;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  z-index: 61;
  display: flex;
  flex-direction: column;
}
.drawer.on { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 15px; }
.drawer-close {
  border: 0; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--ink-2); padding: 4px 6px;
}
.drawer-body { overflow-y: auto; padding: 8px 22px 40px; }

.cat-group { padding: 16px 0 6px; }
.cat-group h3 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-list button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.cat-list button:hover { border-color: var(--ink); color: var(--ink); }
.cat-list button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat-list button i { font-style: normal; opacity: .5; margin-left: 5px; font-size: 11px; }

/* ---------- detail page ---------- */
.detail-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 18px;
}
.detail-head a.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.detail-head a.back:hover { color: var(--ink); }
.detail-head .now { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

.detail-body { max-width: 920px; margin: 0 auto; padding: 18px 16px 80px; }
.detail-title {
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 18px;
  color: #22262b;
}
.detail-shots { display: flex; flex-direction: column; gap: 6px; }
.detail-shots img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--bg-2);
  cursor: zoom-in;
}
.detail-meta { margin-top: 20px; font-size: 12px; color: var(--ink-3); }

.zoom {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, .96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
}
.zoom.on { display: flex; }
.zoom img { max-width: 96vw; max-height: 96vh; object-fit: contain; }
.zoom .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}
.zoom .nav.prev { left: 18px; }
.zoom .nav.next { right: 18px; }
.zoom .count {
  position: absolute;
  bottom: 22px;
  left: 0; right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .7);
  font-size: 12.5px;
}
