/* ==========================================================================
   青衿纪念册 · 前台样式
   登录页 / 教师寄语首屏 / 首页板块 / 媒体卡片 / 查看器
   ========================================================================== */

/* =========================================================
   一、登录页
   ========================================================= */
.cm-page--login {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  color: #fff;
  padding: clamp(20px, 4vw, 56px);
  overflow-x: clip;
}

.bubbles { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.bubbles span {
  position: absolute;
  bottom: -18vh;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .5), rgba(255, 255, 255, .06) 60%, transparent);
  border: 1px solid rgba(255, 255, 255, .16);
  animation: floatUp 22s linear infinite;
  animation-delay: var(--d);
  filter: blur(.4px);
}

@keyframes floatUp {
  0%   { transform: translateY(0) scale(.85); opacity: 0; }
  12%  { opacity: .75; }
  88%  { opacity: .55; }
  100% { transform: translateY(-125vh) scale(1.15); opacity: 0; }
}

.login-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 84px);
  align-items: center;
  max-width: 1180px;
  width: 100%;
  margin: auto;
}

/* 浏览模式下来到登录页时的说明 */
.login-card__note {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.85;
  text-align: left;
  color: rgba(13, 43, 42, .78);
  background: rgba(255, 207, 122, .18);
  border: 1px solid rgba(255, 180, 60, .35);
}
.login-card__note b { color: #8a5a00; }

/* 浏览模式下来到登录页时的返回入口 */
.login-back {
  position: absolute;
  left: 0;
  top: -48px;
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .42em 1em;
  border-radius: 999px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  transition: background .3s ease, color .3s ease, transform .3s var(--ease);
}
.login-back:hover { background: rgba(255, 255, 255, .2); color: #fff; transform: translateX(-3px); }

@media (max-width: 900px) {
  .login-back { position: static; justify-self: start; margin-bottom: 12px; }
}

.login-card {
  border-radius: calc(var(--radius) + 10px);
  padding: clamp(26px, 3.4vw, 44px);
  color: var(--ink);
  animation: cardIn .95s var(--ease) both;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -40% -60% auto auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle, color-mix(in srgb, var(--c-accent) 45%, transparent), transparent 65%);
  opacity: .5;
  pointer-events: none;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(34px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.login-card__head { text-align: left; margin-bottom: 22px; }

.login-logo {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(140deg, var(--c-primary), var(--c-violet));
  box-shadow: 0 16px 34px -16px color-mix(in srgb, var(--c-primary) 90%, black);
  margin-bottom: 16px;
  animation: logoPop .8s var(--ease) both .1s;
}

@keyframes logoPop {
  from { opacity: 0; transform: rotate(-18deg) scale(.5); }
  to { opacity: 1; transform: none; }
}

.login-card__kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: color-mix(in srgb, var(--c-primary) 80%, black);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.login-card__title { font-size: clamp(24px, 3.6vw, 31px); line-height: 1.25; letter-spacing: -.01em; }
.login-card__sub { color: var(--ink-3); font-size: 14px; margin-top: 8px; }

.login-form { margin-top: 6px; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; flex-wrap: wrap; }
.login-hint { font-size: 12.5px; color: var(--ink-3); }
.login-foot { margin-top: 16px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.login-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 22%, transparent); }

.login-side { color: #fff; animation: sideIn 1s var(--ease) both .18s; }
@keyframes sideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

.login-side__title {
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1.16;
  letter-spacing: -.02em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
  background: linear-gradient(100deg, #fff 15%, #ffe9f3 45%, #d8fff8 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-side__desc { margin-top: 12px; font-size: clamp(14px, 1.5vw, 17px); color: rgba(255, 255, 255, .82); }

.login-side__list { margin-top: 26px; display: grid; gap: 12px; }
.login-side__list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; color: rgba(255, 255, 255, .9);
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  animation: sideIn .9s var(--ease) both;
}
.login-side__list li:nth-child(1) { animation-delay: .3s; }
.login-side__list li:nth-child(2) { animation-delay: .42s; }
.login-side__list li:nth-child(3) { animation-delay: .54s; }
.login-side__list b {
  font-size: 12px; padding: 2px 9px; border-radius: 999px; color: #06302c;
  background: linear-gradient(120deg, #9df3e6, #d6f7c9);
}

.login-side__admin {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 26px; font-size: 13.5px; font-weight: 700;
  color: rgba(255, 255, 255, .92);
  padding: 9px 18px; border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, .45);
  transition: gap .3s var(--ease), background .3s ease;
}
.login-side__admin:hover { gap: 12px; background: rgba(255, 255, 255, .12); }

.login-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 34px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .62);
}

@media (max-width: 980px) {
  .login-wrap { grid-template-columns: minmax(0, 1fr); gap: 26px; max-width: 520px; width: 100%; min-width: 0; }
  .login-side { order: -1; text-align: center; min-width: 0; }
  .login-side__list { display: none; }
  .login-side__admin { margin-top: 16px; }
  .login-card__head { text-align: center; }
  .login-logo { margin: 0 auto 16px; }
  .cm-page--login { padding-top: 40px; padding-bottom: 24px; }
}

@media (max-width: 520px) {
  .login-card { border-radius: 24px; padding: 24px 20px 26px; }
  .login-hint { display: none; }
  .login-side__title { font-size: 26px; }
  .login-side__admin { font-size: 12.5px; padding: 8px 14px; }
  .bubbles { display: none; }
}

/* =========================================================
   二、教师寄语首屏
   ========================================================= */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background: rgba(5, 16, 21, .66);
  backdrop-filter: blur(30px) saturate(1.25);
  -webkit-backdrop-filter: blur(30px) saturate(1.25);
  color: #fff;
  transition: opacity .8s var(--ease), transform .9s var(--ease), visibility .8s;
}

.welcome.is-hidden { opacity: 0; transform: scale(1.04); visibility: hidden; pointer-events: none; }

.welcome__glow {
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c-primary) 42%, transparent), transparent 62%);
  filter: blur(30px);
  animation: glowPulse 9s var(--ease-io) infinite alternate;
  pointer-events: none;
}
@keyframes glowPulse {
  from { transform: scale(.85) translate(-8%, -4%); opacity: .55; }
  to { transform: scale(1.1) translate(8%, 6%); opacity: .85; }
}

.welcome__inner { position: relative; width: min(760px, 100%); min-width: 0; max-width: 100%; text-align: center; }

.welcome__kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; letter-spacing: .12em;
  padding: 8px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  animation: fadeDown .8s var(--ease) both;
}
.welcome__kicker .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #7dffd8;
  box-shadow: 0 0 0 0 rgba(125, 255, 216, .7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(125, 255, 216, .6); }
  70% { box-shadow: 0 0 0 12px rgba(125, 255, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 255, 216, 0); }
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

.welcome__stage {
  position: relative;
  min-height: 300px;
  margin: 26px 0 8px;
  display: grid;
  /* minmax(0,1fr) 防止长文本把网格列撑破，导致整页出现横向溢出 */
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
}

.letter {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  opacity: 0;
  transform: perspective(1000px) rotateX(9deg) translateY(30px) scale(.97);
  transition: opacity .7s var(--ease), transform .9s var(--ease);
  pointer-events: none;
  text-align: left;
  padding: clamp(20px, 3vw, 36px) clamp(18px, 3.4vw, 44px);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .07));
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7);
  backdrop-filter: blur(16px);
  max-height: 58vh;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: break-word;
  word-break: break-word;
}
.letter[data-active] { opacity: 1; transform: none; pointer-events: auto; }

.letter__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.letter__avatar {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6);
}
.letter__avatar--text {
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #073b36;
  background: linear-gradient(140deg, #b9fbef, #ffe3ef);
}
.letter__name { display: block; font-size: 16.5px; letter-spacing: .02em; }
.letter__sign { font-size: 12.5px; opacity: .72; }

.letter__body { font-size: clamp(15px, 2vw, 19px); line-height: 2; min-width: 0; }
.letter__line { opacity: 0; transform: translateY(14px); overflow-wrap: anywhere; }
.letter[data-active] .letter__line {
  animation: lineIn .8s var(--ease) both;
  animation-delay: calc(var(--li, 0) * 130ms + 120ms);
}
@keyframes lineIn { to { opacity: 1; transform: none; } }

.welcome__ctrl { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; animation: fadeDown 1s var(--ease) both .3s; }
.welcome__dots { display: flex; gap: 8px; align-items: center; width: 100%; justify-content: center; margin-bottom: 6px; }
.welcome__dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .35); cursor: pointer;
  transition: width .4s var(--ease), background .3s ease;
}
.welcome__dots button[aria-selected="true"] { width: 30px; background: linear-gradient(90deg, #7dffd8, #fff); }

.welcome__tip { margin-top: 14px; font-size: 12.5px; color: rgba(255, 255, 255, .6); animation: fadeDown 1s var(--ease) both .45s; }

@media (max-width: 640px) {
  .letter { max-height: 62vh; border-radius: 20px; }
  .welcome__inner { width: 100%; padding: 0 4px; }
  .welcome__stage { min-height: 260px; margin-top: 18px; }
  .welcome__ctrl { gap: 8px; flex-wrap: wrap; }
  .welcome__ctrl .btn { flex: 1 1 auto; padding: .8em 1em; font-size: 15px; }
  .welcome__tip { font-size: 11.5px; }
}

/* =========================================================
   三、顶部导航
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 3vw, 40px);
  color: #fff;
  transition: background .45s var(--ease), box-shadow .45s var(--ease), padding .4s var(--ease);
}
.nav.is-stuck {
  background: rgba(8, 26, 30, .72);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .9);
  padding-top: 8px; padding-bottom: 8px;
}

.nav__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav__logo {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 13px; font-weight: 800; font-size: 18px;
  color: #06302c;
  background: linear-gradient(140deg, #a8f7ea, #ffe0ee);
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .7);
}
.nav__names { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.nav__names b { font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.nav__names i { font-size: 11.5px; font-style: normal; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  position: relative;
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 999px;
  opacity: .82;
  transition: opacity .3s ease, background .3s ease, color .3s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: 3px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #7dffd8, #ffd6e8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav__links a:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { opacity: 1; }

.nav__me { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #06302c;
  background: linear-gradient(140deg, #a8f7ea, #ffe0ee);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .8);
}
.nav__me-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__burger { display: none; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px; background: rgba(255, 255, 255, .1); cursor: pointer; padding: 10px; }
.nav__burger span { display: block; height: 2px; border-radius: 2px; background: #fff; margin: 3.5px 0; transition: transform .35s var(--ease), opacity .3s ease; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__names i { display: none; }
  .nav__me-name { display: none; }
  .nav__links {
    position: fixed;
    top: 64px; left: 12px; right: 12px;
    flex-direction: column;
    padding: 14px;
    border-radius: 22px;
    background: rgba(8, 26, 30, .9);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: var(--shadow-l);
    opacity: 0;
    transform: translateY(-14px) scale(.98);
    pointer-events: none;
    transition: opacity .35s var(--ease), transform .45s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 13px 16px; font-size: 15px; }
  .nav__burger { display: block; }
}

/* =========================================================
   四、首页板块
   ========================================================= */
.site { color: #fff; padding-bottom: 60px; overflow-x: clip; }

.hero {
  position: relative;
  text-align: center;
  padding: clamp(46px, 9vw, 120px) clamp(18px, 4vw, 40px) clamp(30px, 5vw, 60px);
  max-width: 1060px;
  margin: 0 auto;
  overflow-x: clip;
}

.hero__badge {
  display: inline-block;
  padding: 8px 20px;
  font-size: 13px;
  letter-spacing: .14em;
  border-radius: 999px;
  color: #eafffb;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  backdrop-filter: blur(10px);
}

.hero__title {
  margin: 22px 0 12px;
  font-size: clamp(27px, 5.2vw, 58px);
  line-height: 1.18;
  letter-spacing: -.01em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .05em;
  padding: 0 6px;
  /* 窄屏也不会横向溢出 */
  overflow-wrap: anywhere;
  /* 渐变文字的下沿容易被裁掉，留出一点空间 */
  padding-bottom: .08em;
}
.hero__char {
  display: inline-block;
  /* 纯白 + 柔和投影：在任意背景上都能看清，且不会出现渐变文字被裁切的问题 */
  color: #fff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, .5), 0 1px 3px rgba(0, 0, 0, .4);
  animation: charIn .75s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms + 80ms);
  will-change: transform, opacity;
}
@keyframes charIn {
  from { opacity: 0; transform: translate3d(0, 30px, 0); }
  to { opacity: 1; transform: none; }
}

.hero__sub { font-size: clamp(13.5px, 1.8vw, 17px); color: rgba(255, 255, 255, .8); letter-spacing: .08em; }

.hero__stats {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 46px);
  margin: 34px 0 30px;
  flex-wrap: wrap;
}
.stat {
  min-width: 104px;
  padding: 16px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(12px);
  transition: transform .45s var(--ease), background .4s ease;
}
.stat:hover { transform: translateY(-6px); background: rgba(255, 255, 255, .16); }
.stat__num { font-size: clamp(24px, 3.6vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.stat__suffix { font-size: 13px; opacity: .8; margin-left: 3px; }
.stat i { display: block; font-style: normal; font-size: 12.5px; opacity: .72; margin-top: 2px; letter-spacing: .08em; }

.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 76px) clamp(18px, 3.4vw, 40px) 0;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.section__title {
  font-size: clamp(21px, 3vw, 32px);
  letter-spacing: -.01em;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.section__title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 54px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, #7dffd8, var(--c-accent));
}
.section__desc { font-size: 13.5px; color: rgba(255, 255, 255, .72); margin-top: 10px; max-width: 620px; }
.section__count {
  font-size: 12.5px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
}
.section__more { text-align: center; margin-top: 30px; }

.empty {
  padding: 46px 24px;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

/* =========================================================
   五、媒体卡片
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}
.grid--video { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 20px 50px -34px rgba(0, 0, 0, .95);
  cursor: pointer;
  transition: transform .6s var(--ease), box-shadow .5s var(--ease), border-color .4s ease;
  transform-style: preserve-3d;
}
.card:hover { transform: translateY(-8px) scale(1.012); border-color: rgba(255, 255, 255, .4); box-shadow: 0 34px 66px -30px rgba(0, 0, 0, .95); }
.card.is-hidden { display: none; }
.card:focus-visible { outline: 3px solid #7dffd8; outline-offset: 3px; }

.card__frame {
  position: relative;
  min-height: 190px;
  aspect-ratio: 4 / 3;
  background: linear-gradient(120deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02));
  overflow: hidden;
}
.card__frame.is-sized { aspect-ratio: auto; min-height: 0; }

.card__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  filter: blur(14px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1.1s var(--ease);
}
.card.is-loaded .card__img { opacity: 1; transform: scale(1); filter: blur(0); }
.card:hover .card__img { transform: scale(1.06); }

.card__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, .04) 20%, rgba(255, 255, 255, .16) 40%, rgba(255, 255, 255, .04) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
  opacity: 1;
  transition: opacity .6s ease;
}
.card.is-loaded .card__skeleton { opacity: 0; }
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }

.card__sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.card.is-loaded .card__sheen { animation: sheen 1.2s var(--ease) .1s 1; }
@keyframes sheen { to { transform: translateX(120%); } }

.card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.card__play span {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  border: 2px solid rgba(255, 255, 255, .8);
  backdrop-filter: blur(6px);
  position: relative;
  transition: transform .5s var(--ease), background .3s ease;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
}
.card__play span::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-38%, -50%);
  border-left: 17px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}
.card:hover .card__play span { transform: scale(1.12); background: rgba(255, 255, 255, .35); }

.card__dur {
  position: absolute; right: 12px; bottom: 12px;
  font-size: 12px; padding: 3px 9px; border-radius: 8px;
  background: rgba(0, 0, 0, .62); color: #fff; letter-spacing: .04em;
}
.card__star {
  position: absolute; left: 12px; top: 12px;
  font-size: 12px; width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #5a3b00;
  background: linear-gradient(140deg, #ffe6a8, #ffc247);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .8);
}

.card__cap {
  padding: 13px 15px 15px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, rgba(8, 24, 28, .28), rgba(8, 24, 28, .5));
  transform: translateY(0);
  transition: transform .55s var(--ease);
}
.card__cap b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.card__cap span { font-size: 12.5px; color: rgba(255, 255, 255, .74); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================================
   六、留言墙 / 页脚
   ========================================================= */
.wall { display: grid; gap: 20px; }
.wall__note {
  padding: clamp(24px, 4vw, 44px);
  border-radius: 26px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .24);
  backdrop-filter: blur(14px);
  text-align: center;
}
.wall__quote { font-size: 54px; line-height: .6; opacity: .35; font-family: Georgia, serif; }
.wall__note-inner p { font-size: clamp(17px, 2.4vw, 24px); line-height: 1.9; margin: 8px 0 14px; }
.wall__note-inner i { font-style: normal; font-size: 13.5px; opacity: .72; }

.wall__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.note {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(10px);
  transition: transform .5s var(--ease), background .4s ease;
  will-change: transform;
}
.note:hover { background: rgba(255, 255, 255, .16); }
.note b { font-size: 14px; display: block; margin-bottom: 8px; color: #eafffb; }
.note p { font-size: 13.5px; line-height: 1.85; color: rgba(255, 255, 255, .86); }
.note span { display: block; margin-top: 12px; font-size: 12px; opacity: .6; }

.footer {
  text-align: center;
  padding: 56px 20px 0;
  color: rgba(255, 255, 255, .7);
}
.footer p { font-size: 15px; margin-bottom: 8px; }
.footer small { font-size: 12px; opacity: .7; }

/* =========================================================
   七、媒体查看器
   ========================================================= */
.viewer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.viewer[hidden] { display: none; }
.viewer__mask { position: absolute; inset: 0; background: rgba(4, 12, 16, .82); backdrop-filter: blur(16px); animation: fadeIn .4s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.viewer__stage {
  position: relative;
  width: min(1120px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: zoomIn .55s var(--ease) both;
}
@keyframes zoomIn { from { opacity: 0; transform: scale(.94) translateY(18px); } to { opacity: 1; transform: none; } }

.viewer__media {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
}
.viewer__media img, .viewer__media video { max-height: 78vh; width: auto; max-width: 100%; border-radius: 18px; }
.viewer__media.is-loading::after {
  content: "";
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  animation: spin .8s linear infinite;
}

.viewer__meta { text-align: center; color: #fff; }
.viewer__meta b { display: block; font-size: 16px; }
.viewer__meta span { font-size: 13px; opacity: .75; }

.viewer__close, .viewer__nav {
  position: absolute;
  z-index: 2;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 19px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform .35s var(--ease), background .3s ease;
}
.viewer__close:hover, .viewer__nav:hover { background: rgba(255, 255, 255, .28); transform: scale(1.08); }
.viewer__close { top: -8px; right: -6px; }
.viewer__nav { top: 50%; margin-top: -22px; font-size: 30px; line-height: 1; padding-bottom: 6px; }
.viewer__nav--prev { left: -10px; }
.viewer__nav--next { right: -10px; }

@media (max-width: 700px) {
  .viewer__close { top: -46px; right: 0; }
  .viewer__nav { width: 38px; height: 38px; }
  .viewer__nav--prev { left: -4px; }
  .viewer__nav--next { right: -4px; }
  .grid, .grid--video { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card__cap { padding: 10px 12px 12px; }
  .card__cap b { font-size: 13px; }
  .card__cap span { font-size: 11.5px; }
  .card__frame { min-height: 140px; }
  .card__play span { width: 48px; height: 48px; }
  .card__play span::after { border-left-width: 14px; border-top-width: 9px; border-bottom-width: 9px; }
  .hero { padding-top: 34px; }
  .hero__stats { gap: 8px; }
  /* 手机端固定三列等宽，绝不横向溢出 */
  .stat { min-width: 0; width: 100%; padding: 12px 6px; border-radius: 16px; }
  .stat__num { font-size: 22px; }
  .stat__suffix { font-size: 11px; }
  .stat i { font-size: 11px; letter-spacing: 0; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero__actions .btn { width: 100%; padding: .85em 1em; font-size: 15px; }
  .section__count { font-size: 11.5px; padding: 5px 11px; }
  .section__desc { font-size: 12.5px; }
}

@media (max-width: 560px) {
  .hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 12px 4px; }
  .stat__num { font-size: 21px; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hero__actions .btn { width: 100%; padding: .8em .6em; font-size: 14.5px; }
  .section__head { display: block; }
  .section__count { display: inline-block; margin-top: 12px; }
}

@media (max-width: 420px) {
  .stat__num { font-size: 19px; }
  .stat__suffix { font-size: 10.5px; }
  .hero__title { font-size: 25px; }
}
