/* ============================================================
 * 官网 v5 · 视频窗口样式
 * 2026-11-15
 * 沿用母版纸墨体系：--paper / --ink / --cinnabar / --gold / --line
 * 不改动母版任何既有样式，仅新增 .vid-* 类。
 * ============================================================ */

.videos .vid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 56px;
}

.vid-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .42);
  text-align: left;
  padding: 0;
  cursor: pointer;
  transition: border-color .3s ease, transform .35s var(--ease-out), background .3s ease;
  font: inherit;
  color: inherit;
}

.vid-card:hover {
  border-color: rgba(179, 73, 46, .38);
  transform: translateY(-2px);
  background: rgba(179, 73, 46, .04);
}

.vid-card:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 3px;
}

.vid-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #26241d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .88;
}

.vid-play-ico {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(247, 243, 234, .55);
  background: rgba(38, 36, 29, .34);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s var(--ease-out), background .3s ease;
  pointer-events: none;
}

.vid-card:hover .vid-play-ico {
  transform: scale(1.08);
  background: rgba(179, 73, 46, .72);
}

.vid-play-ico svg { width: 20px; height: 20px; margin-left: 3px; }

.vid-dr {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 8px;
  font-size:var(--fs-xs);
  letter-spacing: .04em;
  color: #f7f3ea;
  background: rgba(38, 36, 29, .62);
  border-radius: 2px;
}

.vid-meta { display: block; padding: 20px 22px 22px; }

.vid-tag {
  display: inline-block;
  font-size:var(--fs-xs);
  letter-spacing: .12em;
  color: var(--cinnabar);
  border: 1px solid rgba(179, 73, 46, .3);
  padding: 2px 8px;
  margin-bottom: 10px;
}

.vid-title {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}

.vid-note {
  display: block;
  font-size:var(--fs-sm);
  line-height: 1.7;
  color: rgba(38, 36, 29, .62);
  margin: 8px 0 0;
}

/* 空态：窗口已就位，不留破图 */
.vid-empty {
  margin-top: 56px;
  border: 1px dashed rgba(38, 36, 29, .22);
  background: rgba(255, 255, 255, .3);
}

.vid-empty-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
}

.vid-empty-ico {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(38, 36, 29, .22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vid-empty-ico svg { width: 18px; height: 18px; margin-left: 2px; }

.vid-empty-title {
  font-family: var(--serif);
  font-size:var(--fs-xl);
  color: var(--ink);
  margin: 0;
}

.vid-empty-sub {
  font-size:var(--fs-sm);
  line-height: 1.7;
  color: rgba(38, 36, 29, .58);
  margin: 0;
  max-width: 34em;
}

.vid-empty-sub a {
  color: var(--cinnabar);
  text-decoration: none;
  border-bottom: 1px solid rgba(179, 73, 46, .35);
}

.vid-foot {
  margin-top: 26px;
  font-size:var(--fs-xs);
  line-height: 1.7;
  color: rgba(38, 36, 29, .68);
}

/* 弹层播放器 */
.vid-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 18, 14, .82);
}

.vid-modal[hidden] { display: none; }

.vid-modal-box {
  width: min(960px, 100%);
  background: #1c1a15;
  border: 1px solid rgba(247, 243, 234, .18);
  position: relative;
}

.vid-modal-box video,
.vid-modal-box iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.vid-modal-title {
  font-family: var(--serif);
  font-size:var(--fs-base);
  color: rgba(247, 243, 234, .82);
  margin: 0;
  padding: 12px 52px 12px 16px;
  border-top: 1px solid rgba(247, 243, 234, .1);
}

.vid-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(247, 243, 234, .28);
  background: rgba(28, 26, 21, .7);
  color: #f7f3ea;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vid-close:hover { background: rgba(179, 73, 46, .8); }

body.vid-open { overflow: hidden; }

@media (max-width: 860px) {
  .videos .vid-grid { grid-template-columns: 1fr; gap: 22px; margin-top: 36px; }
  .vid-empty { margin-top: 36px; }
  .vid-empty-frame { aspect-ratio: 16 / 10; }
  .vid-meta { padding: 16px 18px 18px; }
  .vid-title { font-size:var(--fs-lg); }
}

@media (prefers-reduced-motion: reduce) {
  .vid-card, .vid-play-ico { transition: none; }
  .vid-card:hover { transform: none; }
}

/* ------------------------------------------------------------
 * 竖屏条目（9:16）· 2026-11-27 加
 * 起因：品牌主题曲 MV 是 1080×1920 竖版，若塞进 16:9 卡片会被
 *       cover 裁掉大半画面，弹层里也会左右留黑边。
 * 做法：条目带 v.vertical 时，卡片与弹层改走竖版比例，其余不动。
 * ------------------------------------------------------------ */
.vid-card.is-vertical { max-width: 320px; }

.vid-card.is-vertical .vid-thumb { aspect-ratio: 9 / 16; }

/* 竖版条目在场时，网格改为一列 320px 并居中，避免右侧一大片空 */
.videos .vid-grid:has(.vid-card.is-vertical) {
  grid-template-columns: repeat(auto-fit, 320px);
  justify-content: center;
  gap: 32px;
}

/* 竖版封面自带歌名，播放键移到右下角，别压住字 */
.vid-card.is-vertical .vid-play-ico {
  inset: auto auto 12px 12px;
  margin: 0;
  width: 46px;
  height: 46px;
}

.vid-modal-box.is-vertical {
  width: auto;
  max-width: calc(100vw - 48px);
}

.vid-modal-box.is-vertical video {
  width: auto;
  height: min(82vh, 780px);
  max-width: calc(100vw - 48px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .vid-card.is-vertical { max-width: 300px; }
  .vid-modal-box.is-vertical { width: 100%; max-width: 100%; }
  .vid-modal-box.is-vertical video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
  }
}
