/*
Theme Name: RAVO Deck
Theme URI: https://ravo.run/
Author: Team Cockatoo
Description: 全屏卡片堆叠的影院模式：滚轮/滑动无限翻页，保留网格模式作为第二视图。
Version: 1.0.0
Requires at least: 5.5
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ravo
*/

/* ---------- 基础 ---------- */
:root {
  --bg: #07080a;
  --bg-2: #0b0d11;
  --surface: #12151b;
  --surface-2: #181c23;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f5f7;
  --text-soft: #c9d0d7;
  --muted: #939da8;
  --accent: #c9f24d;
  --accent-ink: #0a0c05;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1400px;
  --pad: 28px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- 页头 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
body.nav-open .site-header {
  background: linear-gradient(180deg, rgba(5, 6, 8, 0.88) 0%, rgba(5, 6, 8, 0.58) 62%, rgba(5, 6, 8, 0.12) 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

/* 登录状态避开 WordPress 管理工具栏 */
body.admin-bar .site-header { top: 32px; }

@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(201, 242, 77, 0.75);
  flex: none;
}

.brand__text { display: flex; flex-direction: column; line-height: 1; }

.brand__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand__sub {
  margin-top: 5px;
  font-size: 8.5px;
  letter-spacing: 0.32em;
  color: var(--muted);
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu li { position: relative; }

.primary-menu a {
  position: relative;
  display: block;
  padding: 6px 0;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.primary-menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.primary-menu a:hover { color: #fff; }
.primary-menu a:hover::after { transform: scaleX(1); }

.primary-menu .menu-item:last-child a {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
}

.primary-menu .menu-item:last-child a::after { display: none; }
.primary-menu .menu-item:last-child a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  margin: 3.5px auto;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 100vw);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--header-h) + 72px) var(--pad) 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-color: #0d1015;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  animation: hero-zoom 18s var(--ease) forwards;
}

.hero__media--empty {
  background: radial-gradient(120% 90% at 70% 10%, #1b2430 0%, #0a0c10 55%, #07080a 100%);
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 8, 10, 0.72) 0%, rgba(7, 8, 10, 0.12) 34%, rgba(7, 8, 10, 0.9) 88%, var(--bg) 100%),
    linear-gradient(90deg, rgba(7, 8, 10, 0.65) 0%, rgba(7, 8, 10, 0.05) 60%);
}

@keyframes hero-zoom {
  from { transform: scale(1.09); }
  to { transform: scale(1.0); }
}

.hero__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.hero__eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(201, 242, 77, 0.8);
}

.hero__title {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(46px, 7.2vw, 100px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__desc {
  max-width: 520px;
  margin: 24px 0 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.hero__latest {
  margin: 30px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
}

.hero__latest strong {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.hero__inner > * {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) forwards;
}
.hero__inner > *:nth-child(1) { animation-delay: 0.1s; }
.hero__inner > *:nth-child(2) { animation-delay: 0.18s; }
.hero__inner > *:nth-child(3) { animation-delay: 0.26s; }
.hero__inner > *:nth-child(4) { animation-delay: 0.34s; }
.hero__inner > *:nth-child(5) { animation-delay: 0.42s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn__icon {
  display: inline-flex;
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(201, 242, 77, 0.28);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* ---------- 影像区 ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px var(--pad) 110px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section__head h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section__count {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.section__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.section__tools .section__count { margin-right: 4px; }

/* 瀑布流 */
.wall {
  column-count: 4;
  column-gap: 16px;
}

@media (max-width: 1200px) { .wall { column-count: 3; } }
@media (max-width: 820px) { .wall { column-count: 2; } }
@media (max-width: 540px) { .wall { column-count: 1; } }

.card {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.card__play {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  line-height: 0;
  cursor: pointer;
  text-align: left;
}

.card__img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.65s var(--ease), filter 0.4s ease;
}

.card__img--empty {
  display: block;
  width: 100%;
  padding-top: 62%;
  background: linear-gradient(135deg, #1a2029, #0d1014 60%);
}

.card__play:hover .card__img { transform: scale(1.045); filter: brightness(0.82); }
.card__play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card__play:hover .card__shade { opacity: 1; }

.card__btn {
  position: absolute;
  left: 50%; top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(10, 12, 15, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.3s var(--ease),
    background 0.25s ease, border-color 0.25s ease;
  pointer-events: none;
}

.card__btn::before {
  content: "";
  display: block;
  width: 0; height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #fff;
  transition: border-color 0.25s ease;
}

.card__play:hover .card__btn,
.card__play:focus-visible .card__btn {
  opacity: 1;
  transform: scale(1);
}

.card__play:hover .card__btn {
  background: var(--accent);
  border-color: var(--accent);
}
.card__play:hover .card__btn::before { border-left-color: var(--accent-ink); }

/* 触屏设备没有 hover，播放按钮常显 */
@media (hover: none) {
  .card__btn {
    opacity: 1;
    transform: scale(1);
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
  }
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 3px 0;
}

.card__title {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card__title:hover { color: var(--accent); }

.card__date {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.wall-empty {
  padding: 60px 0;
  color: var(--muted);
}

/* ---------- 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(3, 4, 6, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lightbox.is-open { display: grid; }

.lightbox__stage { width: min(1160px, 100%); line-height: 0; }

.lightbox__stage video {
  display: block;
  width: 100%;
  max-height: 84vh;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox__close {
  position: absolute;
  top: 22px; right: 22px;
  width: 46px; height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox__close:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; }

/* ---------- 文章 / 单页 ---------- */
.site-main > article.post,
.site-main > article.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 64px) var(--pad) 96px;
}

.post__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.post__eyebrow .sep { color: rgba(255, 255, 255, 0.25); }
.post__eyebrow a { color: var(--accent); text-decoration: none; }

.post__title,
.page__title {
  margin: 0 0 34px;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.page__title { font-size: clamp(32px, 4.4vw, 52px); }

.post__content,
.page__content {
  max-width: 940px;
  color: var(--text-soft);
  font-size: 16.5px;
  line-height: 1.85;
}

.post__content > * + *,
.page__content > * + * { margin-top: 1.25em; }

.post__content h2,
.post__content h3,
.page__content h2,
.page__content h3 {
  margin-top: 1.8em;
  color: var(--text);
  line-height: 1.25;
}

.post__content a,
.page__content a { color: var(--accent); text-underline-offset: 3px; }

.post__content img,
.page__content img { border-radius: var(--radius-sm); }

.self-url-video { margin: 0 0 36px; }

.self-url-video video {
  display: block;
  width: 100%;
  max-height: 78vh;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.post__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.post__nav a {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.post__nav a:hover { border-color: var(--line-strong); background: var(--surface); }

.post__nav span {
  display: block;
  margin-bottom: 5px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.post__nav strong { font-weight: 500; font-size: 14.5px; color: var(--text-soft); }
.post__nav .next { text-align: right; }

/* ---------- 列表页 ---------- */
.listing { max-width: var(--maxw); margin: 0 auto; padding: calc(var(--header-h) + 64px) var(--pad) 100px; }

.listing__head {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.listing__head h1 { margin: 0; font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.02em; }

.listing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px 22px;
}

.listing__item a { text-decoration: none; }

.listing__item img {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.listing__item h2 {
  margin: 12px 0 4px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.listing__item time { font-size: 12px; color: var(--muted); }

.pagination {
  margin-top: 56px;
  display: flex;
  gap: 10px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
}

.pagination .current,
.pagination a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 404 ---------- */
.error-404 {
  min-height: 78vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) var(--pad) 60px;
}

.error-404__code {
  margin: 0;
  font-size: clamp(90px, 18vw, 220px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.08);
}

.error-404 p { color: var(--muted); margin: 16px 0 28px; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 40px;
  padding: 64px var(--pad) 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg) 0%, #050608 100%);
}

.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.site-footer__name {
  display: block;
  font-size: clamp(56px, 11vw, 150px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.07);
  user-select: none;
}

.site-footer__tag {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-footer__meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: right;
}

.site-footer__meta a { color: var(--text-soft); text-decoration: none; }
.site-footer__meta a:hover { color: var(--accent); }

.site-footer__bottom {
  max-width: var(--maxw);
  margin: 48px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.32);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  :root { --pad: 20px; --header-h: 66px; }

  .nav-toggle { display: block; }

  .primary-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px var(--pad) 26px;
    background: rgba(7, 8, 10, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
  }

  body.nav-open .primary-menu { display: flex; }

  .primary-menu li { border-bottom: 1px solid var(--line); }
  .primary-menu li:last-child { border-bottom: 0; padding-top: 14px; }

  .primary-menu a { padding: 15px 0; font-size: 15px; }
  .primary-menu .menu-item:last-child a { display: inline-block; padding: 9px 16px; }

  .hero { min-height: min(88vh, 100vw); padding-bottom: 56px; }
  .hero__title { max-width: 12ch; }
  .hero__desc { font-size: 14.5px; }

  .section { padding: 44px var(--pad) 72px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 6px; }

  .site-main > article.post,
  .site-main > article.page,
  .listing { padding-top: calc(var(--header-h) + 40px); }
  .post__nav { grid-template-columns: 1fr; }
  .post__nav .next { text-align: left; }

  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .site-footer__meta { justify-items: start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   影院模式（Deck）
   ========================================================= */

body.deck-mode { overflow: hidden; height: 100vh; overscroll-behavior: none; }

.deck__ui,
.deck__now,
.deck__title,
.deck__text,
.deck__stage,
.deck-card,
.deck-card__play { touch-action: none; }

body.deck-mode .site-header,
body.deck-mode .site-header.is-scrolled,
body.deck-mode.nav-open .site-header {
  z-index: 1100;
  background: linear-gradient(180deg, rgba(5, 6, 8, 0.82) 0%, rgba(5, 6, 8, 0.45) 58%, rgba(5, 6, 8, 0) 100%);
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.deck {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #11151b 0%, #07080b 52%, #040506 100%);
  touch-action: none;
  user-select: none;
}

.deck__stage {
  position: absolute;
  inset: 0;
}

/* 当前封面模糊后的页面背景 */
.deck__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(56px) saturate(125%) brightness(0.5);
  transform: scale(1.2);
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

.deck__bg.is-active { opacity: 1; }

.deck__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 30%, rgba(5, 6, 8, 0.15) 0%, rgba(5, 6, 8, 0.55) 60%, rgba(5, 6, 8, 0.9) 100%),
    linear-gradient(180deg, rgba(5, 6, 8, 0.5) 0%, rgba(5, 6, 8, 0.15) 38%, rgba(5, 6, 8, 0.78) 82%, rgba(5, 6, 8, 0.95) 100%);
}

.deck-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86vw, 980px);
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0d11;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: translate(-50%, -50%);
  transition:
    transform 0.55s cubic-bezier(0.22, 0.85, 0.24, 1.04),
    opacity 0.22s ease,
    filter 0.22s ease;
  will-change: transform, opacity, filter;
  cursor: pointer;
}

.deck-card.is-active { cursor: default; }

.deck-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

.deck-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.66) 100%);
  pointer-events: none;
}

/* 静止 2 秒后的原位静音预览 */
.deck-card__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.deck-card.is-active.is-previewing .deck-card__play {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.deck-card.is-previewing::after {
  content: "静音预览 · 点击播放声音";
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.82);
  pointer-events: none;
}

.deck-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(8, 10, 14, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  pointer-events: none;
  cursor: pointer;
  transition:
    opacity 0.25s ease,
    transform 0.3s var(--ease),
    background 0.2s ease,
    border-color 0.2s ease;
}

.deck-card__play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
  transition: border-color 0.2s ease;
}

.deck-card.is-active .deck-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.deck-card__play:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.deck-card__play:hover::before { border-left-color: var(--accent-ink); }

.deck__ui {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1050;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 0 var(--pad) 56px;
  pointer-events: none;
}

.deck__ui > * { pointer-events: auto; }

.deck__now {
  max-width: min(58ch, 980px);
  transition: opacity 0.22s ease, transform 0.35s var(--ease);
}

.deck__now.is-changing {
  opacity: 0;
  transform: translateY(12px);
}

.deck__count {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.deck__title {
  margin: 9px 0 0;
  font-size: clamp(21px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.deck__text {
  max-width: 58ch;
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.deck__meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.deck__date {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.deck__switch {
  display: inline-flex;
  align-items: center;
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.deck__switch:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(8, 10, 14, 0.7);
}

.deck__hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 1050;
  transform: translateX(-50%);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.deck__hint.is-hidden { opacity: 0; }

.deck__noscript {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1060;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.deck__links { position: absolute; }

/* 网格模式 */
.gridview {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--header-h) + 56px) var(--pad) 100px;
}

.gridview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.gridview__eyebrow {
  margin: 0 0 8px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.gridview__head h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.gridview__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 860px) {
  .deck-card { width: 88vw; border-radius: 12px; }

  .deck__ui {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
  }

  .deck__title { font-size: 20px; }
  .deck__text { font-size: 13px; line-height: 1.6; }
  .deck__hint { display: none; }
  .deck-card__play { width: 58px; height: 58px; }
  .deck-card__play::before { border-width: 7px 0 7px 12px; }

  .lightbox { padding: 14px; }
}

/* 手机竖屏：hero 高度不超过宽度，横图不会被裁得只剩局部 */
@media (max-width: 640px) {
  .hero {
    padding-top: calc(var(--header-h) + 28px);
    padding-bottom: 28px;
  }

  .hero__eyebrow { margin-bottom: 14px; }
  .hero__title { font-size: clamp(30px, 9vw, 42px); }
  .hero__desc { display: none; }
  .hero__latest { display: none; }
  .hero__actions { margin-top: 20px; gap: 10px; }
  .hero .btn { padding: 11px 18px; font-size: 13px; }
}

/* 矮屏 / 手机横屏：卡片同时受视口高度约束，层叠间距由 deck.js 同步缩小 */
@media (max-height: 560px) {
  .deck-card {
    top: 54%;
    width: min(72vw, calc((100vh - 190px) * 1.7778));
    border-radius: 10px;
  }

  .deck__ui {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
  }

  .deck__now { max-width: 62%; }
  .deck__count { font-size: 10px; letter-spacing: 0.18em; }

  .deck__title {
    margin-top: 6px;
    font-size: 18px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .deck__text { display: none; }
  .deck__hint { display: none; }
  .deck__switch { padding: 7px 12px; font-size: 11px; }
  .deck-card__play { width: 48px; height: 48px; }
  .deck-card__play::before { border-width: 6px 0 6px 10px; }
}

/* 竖屏把整叠卡片上移，给底部标题和正文留出空间 */
@media (orientation: portrait) and (max-width: 1024px) {
  .deck-card { top: 44%; }
}

/* 平板横屏：卡片不再按桌面最大宽度铺开 */
@media (orientation: landscape) and (min-width: 861px) and (max-width: 1366px) and (min-height: 561px) {
  .deck-card {
    width: min(70vw, 880px, calc((100vh - 200px) * 1.7778));
  }

  .deck__now {
    max-width: min(58ch, 70vw, 880px);
  }
}

@media (max-width: 860px) {
  .deck__bg { filter: blur(18px) saturate(125%) brightness(0.5); }
}

/* 手机/小平板竖屏：标题与正文紧贴封面下方 */
@media (orientation: portrait) and (max-width: 860px) {
  .deck__ui {
    top: calc(44% + 24.75vw + 32px);
    bottom: auto;
    left: 50%;
    right: auto;
    width: 88vw;
    transform: translateX(-50%);
    display: block;
    padding: 0;
    pointer-events: none;
  }

  .deck__now {
    max-width: 100%;
    pointer-events: auto;
  }

  .deck__text {
    -webkit-line-clamp: 3;
  }
}

/* 较高的竖屏手机：正文最多显示四行 */
@media (orientation: portrait) and (max-width: 860px) and (min-height: 760px) {
  .deck__text { -webkit-line-clamp: 4; }
}