/* =====================================================
   home-v17.css —— 首页分层改版（v17）
   首屏聚焦仪式感，只保留 3 个核心模块：
     ① 恋爱天数大卡片（浅棕渐变 · 双人头像 · 爱心）
     ② 每日一问卡片
     ③ 最近纪念日卡片（倒计时）
   今日心情 / 快捷入口 / 小游戏 全部自然下移，需下滑可见。
   基调：米白柔光 · 大圆角 · 低饱和 · 充足留白。
   全部使用 h- 前缀，与 style.css / ui-pro.css / beautify.css 零冲突。
   ===================================================== */

/* ---------- 布局容器 ---------- */
.h-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- 通用柔光白卡 ---------- */
.h-card {
  position: relative;
  background: var(--card, #fff);
  border: 1px solid var(--line, #f0e7df);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 6px 22px rgba(158, 128, 105, .07);
  overflow: hidden;
}

/* =====================================================
   ① 恋爱天数大卡片（浅棕渐变）
   ===================================================== */
.h-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 26px 20px 20px;
  background: linear-gradient(155deg, #f9f1e8 0%, #f2e5d6 46%, #e9d8c5 100%);
  box-shadow: 0 12px 34px rgba(168, 138, 110, .18);
  text-align: center;
  color: #6e5545;
}
/* 柔光晕：两团低饱和暖色，营造柔和氛围 */
.h-hero::before,
.h-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.h-hero::before {
  width: 190px; height: 190px;
  top: -74px; left: -58px;
  background: radial-gradient(circle, rgba(255, 235, 214, .75), rgba(255, 235, 214, 0) 70%);
}
.h-hero::after {
  width: 220px; height: 220px;
  bottom: -110px; right: -70px;
  background: radial-gradient(circle, rgba(226, 200, 176, .55), rgba(226, 200, 176, 0) 70%);
}

/* 双人头像 + 中间爱心 */
.h-avatars {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 14px;
}
.h-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 3px 12px rgba(150, 118, 90, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 2.5px solid rgba(255, 255, 255, .9);
}
.h-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.h-avatar .h-av-emoji {
  font-size: 27px;
  line-height: 1;
}

/* 中间跳动的爱心 */
.h-heart {
  flex: none;
  width: 34px;
  height: 34px;
  margin: 0 -2px;
  animation: hHeartBeat 1.9s ease-in-out infinite;
  transform-origin: center;
}
.h-heart svg { width: 100%; height: 100%; display: block; }
@keyframes hHeartBeat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.16); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.11); }
  58%      { transform: scale(1); }
}

/* 「在一起 xxx 天」大字 */
.h-days-num {
  position: relative;
  z-index: 1;
  font-size: 46px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  color: #6e5545;
  font-variant-numeric: tabular-nums;
}
.h-days-num .h-days-unit {
  font-size: 20px;
  font-weight: 700;
  margin-left: 3px;
  opacity: .85;
}
.h-days-label {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #8a7261;
}
.h-lv-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #7a6050;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(150, 118, 90, .1);
}

/* 积分细条：融在大卡片底部，不额外占首屏位置 */
.h-score {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .55);
}
.h-score-top {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #8a7261;
  font-weight: 600;
  margin-bottom: 8px;
}
.h-score-top b {
  font-size: 16px;
  color: #6e5545;
  font-variant-numeric: tabular-nums;
}
.h-score-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  overflow: hidden;
}
.h-score-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e9c9a8, #d8a97e);
  transition: width .6s cubic-bezier(.22, .61, .36, 1);
}

/* 修改起始日的小字 */
.h-hero-foot {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 11.5px;
  color: #9c8674;
  cursor: pointer;
  opacity: .9;
  transition: opacity .2s;
}
.h-hero-foot:active { opacity: .6; }

/* =====================================================
   ② 每日一问卡片
   ===================================================== */
.h-daily {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.22, .61, .36, 1), box-shadow .18s;
}
.h-daily:active { transform: scale(.985); }
.h-daily-ico {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: linear-gradient(140deg, #fdeef2, #fbe3ea);
}
.h-daily-main { flex: 1; min-width: 0; }
.h-daily-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent, #d8a97e);
  letter-spacing: .6px;
  margin-bottom: 4px;
}
.h-daily-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #4a3b33);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.h-daily-sub {
  font-size: 12px;
  color: var(--muted, #a08d80);
  display: flex;
  align-items: center;
  gap: 4px;
}
.h-daily-sub .h-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7ec98f;
  display: inline-block;
}
.h-daily-sub.is-todo .h-dot { background: #e8b06a; }
.h-daily-go {
  flex: none;
  font-size: 18px;
  color: var(--muted, #b5a094);
}

/* =====================================================
   ③ 最近纪念日卡片
   ===================================================== */
.h-anniv { cursor: default; }
.h-anniv-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text, #4a3b33);
}
.h-anniv-head .h-ico { font-size: 16px; }
.h-anniv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line, #f4ece5);
}
.h-anniv-item:last-child { border-bottom: none; padding-bottom: 0; }
.h-anniv-heart {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(140deg, #fdeef1, #f9e0e6);
}
.h-anniv-body { flex: 1; min-width: 0; }
.h-anniv-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #4a3b33);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h-anniv-date {
  font-size: 11.5px;
  color: var(--muted, #a08d80);
  margin-top: 2px;
}
.h-anniv-count {
  flex: none;
  text-align: right;
}
.h-anniv-count b {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: #d98f9b;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.h-anniv-count span {
  font-size: 10.5px;
  color: var(--muted, #a08d80);
}
.h-anniv-count.is-past b { color: var(--muted, #b0a094); }
.h-anniv-empty {
  text-align: center;
  padding: 14px 0 4px;
  font-size: 12.5px;
  color: var(--muted, #a08d80);
}
.h-anniv-empty .h-ae-ico { font-size: 26px; display: block; margin-bottom: 6px; }

/* =====================================================
   下移区：今日心情 / 快捷入口 / 小游戏
   ===================================================== */
.h-mood-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.h-mood-item {
  padding: 13px 4px;
  border-radius: 16px;
  background: var(--bg-soft, #faf5f1);
  text-align: center;
  cursor: pointer;
  transition: transform .16s, background .2s;
  border: 1.5px solid transparent;
}
.h-mood-item:active { transform: scale(.93); }
.h-mood-item.on {
  background: linear-gradient(140deg, #fdeef2, #f9e2e9);
  border-color: #f6cdd8;
}
.h-mood-item .h-me { font-size: 25px; line-height: 1; }
.h-mood-item .h-mt {
  font-size: 11.5px;
  margin-top: 6px;
  color: var(--text, #5a4a42);
  font-weight: 600;
}
.h-mood-now {
  text-align: center;
  font-size: 12px;
  color: var(--muted, #a08d80);
}

.h-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}
.h-quick-item {
  padding: 15px 6px;
  border-radius: 18px;
  background: var(--bg-soft, #faf5f1);
  text-align: center;
  cursor: pointer;
  transition: transform .16s, box-shadow .2s;
}
.h-quick-item:active { transform: scale(.94); }
.h-quick-item .h-qe { font-size: 24px; line-height: 1; }
.h-quick-item .h-qn {
  font-size: 12px;
  margin-top: 7px;
  color: var(--text, #5a4a42);
  font-weight: 600;
}

/* ---------- 小游戏：Q 版图标 + 新标签 ---------- */
.h-play-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}
.h-play-item {
  position: relative;
  padding: 16px 8px 13px;
  border-radius: 20px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #f0e7df);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.22, .61, .36, 1), box-shadow .2s;
  box-shadow: 0 3px 12px rgba(158, 128, 105, .06);
}
.h-play-item:active { transform: scale(.955); }
.h-play-item .h-p-ico {
  width: 58px;
  height: 58px;
  margin: 0 auto 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h-play-item .h-p-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
.h-play-item .h-p-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #4a3b33);
  margin-bottom: 5px;
}
.h-play-item .h-p-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient(135deg, #fdf0e4, #f8e3d2);
  color: #a37b56;
}
/* 三个入口各自的柔和底色 */
.h-play-item[data-go="bead"]  .h-p-tag { background: linear-gradient(135deg, #fdeff1, #f9dfe5); color: #b5728a; }
.h-play-item[data-go="draw"]  .h-p-tag { background: linear-gradient(135deg, #eef3fd, #e0e8fa); color: #6f83b0; }
.h-play-item[data-go="watch"] .h-p-tag { background: linear-gradient(135deg, #fdf0e4, #f8e3d2); color: #a37b56; }
/* Q 版图标轻微浮动，增加可爱感 */
.h-play-item .h-p-ico svg { animation: hFloat 3.4s ease-in-out infinite; }
.h-play-item[data-go="draw"] .h-p-ico svg { animation-delay: .5s; }
.h-play-item[data-go="watch"] .h-p-ico svg { animation-delay: 1s; }
@keyframes hFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3.5px); }
}

/* ---------- 分区小标题 ---------- */
.h-sec-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text, #4a3b33);
  margin-bottom: 10px;
}
.h-sec-title .h-ico { font-size: 15px; }

/* =====================================================
   适配：窄屏 / 大屏 / 减弱动效
   ===================================================== */
@media (max-width: 360px) {
  .h-avatar { width: 52px; height: 52px; }
  .h-days-num { font-size: 38px; }
  .h-hero { padding: 22px 14px 16px; }
  .h-play-grid, .h-quick-grid { gap: 8px; }
  .h-play-item { padding: 13px 5px 11px; }
  .h-play-item .h-p-ico { width: 48px; height: 48px; }
  .h-play-item .h-p-tag { font-size: 9.5px; padding: 3px 6px; }
}

@media (min-width: 768px) {
  .h-stack { gap: 18px; }
  .h-hero { padding: 34px 26px 24px; }
  .h-days-num { font-size: 54px; }
  .h-avatar { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .h-heart,
  .h-play-item .h-p-ico svg { animation: none !important; }
  .h-score-fill,
  .h-daily,
  .h-quick-item,
  .h-play-item,
  .h-mood-item { transition: none !important; }
}
