/* ============================================================
   浪漫哲学 · 广告位样式（腾讯营销联盟 / 优量汇）
   PC 两侧对联 + 手机 H5 原生自渲染
   ============================================================ */

/* 通用广告角标 */
.lm-ad-tag {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 5px;
  letter-spacing: .05em;
}

/* ---------- PC 两侧对联广告（宽屏自适应，不遮挡正文） ---------- */
.lm-ad-side {
  --ad-w: min(220px, calc(50vw - 620px));
  position: fixed;
  top: 118px;
  width: var(--ad-w);
  z-index: 45;
  display: none;
}
.lm-ad-side--left  { left: max(10px, calc(50% - 600px - var(--ad-w) - 20px)); }
.lm-ad-side--right { right: max(10px, calc(50% - 600px - var(--ad-w) - 20px)); }

@media (min-width: 1500px) {
  .lm-ad-side { display: block; }
}

/* 较窄屏幕时精简卡片 */
@media (min-width: 1500px) and (max-width: 1680px) {
  .lm-ad-desc { display: none; }
  .lm-ad-title { font-size: 12px; }
  .lm-ad-cta { font-size: 12px; padding: 7px 0; }
}

.lm-ad-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.lm-ad-card .lm-ad-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--surface);
  opacity: .9;
}

.lm-ad-close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  border: none;
  background: var(--surface);
  opacity: .85;
  color: var(--muted);
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
}
.lm-ad-close:hover { color: var(--ink); }

.lm-ad-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}
.lm-ad-media img,
.lm-ad-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lm-ad-body { padding: 10px 12px 6px; }
.lm-ad-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lm-ad-desc {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lm-ad-cta {
  margin: 8px 12px 12px;
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lm-ad-cta:hover { background: var(--gold); color: #fff; }

/* ---------- 手机 H5 原生自渲染 ---------- */
.lm-ad-h5 {
  display: none;
  width: min(720px, calc(100% - 40px));
  margin: 34px auto;
}

.lm-h5-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.lm-h5-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
}
.lm-h5-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}
.lm-h5-head-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lm-h5-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lm-h5-media { width: 100%; }
.lm-h5-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.lm-h5-desc {
  padding: 10px 14px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lm-h5-cta {
  margin: 10px 14px 14px;
  padding: 9px 0;
  text-align: center;
  font-size: 14px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
}
