/* ==========================================================================
   D 组 · 共享案例库 + 共享项目库（类名前缀 vd-）
   只放本组两个视图的专属样式，不覆盖 app.css 的通用组件。
   ========================================================================== */

/* ---------- 页面骨架 / 顶部价值条 ---------- */
.vd-page { min-width: 0; }
.vd-page .btn.sm { min-height: 40px; height: 40px; }

.vd-value {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 16px 17px 15px;
  background: linear-gradient(150deg, #123F3B 0%, #0B2E2B 62%, #123F3B 100%);
  color: #EDE4D2; box-shadow: 0 10px 30px rgba(15, 61, 58, .2);
}
.vd-value::before {
  content: ""; position: absolute; right: -46px; top: -56px;
  width: 180px; height: 180px; border-radius: 50%;
  border: 1px solid rgba(194, 161, 103, .26);
}
.vd-value::after {
  content: ""; position: absolute; right: -14px; top: -24px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 161, 103, .2), transparent 68%);
}
.vd-value-q {
  position: relative; z-index: 1;
  font-size: 20px; font-weight: 700; line-height: 1.5; letter-spacing: .6px; color: #F4EDDE;
}
.vd-value-s {
  position: relative; z-index: 1;
  margin-top: 7px; font-size: 12.5px; line-height: 1.75; color: #A8BDB8;
}
.vd-value-stats {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 13px;
  font-size: 11px; color: #93AEA9; letter-spacing: .3px;
}
.vd-value-stats b {
  font-family: var(--serif); font-size: 17px; color: #F1E5CB;
  margin-right: 3px; font-weight: 700;
}

/* ---------- 搜索 / 筛选 ---------- */
.vd-toolbar { display: flex; flex-direction: column; gap: 8px; }
.vd-search { position: relative; }
.vd-search-ico {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  display: flex; color: var(--muted); pointer-events: none;
}
.vd-search-input {
  height: 44px; padding-left: 39px; padding-right: 44px;
  font-size: 13.5px; border-radius: 12px;
}
.vd-search-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.vd-clear {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; color: var(--muted);
  background: transparent; border: 0;
}
.vd-clear:active { background: var(--card2); }

.vd-chips {
  display: flex; gap: 7px; overflow-x: auto; padding: 4px 1px 5px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.vd-chips::-webkit-scrollbar { display: none; }
.vd-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 40px; padding: 0 14px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--ink3);
  transition: .14s;
}
.vd-chip .n {
  font-size: 10px; font-weight: 500; color: var(--muted);
  background: var(--card2); border-radius: 99px; padding: 1px 6px;
}
.vd-chip.on {
  background: var(--brand); border-color: var(--brand); color: #F1E9D8;
}
.vd-chip.on .n { background: rgba(255, 255, 255, .16); color: #E8DDC8; }
.vd-chip:active { transform: scale(.97); }
.vd-count { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.vd-count b { color: var(--brand); font-weight: 700; }

/* ---------- 案例卡 ---------- */
.vd-cards { grid-template-columns: 1fr; }
@media (min-width: 900px) { .vd-cards { grid-template-columns: repeat(2, 1fr); } }

.vd-case-card {
  display: block; color: inherit; padding: 14px;
  transition: transform .16s, box-shadow .16s;
}
.vd-case-card:hover { box-shadow: var(--sh-m); transform: translateY(-1px); }
.vd-case-h { display: flex; align-items: flex-start; gap: 10px; }
.vd-case-age {
  flex: none; width: 44px; height: 44px; border-radius: 13px;
  background: var(--gold-soft); border: 1px solid #E9DAB9; color: #7A5C22;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.vd-case-age b { font-family: var(--serif); font-size: 17px; line-height: 1; }
.vd-case-age span { font-size: 9px; margin-top: 2px; opacity: .8; }
.vd-case-hmain { flex: 1; min-width: 0; }
.vd-case-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.vd-case-tag { margin-top: 2px; font-size: 11px; color: var(--muted); }
.vd-cmp-done {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; color: var(--ok); background: var(--ok-soft);
}
.vd-meta {
  display: flex; flex-wrap: wrap; gap: 3px 10px;
  margin-top: 8px; font-size: 11.5px; color: var(--ink3);
}
.vd-meta span { position: relative; padding-left: 9px; line-height: 1.6; }
.vd-meta span::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold2);
}

.vd-metrics {
  margin-top: 10px; padding: 9px 10px;
  background: var(--card2); border: 1px solid var(--line2); border-radius: 11px;
  display: flex; flex-direction: column; gap: 6px;
}
.vd-metric-row { display: flex; align-items: baseline; gap: 6px; }
.vd-m-name {
  flex: 1; min-width: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vd-before {
  flex: none; font-size: 12.5px; color: #A39D8E;
  font-variant-numeric: tabular-nums;
}
.vd-after {
  flex: none; font-size: 14px; font-weight: 700; color: var(--brand);
  font-family: var(--serif); letter-spacing: .2px;
}
.vd-before.lg, .vd-after.lg { font-size: 14px; }
.vd-arrow { flex: none; color: var(--gold); font-size: 12px; font-weight: 700; }

.vd-sum {
  margin-top: 8px; font-size: 12px; line-height: 1.7; color: var(--ink3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vd-case-f {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.vd-case-card .chip { height: 22px; font-size: 10.5px; padding: 0 8px; }
.vd-case-price { font-size: 11px; font-weight: 700; color: var(--gold); white-space: nowrap; }

/* ---------- 详情通用 ---------- */
.vd-backrow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.vd-detail-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  margin-top: 14px; align-items: start;
}
@media (min-width: 900px) { .vd-detail-grid { grid-template-columns: 1.18fr .82fr; } }
.vd-main, .vd-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vd-main > .mt2, .vd-side > .mt2 { margin-top: 0; }

/* 案例头部 */
.vd-chead { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.vd-chead-age {
  flex: none; width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(145deg, #154742 0%, #0E3733 100%);
  color: #EDE4D2; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.vd-chead-age b { font-family: var(--serif); font-size: 21px; line-height: 1; }
.vd-chead-age span { font-size: 9.5px; margin-top: 2px; color: #A9C0BB; }
.vd-chead-main { flex: 1; min-width: 0; }
.vd-ctitle { margin: 0; font-size: 21px; line-height: 1.4; letter-spacing: .4px; color: var(--ink); }
.vd-chead-main .vd-meta { margin-top: 5px; }
.vd-chead-price {
  flex: none; text-align: right; font-family: var(--serif);
  font-size: 18px; font-weight: 700; color: var(--brand); white-space: nowrap;
}
.vd-chead-price small {
  display: block; margin-top: 2px; font-family: var(--font);
  font-size: 10px; font-weight: 400; color: var(--muted);
}

/* 指标对比 */
.vd-mtable { display: flex; flex-direction: column; gap: 10px; }
.vd-mrow {
  border: 1px solid var(--line2); background: var(--card2);
  border-radius: 12px; padding: 10px 11px;
}
.vd-mrow-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.vd-mrow-name { font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.vd-delta { flex: none; font-size: 11px; font-weight: 700; color: var(--gold); }
.vd-mcols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.vd-mbox {
  min-width: 0; border-radius: 10px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.vd-mbox .lbl { font-size: 9.5px; letter-spacing: .5px; opacity: .78; }
.vd-mbox .val { font-size: 14.5px; font-weight: 700; line-height: 1.45; word-break: break-word; }
.vd-mbox.b { background: #EFEBE1; color: var(--ink3); }
.vd-mbox.a { background: linear-gradient(145deg, var(--brand2), var(--brand)); color: #F3E9D3; }
.vd-marrow { display: flex; align-items: center; color: var(--gold); font-size: 16px; font-weight: 700; }
.vd-bars { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.vd-bar { height: 6px; border-radius: 99px; background: #EAE5D9; overflow: hidden; }
.vd-bar i { display: block; height: 100%; border-radius: 99px; }
.vd-bar.b i { background: #C7C1B2; }
.vd-bar.a i { background: linear-gradient(90deg, var(--brand3), var(--brand)); }

/* 前后对比图 */
.vd-cmp .c-box {
  min-height: 190px; aspect-ratio: 4/5; border-style: dashed; cursor: pointer;
  transition: border-color .16s, background .16s;
}
.vd-cmp .c-box:active { border-color: var(--brand3); background: #F3F7F5; }
.vd-up { position: relative; user-select: none; }
.vd-up .c-add {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: center; padding: 0 8px;
}
.vd-up .c-add .xs { font-size: 10.5px; color: #B5AE9E; }
.vd-img-x {
  position: absolute; right: 6px; bottom: 6px; z-index: 2;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(20, 33, 31, .6); color: #F1E9D8;
  display: grid; place-items: center;
}
.vd-img-x:active { background: rgba(20, 33, 31, .82); }

/* 案例正文 */
.vd-story { margin: 0; font-size: 13.5px; line-height: 1.95; color: var(--ink2); }
.vd-quote {
  position: relative; margin: 12px 0 0; padding: 13px 14px 12px 38px;
  background: var(--gold-soft); border: 1px solid #E9DAB9; border-radius: 12px;
}
.vd-qmark {
  position: absolute; left: 11px; top: 4px;
  font-family: var(--serif); font-size: 40px; line-height: 1; color: #D3B57E; opacity: .72;
}
.vd-quote p { margin: 0; font-size: 14px; line-height: 1.8; font-weight: 600; color: #6B5426; }
.vd-quote footer { margin-top: 6px; text-align: right; font-size: 10.5px; color: #9C8248; }
.vd-panel {
  margin-top: 12px; padding: 11px 12px;
  background: var(--card2); border: 1px solid var(--line2); border-radius: 11px;
}
.vd-panel-t {
  font-size: 11.5px; font-weight: 700; color: var(--ink2);
  letter-spacing: .3px; margin-bottom: 4px;
}
.vd-panel p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink3); }

/* 成交动作 */
.vd-acts { display: grid; gap: 8px; }
@media (min-width: 560px) { .vd-acts { grid-template-columns: repeat(3, 1fr); } }
.vd-acts .btn { width: 100%; }

/* 案例信息 / 提示 */
.vd-inforow {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--line2);
  font-size: 12.5px; color: var(--muted);
}
.vd-inforow:last-child { border-bottom: 0; }
.vd-inforow b { color: var(--ink2); font-weight: 600; text-align: right; word-break: break-word; }
.vd-inforow b.gold { color: var(--gold); font-weight: 700; }
.vd-tip p { margin: 0 0 8px; font-size: 12px; line-height: 1.8; color: var(--ink3); }
.vd-tip p:last-child { margin-bottom: 0; }

/* 弹层里的顾客列表 / 话术 */
.vd-picks { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.vd-pick {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 8px 10px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.vd-pick:active { background: var(--card2); }
.vd-pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vd-pick-main b { font-size: 13.5px; color: var(--ink); }
.vd-pick-main small { margin-top: 1px; font-size: 11px; color: var(--muted); }
.vd-pick .chev { flex: none; color: #C9C3B4; display: flex; }
.vd-script { max-height: 46vh; overflow: auto; }

/* 表单里的指标分组 */
.vd-mgroup { border-top: 1px dashed var(--line); margin-top: 2px; padding-top: 10px; }
.vd-mgroup-t { margin-bottom: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink3); }
@media (min-width: 640px) { .form-grid.c3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 项目库：项目卡 ---------- */
.vd-pcards { grid-template-columns: 1fr; }
@media (min-width: 640px) { .vd-pcards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .vd-pcards { grid-template-columns: repeat(3, 1fr); } }

.vd-pcard {
  display: block; color: inherit; padding: 14px;
  transition: transform .16s, box-shadow .16s;
}
.vd-pcard:hover { box-shadow: var(--sh-m); transform: translateY(-1px); }
.vd-pcard-h { display: flex; align-items: flex-start; gap: 10px; }
.vd-pcard-ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; color: #8A6B2C; background: var(--gold-soft);
}
.vd-pcard-title { flex: 1; min-width: 0; }
.vd-pcard-title .t { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.vd-pcard-title .s { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.vd-pcard-title .s .hint { font-size: 10.5px; }
.vd-price {
  flex: none; text-align: right; white-space: nowrap;
  font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--brand);
}
.vd-price small { font-family: var(--font); font-size: 10px; font-weight: 400; color: var(--muted); }
.vd-pcard .chips { margin-top: 10px; }
.vd-pcard .chip { height: 22px; font-size: 10.5px; padding: 0 8px; }
.vd-ppitch {
  margin-top: 9px; padding-left: 9px;
  border-left: 2px solid var(--gold2);
  font-size: 12.5px; line-height: 1.7; color: var(--ink3);
}
.vd-pcard-f {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  margin-top: 10px; font-size: 10.5px; color: var(--muted);
}
.vd-pcard-f .go {
  margin-left: auto; display: inline-flex; align-items: center; gap: 2px;
  color: var(--brand3); font-weight: 600;
}

/* ---------- 项目库：自动匹配面板 ---------- */
.vd-match { margin-top: 14px; }
.vd-match-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.vd-match-row .select { flex: 1; min-width: 180px; height: 42px; }
.vd-match-row .btn { flex: none; height: 42px; }
.vd-profile {
  display: flex; align-items: center; gap: 10px; margin: 8px 0;
  padding: 9px 10px; background: var(--card2);
  border: 1px solid var(--line2); border-radius: 11px;
}
.vd-profile-main { flex: 1; min-width: 0; }
.vd-profile-main .hint { line-height: 1.65; margin-top: 2px; }

.vd-recs { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.vd-rec {
  display: flex; gap: 10px; padding: 11px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 13px;
}
.vd-rank {
  flex: none; width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand3), var(--brand));
  color: #F1E9D8; font-size: 12.5px; font-weight: 800;
}
.vd-rec-body { flex: 1; min-width: 0; }
.vd-rec-h { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.vd-rec-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.vd-score {
  margin-left: auto; flex: none; white-space: nowrap;
  padding: 1px 8px; border-radius: 99px;
  background: var(--gold-soft); border: 1px solid #E4D3AE;
  font-size: 10.5px; font-weight: 700; color: #7A5C22;
}
.vd-rec-meta { margin-top: 4px; font-size: 11px; line-height: 1.65; color: var(--muted); }
.vd-reasons { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.vd-reason { font-size: 11.5px; line-height: 1.6; color: var(--ink3); }
.vd-reason b { font-weight: 700; color: var(--ok); margin-right: 2px; }
.vd-reason.neg { color: #9C7B75; }
.vd-reason.neg b { color: var(--danger); }
.vd-rec-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.vd-rec-acts .btn { min-height: 40px; height: 40px; }

.vd-plan-cta { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.vd-plan-cta .btn { width: 100%; min-height: 44px; height: 44px; }
.vd-plan-cta .hint { margin-top: 7px; }
.vd-plan-wrap { position: relative; margin-top: 10px; min-height: 0; }
.vd-plan-acts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
@media (min-width: 640px) { .vd-plan-acts { grid-template-columns: repeat(4, 1fr); } }
.vd-plan-acts .btn { width: 100%; min-height: 40px; height: 40px; }
.vd-out { margin-top: 10px; }

/* ---------- 项目库：详情 ---------- */
.vd-phead-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.vd-phead-main { flex: 1; min-width: 0; }
.vd-phead-main h1 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: .5px; color: var(--ink); }
.vd-ppitch-lg { margin-top: 5px; font-size: 12.5px; line-height: 1.75; color: var(--ink3); }
.vd-phead-price { flex: none; text-align: right; font-family: var(--serif); color: var(--brand); }
.vd-phead-price b { font-size: 22px; }
.vd-phead-price span { font-family: var(--font); font-size: 12px; color: var(--muted); }
.vd-phead-price small {
  display: block; margin-top: 2px; font-family: var(--font);
  font-size: 10.5px; font-weight: 400; color: var(--muted);
}
.vd-head-acts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
}
.vd-head-acts .btn { min-height: 40px; height: 40px; }

.vd-stats .s-v { font-size: 17px; }
.vd-stats .s-l { font-size: 10.5px; }
.vd-opt .s-v { font-size: 14.5px; }

.vd-anti {
  border-color: #F1CFC8;
  background: linear-gradient(180deg, #FFF9F7 0%, #FFFFFF 100%);
}
.vd-anti .section-h .t { color: var(--danger); }
.vd-anti .section-h .t::before { background: linear-gradient(180deg, #BE5243, #D98877); }
.vd-anti .hint { color: #A07A72; }

.vd-pair {
  display: inline-flex; align-items: center; gap: 3px;
  height: 40px; padding: 0 13px; border-radius: 99px;
  background: var(--card2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--ink2);
  white-space: nowrap;
}
.vd-pair:active { background: #F2EEE3; }
.vd-pair svg { color: var(--muted); }

.vd-rule {
  margin: 8px 0 0; padding-left: 18px;
  font-size: 11.5px; line-height: 1.8; color: var(--ink3);
}
.vd-rule b { color: var(--brand); }

/* ---------- 小屏微调 ---------- */
@media (max-width: 400px) {
  .vd-value-q { font-size: 17.5px; }
  .vd-value { padding: 14px 14px 13px; }
  .vd-ctitle { font-size: 19px; }
  .vd-chead-age { width: 48px; height: 48px; border-radius: 14px; }
  .vd-phead-main h1 { font-size: 21px; }
  .vd-phead-price b { font-size: 19px; }
  .vd-case-title { font-size: 14px; }
  .vd-before { font-size: 12px; }
  .vd-after { font-size: 13px; }
  .vd-mbox .val { font-size: 13px; }
  .vd-mbox { padding: 7px 8px; }
}

/* 分类 tabs 点击区补到 40px 以上 */
.vd-page .tabs { margin-bottom: 12px; }
.vd-page .tabs button { padding-top: 11px; padding-bottom: 11px; }
