/* ============================================================
   31-yearsum.css — 年度收听总结（v7.4.7）
   两块：主页入口卡（渐变横幅）+ 全屏故事页（深空渐变，Story 式翻页）。
   故事页刻意做成深色沉浸态、不随明暗模式切换 —— 这是"仪式"，不是"界面"。
   ============================================================ */

/* ---------- ① 主页入口卡 ---------- */
.yearsum-card {
  position: relative;
  margin: 0 var(--edge-pad, 16px) 14px;
  padding: 16px 18px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: linear-gradient(120deg, #2b1055 0%, #7b1e4b 55%, #b3123e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.yearsum-card:active { opacity: .82; }
.yearsum-card-glow {
  position: absolute; right: -40px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 150, 0.55), rgba(255, 122, 150, 0));
  pointer-events: none;
}
.yearsum-card-text { flex: 1; min-width: 0; position: relative; }
.yearsum-card-title { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.yearsum-card-sub { margin-top: 3px; font-size: 12.5px; opacity: .82; }
.yearsum-card-close {
  position: relative; flex-shrink: 0;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.18); color: #fff; cursor: pointer;
  padding: 0;
}
.yearsum-card-close svg { width: 14px; height: 14px; }

/* ---------- ② 全屏故事页 ---------- */
.yearsum-overlay {
  position: fixed; inset: 0;
  z-index: 3200;                       /* 高于沉浸播放页(2000)与其上的弹层，低于 toast(9999) */
  background:
    radial-gradient(120% 60% at 85% 8%, rgba(255, 45, 85, 0.28), rgba(0, 0, 0, 0) 60%),
    radial-gradient(120% 70% at 10% 92%, rgba(94, 92, 230, 0.30), rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #1a0b2e 0%, #3b1440 55%, #0e0f2e 100%);
  color: #fff;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
  display: flex; flex-direction: column;
}
.yearsum-overlay.show { opacity: 1; pointer-events: auto; }
body.yearsum-open { overflow: hidden; }

.ys-progress {
  display: flex; gap: 5px;
  padding: calc(var(--safe-top, 0px) + 10px) 16px 0;
}
.ys-progress-seg {
  flex: 1; height: 3px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
}
.ys-progress-seg.is-on { background: rgba(255, 255, 255, 0.92); }

.ys-close {
  position: absolute; top: calc(var(--safe-top, 0px) + 22px); right: 14px;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.16); color: #fff; cursor: pointer;
  z-index: 3;                           /* 压过点按热区 */
  padding: 0;
}
.ys-close svg { width: 17px; height: 17px; }

/* 点按热区：左 30% 上一页 / 右 70% 下一页（Story 惯例），透明按钮铺满 */
.ys-tap {
  position: absolute; top: 0; bottom: 0;
  border: 0; background: transparent; padding: 0; margin: 0;
  z-index: 2; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ys-tap:active { opacity: 1; }          /* 覆盖全局按压反馈：热区本身不该闪 */
.ys-tap-prev { left: 0; width: 30%; }
.ys-tap-next { right: 0; width: 70%; }

.ys-stage {
  flex: 1; position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 28px calc(env(safe-area-inset-bottom, 0px) + 40px);
}
.ys-anim { width: 100%; max-width: 420px; animation: ysIn .5s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes ysIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ys-anim { animation: none; }
  .yearsum-overlay { transition: none; }
}

/* 页面通用排版 */
.ys-page { display: flex; flex-direction: column; gap: 14px; }
.ys-kicker {
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.55); text-transform: uppercase;
}
.ys-big { display: flex; align-items: baseline; gap: 10px; }
.ys-big-num {
  font-size: 88px; font-weight: 800; line-height: 1;
  letter-spacing: -2px; color: #ff4a6e;
  font-variant-numeric: tabular-nums;
}
.ys-big-unit { font-size: 22px; font-weight: 700; color: rgba(255, 255, 255, 0.9); }
.ys-big-word {
  font-size: 64px; font-weight: 800; line-height: 1.15; letter-spacing: -1px;
}
.ys-cat-word, .ys-kw {
  background: linear-gradient(90deg, #ff4a6e, #ff9a5a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.ys-kw { font-size: 44px; }
.ys-title { font-size: 20px; font-weight: 700; }
.ys-note { font-size: 14px; line-height: 1.9; color: rgba(255, 255, 255, 0.65); white-space: pre-line; }
.ys-hint { font-size: 12px; color: rgba(255, 255, 255, 0.4); }

/* 最爱电台 */
.ys-toplist { display: flex; flex-direction: column; gap: 4px; }
.ys-toprow {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}
.ys-topnum {
  width: 20px; text-align: center; flex-shrink: 0;
  font-size: 15px; font-weight: 800; font-style: italic;
  color: rgba(255, 255, 255, 0.5);
}
.ys-toprow:first-child .ys-topnum { color: #ff4a6e; }
.ys-toplogo {
  width: 30px; height: 30px; border-radius: 7px; object-fit: cover;
  flex-shrink: 0; background: rgba(255, 255, 255, 0.12);
}
.ys-topname {
  flex: 1; min-width: 0; font-size: 15px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ys-topmin { flex-shrink: 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }

/* 收听时钟 */
.ys-hours { display: flex; align-items: flex-end; gap: 3px; height: 96px; }
.ys-hours-bar { flex: 1; min-width: 0; border-radius: 3px 3px 0 0; background: rgba(255, 74, 110, 0.35); }
.ys-hours-bar.is-peak { background: #ff4a6e; }
.ys-hours-axis {
  display: flex; justify-content: space-between;
  font-size: 10px; color: rgba(255, 255, 255, 0.4);
}

/* 年度纪录 */
.ys-records { display: flex; flex-direction: column; gap: 18px; }
.ys-record-num { display: flex; align-items: baseline; gap: 7px; }
.ys-record-n {
  font-size: 46px; font-weight: 800; line-height: 1; color: #ff4a6e;
  font-variant-numeric: tabular-nums;
}
.ys-record-u { font-size: 16px; font-weight: 700; color: rgba(255, 255, 255, 0.9); }
.ys-record-label { margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }

/* 海报页 */
.ys-page-poster { align-items: center; text-align: center; }
.ys-poster {
  width: min(58vw, 240px); aspect-ratio: 2 / 3;
  border-radius: 14px; object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.ys-btns { display: flex; gap: 10px; justify-content: center; }
.ys-btn {
  border: 0; border-radius: 999px; padding: 10px 22px; cursor: pointer;
  font-size: 14px; font-weight: 700;
  background: rgba(255, 255, 255, 0.14); color: #fff;
}
.ys-btn-primary { background: #ff2d55; }
