/*
 * media.css —— 专家媒体（图片 / 文章 / 视频）在首页流、文章页、播放页的样式。
 *
 * 边界：
 *   · 新文件，不改 shell.css / m3.css；颜色只消费既有令牌（--panel / --line / --text / --muted / --faint），
 *     深色由 body.v5.dark 自动接管；
 *   · 石墨灰阶、无橙、无 3D、无高饱和图标；圆角只用 8/12/16 三档；
 *   · 首页流样式只作用于 .lm-*（media-ui.js 渲染的节点），不碰 .hf-* 既有结构；
 *   · 文章页 / 播放页是独立 HTML 页面（只加载 tokens.css + 本文件），所有变量都带兜底值。
 */

/* ══════════════════════════════════════════════════════════════
   1. 首页流：图片网格
   ══════════════════════════════════════════════════════════════ */

.lm-media-block { margin-top: 10px; }

.lm-image-grid {
  display: grid;
  gap: 3px;
  overflow: hidden;
  border: 1px solid var(--tl-line, var(--line, #E6E4F2));
  border-radius: var(--r, 12px);
  background: var(--tl-panel-2, var(--panel-2, #F1EFFA));
}
.lm-grid--1 { grid-template-columns: minmax(0, 1fr); }
.lm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lm-grid--3 { grid-template-columns: 1.25fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.lm-grid--3 .lm-grid-item:first-child { grid-row: span 2; }
.lm-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }

.lm-grid-item {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: var(--tl-panel-3, var(--panel-3, #E7E4F5));
  cursor: zoom-in;
  overflow: hidden;
}
.lm-grid-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-fast, 120ms) ease;
}
.lm-grid--1 .lm-grid-item img { max-height: 420px; }
.lm-grid--3 .lm-grid-item:nth-child(2) img,
.lm-grid--3 .lm-grid-item:nth-child(3) img { max-height: 210px; }
.lm-grid--4 .lm-grid-item img { max-height: 210px; }
.lm-grid-item:hover img { transform: scale(1.015); }
.lm-grid-item:focus-visible { outline: 2px solid var(--accent, #4B4FA8); outline-offset: 2px; }

@media (max-width: 560px) {
  .lm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .lm-grid--3 .lm-grid-item:first-child { grid-row: auto; grid-column: span 2; }
  .lm-grid--3 .lm-grid-item img,
  .lm-grid--4 .lm-grid-item img { max-height: 180px; }
  .lm-grid--1 .lm-grid-item img { max-height: 300px; }
}

/* ══════════════════════════════════════════════════════════════
   2. 首页流：视频卡（封面 + 时长 + 播放按钮；点击才加载）
   ══════════════════════════════════════════════════════════════ */

.lm-video-band { margin-top: 10px; }
.lm-video-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--tl-line, var(--line, #E6E4F2));
  border-radius: var(--r, 12px);
  background: var(--tl-panel, var(--panel, #FFFFFF));
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-fast, 120ms) ease;
}
.lm-video-card:hover { border-color: var(--tl-line-strong, var(--line-strong, #D8D5EA)); }
.lm-video-card:focus-visible { outline: 2px solid var(--accent, #4B4FA8); outline-offset: 2px; }
.lm-video-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 380px;
  background: #1B1C1F;
  overflow: hidden;
}
.lm-video-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lm-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 999px;
  background: rgba(18, 19, 22, .72);
  color: #FFFFFF;
  backdrop-filter: blur(2px);
}
.lm-video-play svg { width: 22px; height: 22px; fill: currentColor; }
.lm-video-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(18, 19, 22, .78);
  color: #FFFFFF;
  font-size: 11px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.lm-video-meta { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px 10px; }
.lm-video-meta b { color: var(--tl-ink, var(--text, #17191D)); font-size: 13px; font-weight: 600; line-height: 1.45; }
.lm-video-meta em { color: var(--tl-faint, var(--faint, #9AA1AA)); font-style: normal; font-size: 11.5px; }
.lm-video-loading { color: #FFFFFF; font-size: 12px; }
.lm-video-inline { border-radius: var(--r, 12px); overflow: hidden; border: 1px solid var(--tl-line, var(--line)); background: #101113; }
.lm-video-inline video { display: block; width: 100%; max-height: 440px; background: #101113; }
.lm-video-inline iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #101113; }

/* ══════════════════════════════════════════════════════════════
   3. 首页流：文章卡（标题 + 摘要 + 封面）
   ══════════════════════════════════════════════════════════════ */

.lm-article-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--tl-line, var(--line, #E6E4F2));
  border-radius: var(--r, 12px);
  background: var(--tl-panel, var(--panel, #FFFFFF));
  color: var(--tl-ink, var(--text, #17191D));
  text-decoration: none;
  transition: border-color var(--t-fast, 120ms) ease, background-color var(--t-fast, 120ms) ease;
}
.lm-article-card:hover { border-color: var(--tl-line-strong, var(--line-strong, #D8D5EA)); background: var(--tl-panel-2, var(--panel-2, #F1EFFA)); }
.lm-article-card:focus-visible { outline: 2px solid var(--accent, #4B4FA8); outline-offset: 2px; }
.lm-article-cover { display: block; width: 100%; overflow: hidden; border-radius: var(--r-sm, 8px); background: var(--tl-panel-2, var(--panel-2)); aspect-ratio: 16 / 8.2; max-height: 250px; }
.lm-article-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.lm-article-main { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; padding: 2px 4px 4px; }
.lm-article-kind { display: inline-flex; align-items: center; gap: 4px; color: var(--tl-faint, var(--faint)); font-size: 11px; letter-spacing: .02em; }
.lm-article-kind svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.lm-article-title {
  color: var(--tl-ink, var(--text, #17191D));
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lm-article-src { color: var(--tl-faint, var(--faint)); font-style: normal; font-size: 12px; }
.lm-article-cta { margin-top: auto; color: var(--tl-muted, var(--muted, #737B85)); font-size: 12px; }
.lm-article-card:hover .lm-article-cta { color: var(--tl-ink, var(--text)); }

@media (max-width: 560px) {
  .lm-article-cover { aspect-ratio: 16 / 9; max-height: 190px; }
  .lm-article-title { font-size: 14px; }
}

/* ══════════════════════════════════════════════════════════════
   4. 大图查看（lightbox）
   ══════════════════════════════════════════════════════════════ */

body.lm-lb-open { overflow: hidden; }
.lm-lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 64px;
  background: rgba(12, 13, 16, .92);
}
.lm-lb-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
  padding: 0 16px;
  color: rgba(255, 255, 255, .9);
}
.lm-lb-caption { flex: 1; min-width: 0; overflow: hidden; color: rgba(255, 255, 255, .82); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.lm-lb-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  text-decoration: none;
  background: rgba(255, 255, 255, .1);
}
.lm-lb-download:hover { background: rgba(255, 255, 255, .18); }
.lm-lb-download svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.lm-lb-close,
.lm-lb-prev,
.lm-lb-next {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #FFFFFF;
  cursor: pointer;
}
.lm-lb-close:hover,
.lm-lb-prev:hover,
.lm-lb-next:hover { background: rgba(255, 255, 255, .2); }
.lm-lb-close svg,
.lm-lb-prev svg,
.lm-lb-next svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lm-lb-prev, .lm-lb-next { position: absolute; top: 50%; margin-top: -18px; }
.lm-lb-prev { left: 14px; }
.lm-lb-next { right: 14px; }
.lm-lb-figure { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 100%; max-height: 100%; margin: 0; }
.lm-lb-img { display: block; max-width: calc(100vw - 160px); max-height: calc(100vh - 160px); object-fit: contain; border-radius: 8px; background: #FFFFFF; }
.lm-lb-count { color: rgba(255, 255, 255, .6); font-size: 12px; font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .lm-lb { padding: 52px 8px 24px; }
  .lm-lb-img { max-width: calc(100vw - 16px); max-height: calc(100vh - 120px); }
  .lm-lb-prev { left: 4px; }
  .lm-lb-next { right: 4px; }
}

/* ══════════════════════════════════════════════════════════════
   5. 发布入口 + 发帖弹窗
   ══════════════════════════════════════════════════════════════ */

.lm-publish-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.lm-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--ctl, 40px);
  padding: 0 14px;
  border: 1px solid var(--tl-line, var(--line, #E6E4F2));
  border-radius: 999px;
  background: var(--tl-panel, var(--panel, #FFFFFF));
  color: var(--tl-ink, var(--text, #17191D));
  font: 500 13px/1 var(--font-ui, system-ui);
  cursor: pointer;
  transition: background-color var(--t-fast, 120ms) ease, border-color var(--t-fast, 120ms) ease;
}
.lm-publish-btn:hover { background: var(--tl-panel-2, var(--panel-2, #F1EFFA)); border-color: var(--tl-line-strong, var(--line-strong)); }
.lm-publish-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.lm-publish-hint { color: var(--tl-faint, var(--faint)); font-size: 12px; }

.lm-compose-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 19, 24, .44);
}
.lm-compose {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow: hidden;
  border: 1px solid var(--tl-line, var(--line, #E6E4F2));
  border-radius: var(--r-lg, 16px);
  background: var(--tl-panel, var(--panel, #FFFFFF));
  box-shadow: var(--shadow-2, 0 12px 32px rgba(20, 20, 30, .18));
}
.lm-compose-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 10px; }
.lm-compose-head h2 { flex: 1; margin: 0; color: var(--tl-ink, var(--text)); font-size: 16px; font-weight: 600; }
.lm-compose-x { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm, 8px); background: transparent; color: var(--tl-muted, var(--muted)); cursor: pointer; }
.lm-compose-x:hover { background: var(--tl-panel-2, var(--panel-2)); color: var(--tl-ink, var(--text)); }
.lm-compose-x svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lm-compose-tabs { display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--tl-line-soft, var(--line-soft, #EFEDF8)); }
.lm-compose-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--tl-muted, var(--muted));
  font: 500 13px/1 var(--font-ui, system-ui);
  cursor: pointer;
}
.lm-compose-tab svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.lm-compose-tab.is-on { color: var(--tl-ink, var(--text)); border-bottom-color: var(--tl-ink, var(--text)); }
.lm-compose-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px; overflow-y: auto; }
.lm-field { display: flex; flex-direction: column; gap: 6px; }
.lm-field-label { color: var(--tl-muted, var(--muted)); font-size: 12px; }
.lm-input, .lm-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid var(--tl-line, var(--line));
  border-radius: var(--r-sm, 8px);
  background: var(--tl-panel, var(--panel));
  color: var(--tl-ink, var(--text));
  font: 400 14px/1.55 var(--font-ui, system-ui);
  outline: none;
}
.lm-input:focus, .lm-textarea:focus { border-color: var(--accent, #4B4FA8); }
.lm-textarea { resize: vertical; min-height: 72px; }
.lm-textarea--md { min-height: 180px; font-family: var(--font-mono, monospace); font-size: 13px; line-height: 1.65; }
.lm-file { color: var(--tl-muted, var(--muted)); font-size: 12.5px; }
.lm-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.lm-preview { position: relative; width: 76px; height: 76px; overflow: hidden; border: 1px solid var(--tl-line, var(--line)); border-radius: var(--r-sm, 8px); background: var(--tl-panel-2, var(--panel-2)); }
.lm-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lm-preview-x { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 999px; background: rgba(18, 19, 22, .68); color: #FFFFFF; cursor: pointer; }
.lm-preview-x svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; }
.lm-compose-note { margin: 0; padding: 8px 10px; border-radius: var(--r-sm, 8px); background: var(--tl-panel-2, var(--panel-2)); color: var(--tl-muted, var(--muted)); font-size: 12px; line-height: 1.55; }
.lm-compose-status { min-height: 16px; margin: 0; color: var(--tl-muted, var(--muted)); font-size: 12.5px; }
.lm-compose-status[data-tone="err"] { color: var(--danger, #B42318); }
.lm-compose-status[data-tone="ok"] { color: var(--ok, #2E7D4F); }
.lm-compose-status[data-tone="warn"] { color: var(--warn-strong, #8A5A00); }
.lm-compose-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--tl-line-soft, var(--line-soft)); }
.lm-compose-cost { flex: 1; color: var(--tl-faint, var(--faint)); font-size: 12px; }
.lm-btn { height: var(--ctl-md, 36px); padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-sm, 8px); background: var(--tl-ink, var(--text, #17191D)); color: var(--tl-panel, #FFFFFF); font: 500 13px/1 var(--font-ui, system-ui); cursor: pointer; }
.lm-btn:disabled { opacity: .5; cursor: default; }
.lm-btn--quiet { background: transparent; border-color: var(--tl-line, var(--line)); color: var(--tl-text-2, var(--text-2, #3B4048)); }

.lm-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 95;
  transform: translate(-50%, 8px);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(18, 19, 22, .9);
  color: #FFFFFF;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-enter, 200ms) ease, transform var(--t-enter, 200ms) ease;
}
.lm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .lm-compose-scrim { padding: 12px; align-items: flex-end; }
  .lm-compose { max-height: calc(100dvh - 24px); }
  .lm-compose-tabs { overflow-x: auto; }
}

/* ══════════════════════════════════════════════════════════════
   6. 站内文章页（/media/<articleId>，独立 HTML）
   ══════════════════════════════════════════════════════════════ */

body.lm-article-page {
  margin: 0;
  background: var(--bg, #F6F5FC);
  color: var(--text, #17191D);
  font-family: var(--font-ui, system-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.lm-read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 2px; background: transparent; }
.lm-read-progress i { display: block; width: 0; height: 100%; background: var(--text, #17191D); transition: width 60ms linear; }
.lm-art-top {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft, #EFEDF8);
  font-size: 13px;
}
.lm-art-back { color: var(--muted, #737B85); text-decoration: none; }
.lm-art-back:hover { color: var(--text, #17191D); }
.lm-art-brand { flex: 1; text-align: center; color: var(--text, #17191D); font-weight: 600; letter-spacing: .02em; }
.lm-art-export {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line, #E6E4F2);
  border-radius: 999px;
  color: var(--text-2, #3B4048);
  font-size: 12.5px;
  text-decoration: none;
  background: var(--panel, #FFFFFF);
}
.lm-art-export:hover { border-color: var(--line-strong, #D8D5EA); }
.lm-art-kicker { color: var(--muted, #737B85); font-size: 12.5px; }

.lm-art-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 56px;
  max-width: 1020px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}
.lm-art { min-width: 0; }
.lm-art-cover { margin: 0 0 30px; overflow: hidden; border: 1px solid var(--line-soft, #EFEDF8); border-radius: var(--r-lg, 16px); background: var(--panel-2, #F1EFFA); }
.lm-art-cover img { display: block; width: 100%; height: auto; }
.lm-art-title { margin: 0 0 14px; color: var(--text, #17191D); font-size: clamp(28px, 3.6vw, 38px); font-weight: 650; line-height: 1.24; letter-spacing: -.01em; }
.lm-art-dek { margin: 0 0 18px; color: var(--muted, #737B85); font-size: 17px; line-height: 1.72; }
.lm-art-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 20px; margin-bottom: 30px; border-bottom: 1px solid var(--line-soft, #EFEDF8); color: var(--faint, #9AA1AA); font-size: 13px; }
.lm-art-author { color: var(--text-2, #3B4048); font-weight: 500; }
.lm-dot { color: var(--faint, #9AA1AA); }
.lm-art-body { color: var(--text, #17191D); font-size: 16px; line-height: 1.88; }
.lm-art-body p { margin: 0 0 18px; }
.lm-art-body h2 { margin: 44px 0 14px; font-size: 24px; font-weight: 650; line-height: 1.35; scroll-margin-top: 24px; }
.lm-art-body h3 { margin: 32px 0 10px; font-size: 19px; font-weight: 600; line-height: 1.4; }
.lm-art-body h4 { margin: 24px 0 8px; font-size: 16.5px; font-weight: 600; line-height: 1.45; }
.lm-art-body ul, .lm-art-body ol { margin: 0 0 18px; padding-left: 1.4em; }
.lm-art-body li { margin: 4px 0; }
.lm-art-body blockquote { margin: 0 0 18px; padding: 2px 0 2px 16px; border-left: 2px solid var(--line-strong, #D8D5EA); color: var(--muted, #737B85); }
.lm-art-body pre { margin: 0 0 18px; padding: 14px 16px; overflow-x: auto; border-radius: var(--r, 12px); background: var(--panel-2, #F1EFFA); font-family: var(--font-mono, monospace); font-size: 13px; line-height: 1.65; }
.lm-art-body code { padding: 1px 5px; border-radius: 4px; background: var(--panel-2, #F1EFFA); font-family: var(--font-mono, monospace); font-size: .9em; }
.lm-art-body pre code { padding: 0; background: transparent; }
.lm-art-body table { width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 14px; }
.lm-art-body th, .lm-art-body td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft, #EFEDF8); text-align: left; }
.lm-art-body th { color: var(--text-2, #3B4048); font-weight: 600; }
.lm-art-body a { color: var(--text, #17191D); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong, #D8D5EA); }
.lm-art-body a:hover { text-decoration-color: var(--text, #17191D); }
.lm-art-body hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line-soft, #EFEDF8); }
.lm-cite { color: var(--muted, #737B85); font-size: .82em; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.lm-cite:hover { color: var(--text); }

.lm-art-sources { margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line-soft, #EFEDF8); }
.lm-art-sources-title { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.lm-src-list { margin: 0; padding: 0; list-style: none; color: var(--muted, #737B85); font-size: 13px; line-height: 1.7; }
.lm-src-list li { display: flex; gap: 8px; padding: 5px 0; }
.lm-src-num { flex: none; color: var(--faint, #9AA1AA); font-variant-numeric: tabular-nums; }
.lm-src-list a { color: var(--muted, #737B85); word-break: break-all; }
.lm-src-note { color: var(--faint, #9AA1AA); }
.lm-art-foot { margin-top: 48px; color: var(--faint, #9AA1AA); font-size: 12.5px; }

.lm-art-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  color: var(--muted, #737B85);
  font-size: 13px;
}
.lm-toc-title { margin: 0 0 8px; color: var(--faint, #9AA1AA); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.lm-toc-list { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line-soft, #EFEDF8); }
.lm-toc-list li a { display: block; margin-left: -1px; padding: 4px 0 4px 12px; border-left: 2px solid transparent; color: var(--muted, #737B85); text-decoration: none; line-height: 1.45; }
.lm-toc-list li a:hover { color: var(--text, #17191D); border-left-color: var(--line-strong, #D8D5EA); }
.lm-toc-lv3 a { padding-left: 24px; }
.lm-toc-lv4 a { padding-left: 36px; font-size: 12px; }
.lm-toc-sources { margin-top: 8px; }
.lm-toc-note { margin: 14px 0 0; color: var(--faint, #9AA1AA); font-size: 11.5px; line-height: 1.5; }

@media (max-width: 900px) {
  .lm-art-layout { display: flex; flex-direction: column; gap: 0; padding: 24px 16px 64px; }
  .lm-art-toc { order: -1; position: static; max-height: none; margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--line-soft, #EFEDF8); border-radius: var(--r, 12px); background: var(--panel, #FFFFFF); }
  .lm-toc-list { border-left: 0; }
  .lm-toc-list li a { padding-left: 0; border-left: 0; }
  .lm-toc-lv3 a { padding-left: 14px; }
  .lm-toc-lv4 a { padding-left: 28px; }
  .lm-art-top { padding: 12px 16px; }
  .lm-art-brand { display: none; }
  .lm-art-title { font-size: 28px; }
  .lm-art-dek { font-size: 15.5px; }
  .lm-art-body { font-size: 15.5px; }
}

/* ══════════════════════════════════════════════════════════════
   7. 外链视频播放页（/media/<videoId>，独立 HTML）
   ══════════════════════════════════════════════════════════════ */

.lm-video-page { max-width: 920px; margin: 0 auto; padding: 32px 24px 80px; }
.lm-video-title { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); font-weight: 650; line-height: 1.3; }
.lm-video-meta { margin: 0 0 20px; color: var(--faint, #9AA1AA); font-size: 13px; }
.lm-video-stage { position: relative; overflow: hidden; margin: 0 0 16px; border-radius: var(--r-lg, 16px); background: #101113; aspect-ratio: 16 / 9; }
.lm-video-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #101113; }
.lm-embed { position: absolute; inset: 0; }
.lm-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.lm-video-src { margin: 0; color: var(--faint, #9AA1AA); font-size: 12px; word-break: break-all; }
.lm-video-src a { color: var(--muted, #737B85); }

@media (max-width: 560px) {
  .lm-video-page { padding: 20px 12px 56px; }
}

/* 深色主题下视频舞台与 lightbox 保持黑底；其余靠令牌自动翻转 */
body.v5.dark .lm-lb { background: rgba(6, 7, 9, .95); }
body.v5.dark .lm-lb-img { background: #17191D; }

/* 视频时长懒探测：挂一个不可见容器让 Chrome 真的去读元数据（detached video 可能不加载） */
.lm-duration-probe { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
