/* ═══════════════════════════════════════════════════════════
   真实反馈区块 · 会员页专用 v2
   本次新增：
   ① 分类筛选（考研升学 / 感情婚姻 / 职业方向）
   ② 灯箱：点击截图看完整长图
   设计意图不变：截图是证据，框架克制留白，不抢戏。
   ═══════════════════════════════════════════════════════════ */

/* —— 区块外壳 —— */
.voice-block {
  background: linear-gradient(168deg, #FFFBF7 0%, #FFF6F8 58%, #FFF0F4 100%);
  border: 1px solid #F5E2DE; border-radius: 22px;
  padding: 22px 16px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  position: relative;
}
/* 预览标记：正式开放后靠 [hidden] 隐藏。
   ⚠️ 必须显式写 [hidden]，否则下面的 display 会覆盖 hidden 属性。 */
.voice-preview-flag {
  display: inline-block; margin-bottom: 12px;
  font-size: 10.5px; letter-spacing: 1.2px; color: #8A4A2A;
  background: #FFF4E6; border: 1px solid #F5DFC4;
  border-radius: 999px; padding: 4px 12px;
}
.voice-preview-flag[hidden] { display: none; }
.voice-head { margin-bottom: 16px; }
.voice-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; letter-spacing: 2px; color: var(--rose-deep);
  background: rgba(255,255,255,.8); border: 1px solid var(--rose-soft);
  border-radius: 999px; padding: 4px 12px; margin-bottom: 11px;
}
.voice-title {
  font-family: var(--font-round); font-size: 18px; font-weight: 700;
  color: var(--text); letter-spacing: 1px; line-height: 1.5; margin: 0 0 7px;
}
.voice-title em { font-style: normal; color: var(--rose-deep); }
.voice-lead {
  font-size: 12.5px; color: var(--text-light); line-height: 1.95; margin: 0;
}
.voice-lead b { color: var(--rose-deep); font-weight: 700; }

/* —— 分类筛选条：横向可滑 —— */
.voice-filter {
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 0 12px; margin: 0 -2px 6px;
  -webkit-overflow-scrolling: touch;
}
.voice-filter::-webkit-scrollbar { display: none; }
.vf-btn {
  flex: 0 0 auto; font-family: inherit; cursor: pointer;
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
  color: var(--text-light); background: rgba(255,255,255,.9);
  border: 1px solid #EFE0DC; border-radius: 999px;
  padding: 7px 14px; line-height: 1.4; white-space: nowrap;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.vf-btn .vf-n { font-size: 11px; font-weight: 700; opacity: .62; margin-left: 4px; }
.vf-btn:hover { border-color: var(--rose-mist); color: var(--rose-deep); }
.vf-btn:focus-visible { outline: 3px solid var(--rose-soft); outline-offset: 2px; }
.vf-btn[aria-pressed="true"] {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #FF6B9D, #E84A82);
  box-shadow: 0 5px 14px -6px rgba(232,74,130,.62);
}
.vf-btn[aria-pressed="true"] .vf-n { opacity: .8; }

/* —— 单条反馈 —— */
.voice-list { list-style: none; margin: 0; padding: 0; }
.voice-item { margin-bottom: 18px; }
.voice-item:last-child { margin-bottom: 0; }
.voice-item + .voice-item {
  padding-top: 17px; border-top: 1px dashed #EADDD9;
}
/* 筛选后隐藏 / 上方分隔线也要跟着收掉 */
.voice-item[hidden] { display: none; }
.voice-item.voice-first {
  padding-top: 0 !important; border-top: 0 !important;
}

/* 标签行 */
.voice-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.voice-tag {
  font-size: 10.5px; letter-spacing: .4px; color: var(--text-light);
  background: rgba(255,255,255,.86); border: 1px solid #EFE3E0;
  border-radius: 8px; padding: 3px 9px; white-space: nowrap;
}
.voice-tag.hit {
  color: #8A4A2A; background: #FFF4E6; border-color: #F5DFC4;
  font-weight: 600;
}

/* 引语 */
.voice-quote { position: relative; margin: 0 0 10px; padding: 0 0 0 30px; }
.voice-quote::before {
  content: '\201C'; position: absolute; left: 0; top: 2px;
  font-family: var(--font-round); font-size: 30px; line-height: 1;
  color: var(--rose); opacity: .55;
}
.voice-q-text {
  font-family: var(--font-round); font-size: 15px; font-weight: 700;
  color: var(--text); line-height: 1.75; letter-spacing: .3px;
}
.voice-q-by {
  display: block; margin-top: 5px;
  font-size: 11px; font-weight: 400; color: var(--text-muted); letter-spacing: .3px;
}

/* —— 截图：可点击打开完整版 —— */
.voice-shot {
  position: relative; margin: 0; border-radius: 16px; overflow: hidden;
  border: 1px solid #E8E2E4; background: #EDEDED;
  box-shadow: 0 3px 14px rgba(90, 70, 60, .10);
}
.voice-shot img { display: block; width: 100%; height: auto; }
/* 底部渐隐：暗示「对话还在继续」 */
.voice-shot::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(180deg, rgba(237,237,237,0) 0%, rgba(237,237,237,.62) 40%, rgba(237,237,237,.94) 72%, #EDEDED 100%);
  pointer-events: none; z-index: 1;
}
/* 点击层：整张图可点，右下角一枚「看完整对话」提示 */
.voice-open {
  position: absolute; inset: 0; z-index: 2;
  display: block; width: 100%; height: 100%;
  border: 0; padding: 0; margin: 0; background: transparent;
  cursor: zoom-in; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.voice-open:focus-visible {
  outline: 3px solid #E84A82; outline-offset: -3px; border-radius: 16px;
}
.voice-open .vo-hint {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .3px;
  color: #fff; background: rgba(74, 58, 48, .72);
  border-radius: 999px; padding: 5px 11px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.voice-open:hover .vo-hint,
.voice-open:focus-visible .vo-hint { opacity: 1; transform: translateY(0); }
@media (hover: none) {
  /* 触屏没有 hover：提示常驻，否则用户不知道能点 */
  .voice-open .vo-hint { opacity: 1; transform: none; }
}
.voice-shot img.is-broken { display: none; }

/* —— 灯箱 —— */
.voicebox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(28, 20, 17, .93);
  display: flex; flex-direction: column;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.voicebox.open { opacity: 1; visibility: visible; }
/* ⚠️ 同 .voice-preview-flag：这里设了 display:flex，必须显式处理 [hidden] */
.voicebox[hidden] { display: none; }
.voicebox-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px;
  color: rgba(255,255,255,.92);
}
.voicebox-cap {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .3px;
}
.voicebox-close {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.voicebox-close:hover { background: rgba(255,255,255,.22); }
.voicebox-close:focus-visible { outline: 3px solid rgba(255,255,255,.6); outline-offset: 2px; }
.voicebox-scroll {
  flex: 1 1 auto; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px calc(20px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.voicebox-scroll img {
  display: block; width: 100%; max-width: 620px; height: auto;
  margin: 0 auto; border-radius: 14px; background: #EDEDED;
}
.voicebox-tip {
  font-size: 11.5px; color: rgba(255,255,255,.5); text-align: center;
  padding: 10px 0 0; letter-spacing: .3px;
}
.voicebox-loading {
  color: rgba(255,255,255,.72); font-size: 13px; padding: 40px 0;
  letter-spacing: .5px;
}
body.voicebox-lock { overflow: hidden; }

/* —— 底部说明 / 收口 —— */
.voice-note {
  margin-top: 16px; padding-top: 13px; border-top: 1px dashed #EADDD9;
  font-size: 11.5px; color: var(--text-muted); line-height: 1.85;
}
.voice-note b { color: var(--text-light); font-weight: 600; }
.voice-empty {
  font-size: 12.5px; color: var(--text-muted); text-align: center;
  padding: 26px 10px; line-height: 1.8;
}
.voice-empty[hidden] { display: none; }
.voice-cta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 13px 14px; border-radius: 14px;
  background: rgba(255,255,255,.72); border: 1px solid #F2E0DC;
}
.voice-cta .vc-body { flex: 1 1 200px; min-width: 0; }
.voice-cta .vc-body b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.voice-cta .vc-body i { font-style: normal; font-size: 11.5px; color: var(--text-muted); line-height: 1.7; }
.voice-cta .vc-btn {
  flex: 0 0 auto; display: inline-block; text-decoration: none;
  padding: 9px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: #fff; font-family: inherit; letter-spacing: .5px;
  background: linear-gradient(135deg, #FF6B9D, #E84A82);
  box-shadow: 0 6px 14px -6px rgba(232, 74, 130, .6);
  transition: transform .14s ease;
  -webkit-tap-highlight-color: transparent;
}
.voice-cta .vc-btn:active { transform: scale(.97); }

@media (max-width: 400px) {
  .voice-block { padding: 18px 13px 15px; border-radius: 19px; }
  .voice-title { font-size: 16.5px; }
  .voice-q-text { font-size: 14px; }
  .voice-quote { padding-left: 23px; }
  .voice-quote::before { font-size: 34px; }
  .vf-btn { font-size: 12px; padding: 6px 12px; }
  .voicebox-scroll { padding-left: 8px; padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .voicebox, .voice-open .vo-hint, .vf-btn, .voice-cta .vc-btn { transition: none; }
}
