/* ==========================================================
   晨報 · 影音样式 + 彩色图片开关
   ========================================================== */

/* ---------- 彩色开关：image.color = true 时保留原色 ---------- */
.ht.color img { filter: none; mix-blend-mode: normal; opacity: 1; }
.ht.has-img.color::before { display: none; }
:root[data-theme="dark"] .ht.color img { opacity: .92; }

/* ---------- 视频 ---------- */
.vd-h { margin-bottom: 4px; }
.vd { position: relative; aspect-ratio: var(--ar, 16 / 9); background: #000; margin-top: 12px; }
.vd-cover { position: absolute; inset: 0; display: block; width: 100%; cursor: pointer; overflow: hidden; }
.vd-cover .fig { margin: 0; height: 100%; }
.vd-cover .ht { aspect-ratio: auto; height: 100%; }
.vd-cover .ht img { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.vd-cover:hover .ht img { transform: scale(1.04); }
.vd-play {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; transform: translate(-50%, -50%); z-index: 3;
  border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--paper) 70%, transparent), 0 14px 34px -10px rgba(0, 0, 0, .55);
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.vd-play svg { width: 36px; height: 36px; fill: currentColor; margin-left: 5px; }
.vd-cover:hover .vd-play { transform: translate(-50%, -50%) scale(1.1); }
.vd-play::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); animation: pulseRing 2.2s ease-out infinite; }
@keyframes pulseRing { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.vd-dur, .vd-src { position: absolute; z-index: 3; font: 700 11px var(--mono); letter-spacing: .08em; padding: 4px 8px; }
.vd-dur { right: 10px; bottom: 10px; background: var(--ink); color: var(--paper); }
.vd-src { left: 10px; top: 10px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }
.vd video, .vd iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; display: block; }
.vd-cap { display: flex; justify-content: space-between; gap: 12px; font: 400 12px/1.5 var(--sans); color: var(--ink-2); padding: 8px 0; border-bottom: 1px solid var(--hair); }
.vd-cap em { font: 400 11px var(--mono); font-style: normal; color: var(--ink-3); white-space: nowrap; }

/* ---------- 图集 ---------- */
.gl { display: grid; gap: 8px; }
.gl.mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; grid-auto-flow: dense; }
.gl.mosaic .gl-it:first-child { grid-column: span 2; grid-row: span 2; }
.gl.grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 180px; }
.gl.strip { grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); grid-auto-rows: 260px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.gl.strip .gl-it { scroll-snap-align: start; }
.gl-it { position: relative; overflow: hidden; display: block; width: 100%; height: 100%; cursor: zoom-in; border: 1px solid var(--ink); text-align: left; }
.gl-it .fig { margin: 0; height: 100%; }
.gl-it .ht { aspect-ratio: auto; height: 100%; }
.gl-it .ht img { transition: transform .9s cubic-bezier(.2, .8, .2, 1), filter .6s; }
.gl-it:hover .ht img { transform: scale(1.06); }
.gl-it:not(:has(.color)):hover .ht img { filter: grayscale(0) contrast(1.05); }
.gl-it:hover .ht.has-img::before { opacity: 0; transition: opacity .6s; }
.gl-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 26px 12px 9px;
  font: 600 12.5px/1.45 var(--sans); color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  transform: translateY(30%); opacity: .0; transition: .35s;
}
.gl-it:hover .gl-cap, .gl-it:focus-visible .gl-cap { transform: none; opacity: 1; }
.gl-it:first-child .gl-cap { opacity: 1; transform: none; font-size: 14px; }
.gl-n { position: absolute; left: 8px; top: 8px; z-index: 3; font: 900 italic 13px var(--display); background: var(--paper); color: var(--ink); padding: 1px 6px; }
.gl-zoom { position: absolute; right: 8px; top: 8px; z-index: 3; width: 26px; height: 26px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 13px; opacity: 0; transition: .25s; }
.gl-it:hover .gl-zoom { opacity: 1; }

/* ---------- 大图浮层 ---------- */
.lbx { position: fixed; inset: 0; z-index: 150; background: rgba(10, 9, 7, .94); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; animation: fade .3s both; }
.lbx[hidden] { display: none; }
body.lbx-open { overflow: hidden; }
.lbx figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; padding: 48px 0 20px; min-width: 0; }
.lbx-img { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.lbx-img img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 20px 60px -20px #000; animation: pop .35s cubic-bezier(.2, 1.2, .4, 1); }
.lbx-img .fig { width: min(900px, 100%); margin: 0; }
.lbx figcaption { display: flex; gap: 18px; justify-content: space-between; width: min(900px, 100%); color: #e9e1cf; font: 400 14px/1.6 var(--sans); padding-top: 14px; }
.lbx figcaption em { font: 500 12px var(--mono); font-style: normal; color: #8f8a7c; white-space: nowrap; }
.lbx-a, .lbx-x { color: #e9e1cf; font: 300 46px/1 var(--display); width: 48px; height: 48px; border-radius: 50%; justify-self: center; transition: .2s; }
.lbx-a:hover, .lbx-x:hover { background: var(--accent); color: #fff; }
.lbx-x { position: absolute; right: 14px; top: 10px; font: 400 20px var(--sans); }

/* ---------- 音频 ---------- */
.au { border: 1.5px solid var(--rule); padding: 14px; background: var(--paper); box-shadow: 5px 5px 0 var(--ink); }
.au-top { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; }
.au-art { border: 1px solid var(--ink); position: relative; }
.au-art .fig { margin: 0; }
.au-art .ht-label { display: none; }
.au.playing .au-art .sun { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.au-meta small { font: 700 10.5px var(--sans); letter-spacing: .16em; color: var(--accent); }
.au-meta .h3 { margin-top: 2px; line-height: 1.35; }
.au-meta p { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.au-ctl { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; margin-top: 14px; }
.au-pp { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; transition: .2s; }
.au-pp svg { width: 20px; height: 20px; fill: currentColor; }
.au-pp:hover { background: var(--accent); color: var(--accent-ink); }
.au-wave { height: 40px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.au-wave i { flex: 1; height: var(--h); min-height: 3px; background: var(--ink-3); opacity: .45; border-radius: 1px; transition: background .2s, opacity .2s; }
.au-wave i.on { background: var(--accent); opacity: 1; }
.au.playing .au-wave i.on:last-of-type, .au.playing .au-wave i.on:has(+ i:not(.on)) { animation: eq .5s ease-in-out infinite alternate; }
@keyframes eq { to { transform: scaleY(.6); } }
.au-wave:hover i { opacity: .7; }
.au-bot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.au-t { font: 500 12px var(--mono); color: var(--ink-3); }
.au-t b { color: var(--ink); }
.au-sp { font: 700 11px var(--mono); border: 1px solid var(--rule); padding: 2px 8px; border-radius: 10px; }
.au-sp:hover { background: var(--ink); color: var(--paper); }
.au-ch { list-style: none; margin-top: 10px; border-top: 1px solid var(--hair); }
.au-ch button { display: grid; grid-template-columns: 46px 1fr; gap: 8px; width: 100%; text-align: left; padding: 7px 0; border-bottom: 1px dotted var(--hair); font-size: 13px; line-height: 1.45; }
.au-ch button:hover { color: var(--accent); }
.au-ch time { font: 700 11.5px var(--mono); color: var(--ink-3); padding-top: 1px; }
.au-ch button.now { color: var(--accent); }
.au-ch button.now time { color: var(--accent); }
.au-ch button.now time::before { content: "▶ "; font-size: 8px; vertical-align: 1px; }

@media (max-width: 760px) {
  .gl.mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
  .gl-cap { opacity: 1; transform: none; font-size: 11px; padding: 18px 8px 6px; }
  .lbx { grid-template-columns: 40px 1fr 40px; }
  .lbx-a { width: 36px; height: 36px; font-size: 34px; }
  .vd-play { width: 64px; height: 64px; }
  .vd-play svg { width: 28px; height: 28px; }
}
