/* 会员名录 — 严格对照 design-mocks/inner-01-directory.png */

body.qin-shell[data-page="directory"] {
  --dir-red: #8b1a1a;
  --dir-ink: #1f1c1a;
  --dir-muted: #6f6760;
  --dir-cream: #f3eee4;
  --dir-card: #f7f3eb;
  --dir-card-deep: #efe8dc;
  --dir-bronze: #c9a96a;
  --dir-bronze-deep: #a8844a;
}

/* 右上塔影山水 + 底部山峦（覆盖 shell 默认） */
body.qin-shell[data-page="directory"]::before {
  background-image: url("/img/home/wm-dir-shanshui-top.jpg");
  background-size: min(760px, 62vw) auto;
  background-position: right -2% top 4%;
  background-repeat: no-repeat;
  opacity: 0.95;
  mix-blend-mode: multiply;
}

body.qin-shell[data-page="directory"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(48vh, 480px);
  z-index: 0;
  pointer-events: none;
  background-image:
    url("/img/home/wm-dir-shanshui-bot.jpg"),
    url("/img/home/wm-dir-shanshui-bot-strip.jpg");
  background-repeat: no-repeat;
  background-size: cover, 120% auto;
  background-position: center bottom, center bottom;
  opacity: 0.95;
  mix-blend-mode: multiply;
}

/* 页脚区域留出山水可视空间 */
body.qin-shell[data-page="directory"] .qin-footer {
  position: relative;
  z-index: 1;
  padding-bottom: 56px;
  margin-top: 48px;
  border-top: none;
  background: transparent;
}

/* 顶栏品牌带英文副标（效果图） */
body.qin-shell[data-page="directory"] .qin-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-size: 18px;
}

body.qin-shell[data-page="directory"] .qin-brand-text::after {
  content: "Shaanxi Weinan Chamber in Guangdong";
  font-family: var(--qin-font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--dir-muted);
  margin-top: 3px;
}

/* Hero：铜框透视匾额 + 右文案（无外框） */
body.qin-shell[data-page="directory"] .qin-dir-hero {
  max-width: 1120px;
  padding: 48px 36px 18px;
  gap: 48px;
  grid-template-columns: minmax(380px, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  perspective: none;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-stage {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 20px 36px 4px;
  perspective: 1400px;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-frame {
  display: none;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 292px;
  border-radius: 6px;
  border: 2.5px solid #d2b87a;
  background-size: cover;
  background-position: center 30%;
  box-shadow:
    0 1px 0 rgba(255, 248, 230, 0.55) inset,
    0 0 0 1px rgba(168, 132, 74, 0.28),
    14px 22px 36px rgba(42, 36, 34, 0.16),
    28px 44px 64px rgba(42, 36, 34, 0.14);
  transform: perspective(1200px) rotateY(18deg) rotateX(2.5deg) translate3d(4px, 0, 18px);
  transform-origin: left center;
  overflow: hidden;
  filter: saturate(0.94) contrast(1.03);
}

body.qin-shell[data-page="directory"] .qin-dir-hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(108deg, rgba(42, 36, 34, 0.14) 0%, transparent 40%),
    linear-gradient(180deg, transparent 58%, rgba(42, 36, 34, 0.18));
  pointer-events: none;
  z-index: 1;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-visual::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 236, 196, 0.22);
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
  background: none;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-copy {
  padding-top: 6px;
  max-width: 22em;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-copy h1 {
  font-size: clamp(44px, 5.4vw, 56px);
  letter-spacing: 0.2em;
  margin: 0 0 16px;
  color: var(--dir-red);
  font-weight: 700;
  line-height: 1.15;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-copy .qin-diamond {
  width: 160px;
  height: 1px;
  margin: 0 0 20px;
  background: linear-gradient(90deg, rgba(42, 36, 34, 0.26), rgba(42, 36, 34, 0.06) 75%, transparent);
}

body.qin-shell[data-page="directory"] .qin-dir-hero-copy .qin-diamond::after {
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--dir-red);
  box-shadow: 0 0 0 3px rgba(243, 238, 228, 0.92);
}

body.qin-shell[data-page="directory"] .qin-dir-hero-copy .qin-lead {
  font-size: 17px;
  font-weight: 600;
  color: var(--dir-ink);
  margin: 0 0 10px;
  letter-spacing: 0.05em;
  line-height: 1.55;
}

body.qin-shell[data-page="directory"] .qin-dir-hero-copy .qin-sub {
  font-size: 14px;
  color: var(--dir-muted);
  max-width: none;
  line-height: 1.75;
  letter-spacing: 0.03em;
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  body.qin-shell[data-page="directory"] .qin-dir-hero-stage,
  body.qin-shell[data-page="directory"] .qin-dir-hero-copy {
    animation: qin-dir-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero-copy {
    animation-delay: 0.06s;
  }
}

@keyframes qin-dir-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  body.qin-shell[data-page="directory"] .qin-dir-hero {
    gap: 28px;
    padding: 36px 24px 12px;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero-visual {
    transform: perspective(1000px) rotateY(10deg) rotateX(2deg);
  }
}

@media (max-width: 640px) {
  body.qin-shell[data-page="directory"] .qin-dir-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero-stage {
    min-height: 200px;
    padding: 8px 8px 20px;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero-visual {
    transform: none;
    min-height: 200px;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero-copy {
    max-width: none;
  }
}

/* 搜索区浅褐底带 */
body.qin-shell[data-page="directory"] .qin-dir-main {
  padding: 0 0 48px;
}

body.qin-shell[data-page="directory"] .qin-dir-strip {
  max-width: none;
  margin: 20px 0 0;
  padding: 28px 0 8px;
  background: linear-gradient(180deg, rgba(232, 222, 204, 0.45), rgba(243, 238, 228, 0.15) 70%, transparent);
}

body.qin-shell[data-page="directory"] .qin-search-bar {
  max-width: 1120px;
  margin: 0 auto 20px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr auto auto;
  gap: 10px;
  align-items: center;
  background: linear-gradient(180deg, #fffdf9, #f6f0e5);
  border: 1px solid rgba(168, 140, 100, 0.32);
  border-radius: 16px;
  box-shadow:
    0 14px 32px rgba(42, 36, 34, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.qin-shell[data-page="directory"] .qin-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--dir-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(168, 140, 100, 0.28);
  border-radius: 10px;
}

body.qin-shell[data-page="directory"] .qin-field-icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.72;
}

body.qin-shell[data-page="directory"] .qin-search-bar input,
body.qin-shell[data-page="directory"] .qin-search-bar select {
  width: 100%;
  min-height: 40px;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  font-size: 14px;
  color: var(--dir-ink);
}

body.qin-shell[data-page="directory"] .qin-search-bar .btn {
  min-height: 42px;
  min-width: 84px;
  border-radius: 10px;
  font-size: 14px;
}

body.qin-shell[data-page="directory"] .qin-search-bar .btn-accent {
  background: var(--dir-red);
  border-color: var(--dir-red);
}

body.qin-shell[data-page="directory"] .qin-btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f4ebe0;
  border: 1px solid rgba(139, 26, 26, 0.22);
  color: var(--dir-red);
}

/* 结果元信息 */
body.qin-shell[data-page="directory"] .qin-result-meta {
  max-width: 1120px;
  margin: 0 auto 18px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--dir-muted);
  font-size: 14px;
}

body.qin-shell[data-page="directory"] .qin-result-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.qin-shell[data-page="directory"] .qin-result-tools select {
  border: none;
  background: transparent;
  color: var(--dir-muted);
  font-size: 13px;
  padding: 4px 0;
}

body.qin-shell[data-page="directory"] .qin-view-toggle {
  display: inline-flex;
  gap: 4px;
}

body.qin-shell[data-page="directory"] .qin-view-toggle button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--dir-muted);
  border-radius: 6px;
  cursor: pointer;
}

body.qin-shell[data-page="directory"] .qin-view-toggle button.active {
  color: var(--dir-red);
  background: rgba(139, 26, 26, 0.08);
}

/* 三列会员卡 */
body.qin-shell[data-page="directory"] .member-grid {
  max-width: 1120px;
  margin: 0 auto 28px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  perspective: none;
}

body.qin-shell[data-page="directory"] .member-grid.is-list {
  grid-template-columns: 1fr;
}

body.qin-shell[data-page="directory"] .member-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: start;
  min-height: 148px;
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(250, 246, 238, 0.98), rgba(241, 235, 224, 0.99)),
    url("/img/home/paper-grain.jpg");
  background-size: auto, 220px;
  border: 1px solid rgba(168, 140, 100, 0.34);
  border-radius: 10px;
  box-shadow:
    0 4px 10px rgba(60, 48, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(168, 140, 100, 0.14);
  transform: none;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

body.qin-shell[data-page="directory"] .member-card:nth-child(even) {
  transform: none;
}

body.qin-shell[data-page="directory"] .member-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 18px rgba(60, 48, 40, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(168, 140, 100, 0.14);
}

body.qin-shell[data-page="directory"] .member-card .qin-m-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, #faf6ef, #f0ebe2),
    url("/img/home/paper-grain.jpg");
  background-size: auto, 120px;
  color: var(--dir-red);
  border: 1px solid rgba(168, 140, 100, 0.3);
  box-shadow:
    0 3px 8px rgba(60, 48, 40, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  font-family: var(--qin-font-serif);
  font-size: 26px;
  font-weight: 700;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

body.qin-shell[data-page="directory"] .member-card .qin-m-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.qin-shell[data-page="directory"] .member-card .qin-m-body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

body.qin-shell[data-page="directory"] .member-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--dir-ink);
  margin: 0 0 8px;
  font-family: var(--qin-font-sans);
  letter-spacing: 0.01em;
  line-height: 1.35;
}

body.qin-shell[data-page="directory"] .member-card .qin-m-tag {
  display: inline-block;
  background: var(--dir-red);
  color: #fff;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 1.35;
  font-weight: 500;
}

body.qin-shell[data-page="directory"] .member-card .meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--dir-muted);
  margin-bottom: 6px;
}

body.qin-shell[data-page="directory"] .member-card .qin-m-loc {
  display: inline-flex;
  align-items: center;
  color: var(--dir-muted);
  flex-shrink: 0;
}

body.qin-shell[data-page="directory"] .member-card .qin-m-desc {
  margin: 0;
  font-size: 12px;
  color: #7a726a;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.qin-shell[data-page="directory"] .member-card .card-action {
  display: none;
}

body.qin-shell[data-page="directory"] .member-card::after {
  content: "";
  position: absolute;
  right: -2%;
  bottom: -4%;
  width: 56%;
  height: 78%;
  background: url("/img/home/wm-dir-card-skyline.jpg") right bottom / contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
  mix-blend-mode: multiply;
}

body.qin-shell[data-page="directory"] .directory-pager {
  max-width: 1120px;
  margin: 0 auto 16px;
  padding: 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

body.qin-shell[data-page="directory"] .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--dir-muted);
  padding: 40px 16px;
}

@media (max-width: 980px) {
  body.qin-shell[data-page="directory"] .qin-search-bar {
    grid-template-columns: 1fr 1fr;
  }


  body.qin-shell[data-page="directory"] .member-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero-visual {
    transform: perspective(900px) rotateY(12deg) rotateX(3deg);
  }
}

@media (max-width: 640px) {
  body.qin-shell[data-page="directory"] .qin-dir-hero,
  body.qin-shell[data-page="directory"] .member-grid,
  body.qin-shell[data-page="directory"] .qin-search-bar {
    grid-template-columns: 1fr;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero {
    padding: 28px 20px 8px;
    gap: 24px;
  }

  body.qin-shell[data-page="directory"] .qin-dir-hero-visual {
    transform: none;
    min-height: 200px;
  }

  body.qin-shell[data-page="directory"] .qin-result-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
