/* 01 主页。class 一律 hm- 开头，别和别的页串样式 */
.hm { position: relative; min-height: 100%; padding-bottom: calc(28px + var(--safe-b)); }
.hm .lace-edge { top: var(--hero-h); }

/* 油画头图 + 藕粉紫滤镜 */
.hm-hero { position: relative; height: var(--hero-h); overflow: hidden; background: var(--teal); }
.hm-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hm-hero .tint { position: absolute; inset: 0; background: var(--hero-tint); mix-blend-mode: color; opacity: var(--hero-tint-a); }
.hm-hero .glow { position: absolute; inset: 0; background: var(--hero-glow); mix-blend-mode: soft-light; opacity: var(--hero-glow-a); }

.hm-top { position: absolute; left: 18px; right: 18px; top: calc(var(--status-h) + 6px); height: 44px; display: flex; align-items: center; justify-content: space-between; z-index: 2; }
.hm-top .right { display: flex; align-items: center; gap: 10px; }
.hm-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--on-dark); position: relative; }
.hm-btn.menu { background: rgba(244, 238, 231, .16); border: 1px solid rgba(244, 238, 231, .45); }
.hm-btn.me { width: 38px; height: 38px; background: var(--mauve-btn); border: 1px solid rgba(244, 238, 231, .55); }
.hm-btn .dot { position: absolute; right: 9px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--mauve-pale); box-shadow: 0 0 0 1.5px rgba(70, 86, 94, .6); }

.hm-title { position: absolute; left: var(--gutter); top: calc(var(--status-h) + 68px); width: 72%; display: flex; flex-direction: column; gap: 10px; color: var(--on-dark); z-index: 1; }
.hm-title h1 { margin: 0; font-family: var(--font-script); font-weight: 400; font-size: 38px; line-height: 44px; white-space: nowrap; text-shadow: 0 2px 8px rgba(40, 52, 58, .45); }
.hm-title p { margin: 0; max-width: 190px; font-family: var(--font-serif); font-style: italic; font-size: 14px; line-height: 20px; color: var(--lace); text-shadow: 0 1px 4px rgba(40, 52, 58, .5); }

.hm-body { position: relative; padding: 18px var(--gutter) 0; display: flex; flex-direction: column; gap: 22px; }

/* 两张大卡 */
.hm-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hm-big { height: 82px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: var(--radius); color: var(--ink); }
.hm-big.accent { background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); box-shadow: var(--shadow-accent); color: var(--paper); }
.hm-big .txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hm-big b { font-size: 15px; font-weight: 500; }
.hm-big small { font-size: 10px; line-height: 14px; color: var(--ink-2); }
.hm-big.accent small { color: #EDE5E8; }
.hm-big .ico { color: var(--mauve-deep); }
.hm-big.accent .ico { color: var(--paper); }

/* 快捷功能 */
.hm-head { display: flex; align-items: center; gap: 30px; margin-bottom: -10px; }
.hm-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.hm-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-quick a { height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; font-size: 12px; }
.hm-quick .ico { color: var(--mauve-deep); }

/* 最近聊天 */
.hm-recent { border-radius: var(--radius-lg); padding: 16px 16px 6px; }
.hm-recent .bar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--lace); }
.hm-recent h2 { margin: 0; font-size: 17px; font-weight: 600; }
.hm-recent .all { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); }
.hm-row { display: flex; align-items: center; gap: 12px; height: 70px; border-bottom: 1px solid var(--line-soft); }
.hm-row:last-child { border-bottom: 0; }
.hm-av { width: 46px; height: 46px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--on-dark); background: var(--teal-soft); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); overflow: hidden; }
.hm-av img { width: 100%; height: 100%; object-fit: cover; }
.hm-av.c1 { background: var(--teal-soft); }
.hm-av.c2 { background: var(--mauve-btn); }
.hm-av.c3 { background: var(--teal-pale); }
.hm-av.slot { background: transparent; box-shadow: none; border: 1px dashed var(--mauve); color: var(--mauve-btn); font-size: 22px; font-weight: 300; }
.hm-row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hm-row .l1, .hm-row .l2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hm-row .name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-row .time { font-family: var(--font-serif); font-size: 13px; color: var(--ink-2); flex: none; }
.hm-row .last { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-row .badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--mauve-btn); color: var(--paper); font-size: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.hm-row .tag { font-size: 11px; color: var(--mauve-btn); border: 1px solid var(--mauve-pale); border-radius: 8px; padding: 1px 7px; flex: none; }
.hm-row .busy { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); flex: none; }

/* Our Story */
.hm-story { position: relative; height: 226px; border-radius: var(--radius-lg); margin-top: 6px; display: block; }
.hm-story .corner { position: absolute; width: 64px; height: 64px; filter: drop-shadow(0 1px 1px rgba(81, 75, 74, .14)); }
.hm-story .corner.tl { left: 0; top: 0; }
.hm-story .corner.tr { right: 0; top: 0; transform: scaleX(-1); }
.hm-story .corner.bl { left: 0; bottom: 0; transform: scaleY(-1); }
.hm-story .corner.br { right: 0; bottom: 0; transform: scale(-1, -1); }
.hm-story .bow { position: absolute; left: 50%; top: -22px; width: 72px; margin-left: -36px; filter: drop-shadow(0 2px 2px rgba(81, 75, 74, .18)); }
.hm-story .row { position: absolute; left: 0; right: 0; top: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.hm-story .row img { width: 96px; height: 96px; }
.hm-story h2 { margin: 0; font-family: var(--font-script); font-weight: 400; font-size: 38px; line-height: 44px; color: var(--mauve-btn); text-shadow: 0 1px 0 rgba(255, 255, 255, .8), 1px 2px 3px rgba(112, 100, 119, .22); }
.hm-story p { position: absolute; left: 0; right: 0; top: 132px; margin: 0; text-align: center; font-size: 13px; line-height: 22px; }
.hm-story .days { position: absolute; left: 0; right: 0; top: 158px; text-align: center; font-size: 12px; letter-spacing: 2px; color: var(--mauve-deep); }
.hm-story .days em { font-style: normal; font-family: var(--font-serif); font-size: 22px; letter-spacing: 0; color: var(--teal); }
.hm-story .orn { position: absolute; left: 50%; top: 196px; margin-left: -60px; }

/* 很窄的手机（≤360）：快捷功能字小一点 */
@media (max-width: 360px) { .hm-quick a { font-size: 11px; } .hm-big small { display: none; } }
button.hm-btn { padding: 0; appearance: none; -webkit-appearance: none; }

/* 两个人：两枚椭圆像框 + 一条缎带 + 正中火漆印（在一起第几天） */
.hm-us { position: relative; display: block; height: 182px; margin-top: 4px; color: var(--ink); }
.hm-us .rib { position: absolute; left: 0; right: 0; top: 18px; width: 100%; height: 120px; overflow: visible; }
.hm-us .rib path { fill: none; stroke-linecap: round; }
.hm-us .rib .r1 { stroke: #B9A6BA; stroke-width: 7; filter: drop-shadow(0 2px 2px rgba(81, 75, 74, .18)); }
.hm-us .rib .r2 { stroke: #D9CCD9; stroke-width: 2; opacity: .9; }
.hm-us .who { position: absolute; top: 0; width: 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hm-us .who.ai { left: 2px; } .hm-us .who.me { right: 2px; }
.hm-us .frame { position: relative; width: 86px; height: 104px; border-radius: 50%; padding: 6px; box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 30%, #FBF7F2, #EFE6EA); box-shadow: 0 0 0 1px #CDBFCB, 0 0 0 5px #F6F0EE, 0 0 0 6px #D9CCD6, 0 8px 18px rgba(81, 75, 74, .2); }
.hm-us .frame::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; background: url(../assets/lace.png) center / 100% 100% no-repeat; opacity: 0; }
.hm-us .ph { display: flex; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.hm-us .who.ai .ph { background: linear-gradient(160deg, #8A9EA2, #5F7378); }
.hm-us .who.me .ph { background: linear-gradient(160deg, #B9A3BA, #8C7591); }
.hm-us .ph img { width: 100%; height: 100%; object-fit: cover; }
.hm-us .ph b { font-size: 30px; font-weight: 500; color: #FBF8F4; text-shadow: 0 1px 3px rgba(40, 30, 40, .3); }
.hm-us .who em { font-style: normal; font-size: 14px; letter-spacing: 3px; padding-left: 3px; }
.hm-us .seal { position: absolute; left: 50%; top: 26px; width: 120px; height: 104px; margin-left: -60px; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  color: var(--mauve-deep); text-shadow: 0 0 4px var(--paper), 0 0 8px var(--paper), 0 0 12px var(--paper); pointer-events: none; }
.hm-us .seal small { font-family: var(--font-script); font-size: 22px; line-height: 1; }
.hm-us .seal span { display: flex; align-items: baseline; gap: 3px; }
.hm-us .seal b { font-family: var(--font-serif); font-size: 32px; font-weight: 500; line-height: 1; color: #6E5C72; }
.hm-us .seal i { font-style: normal; font-size: 12px; letter-spacing: 2px; }
.hm-us .since { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 11.5px; letter-spacing: 2px; color: var(--mauve-deep); }
