:root {
  --pink: #ff6b9d;
  --pink-soft: #ff9a9e;
  --violet: #a18cd1;
  --ink: #432c3b;
  --ink-2: #7d5a6d;
  --line: #f2dbe5;
  --card: rgba(255, 255, 255, 0.92);
  --danger: #ff4d6d;
  --ok: #22c55e;
  --shadow: 0 18px 50px rgba(190, 90, 140, 0.16);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 85% -10%, var(--pink-soft) 0%, transparent 55%),
    radial-gradient(900px 600px at -10% 90%, var(--violet) 0%, transparent 55%),
    linear-gradient(160deg, #fff5f8, #f4ecff);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; cursor: pointer; }
.pointer-focus button:focus { outline: none; }
@supports selector(:focus-visible) {
  button:focus:not(:focus-visible) { outline: none; }
}
input { font-family: inherit; }

.hidden { display: none !important; }
.scrollable { overflow-y: auto; overscroll-behavior: contain; }

.page { display: flex; justify-content: center; }

.view {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
}

.view-enter {
  animation: llViewIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes llViewIn {
  from { opacity: 0; transform: translateY(12px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------------- 通用组件 ---------------- */

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.btn-primary, .btn-secondary {
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  color: #fff;
  transition: transform 0.08s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--pink), #ff8fb2); box-shadow: 0 8px 22px rgba(255, 107, 157, 0.35); }
.btn-secondary { background: linear-gradient(135deg, #b497ff, #8f7bff); box-shadow: 0 8px 22px rgba(148, 122, 255, 0.3); }
.btn-primary:active, .btn-secondary:active { transform: scale(0.97); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-1px); }
.btn-primary:disabled, .btn-secondary:disabled { opacity: 0.6; cursor: default; }

.btn-ghost, .text-btn, .danger-link {
  border: 0;
  background: transparent;
  color: var(--ink-2);
}
.danger-link { color: var(--danger); font-size: 13px; text-decoration: underline; }
.text-btn { font-size: 14px; color: var(--ink-2); }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff0f5, #ffe9f2);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(255, 130, 170, 0.25);
  user-select: none;
}
.avatar.sm { width: 38px; height: 38px; font-size: 20px; }
.avatar.lg { width: 74px; height: 74px; font-size: 40px; }
.avatar.xl { width: 108px; height: 108px; font-size: 58px; }
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  background: #d6c4cc;
}
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16); }

.badge {
  min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  padding: 0 5px;
  margin-left: 6px;
}

/* ---------------- 底部导航 ---------------- */

/* 底部透明防护层：铺满底部整条区域（含安全区），拦截误触；滚动由脚本转发 */
.tabbar-shield {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  height: calc(92px + env(safe-area-inset-bottom));
  z-index: 79;
  background: transparent;
  touch-action: none;
}

.tabbar-shield.hidden {
  display: none;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: auto;
  max-width: calc(100% - 24px);
  max-width: calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
  z-index: 80;
  display: flex;
  align-items: center;
  padding: 6px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(25px);
  -webkit-backdrop-filter: saturate(180%) blur(25px);
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(180, 90, 140, 0.16);
}

.tab-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 88px;
  background: #1d1d1f;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  z-index: 1;
  pointer-events: none;
  will-change: left;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  color: #99999e;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.25s ease, transform 0.08s ease;
}
.tab-btn:active { transform: scale(0.96); }
.tab-icon-wrap { position: relative; display: inline-flex; }
.tab-btn .tab-icon { width: 20px; height: 20px; fill: currentColor; display: block; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tab-btn.active { color: #ffffff; }
.tab-btn.active .tab-icon { transform: scale(1.08); }
.tab-unread {
  position: absolute;
  top: -4px;
  right: -7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid #fff;
}

body.logged-in .home-body,
body.logged-in .page-shell .scrollable {
  padding-bottom: 96px;
}

/* ---------------- 通用页面头 ---------------- */

.page-head {
  padding: max(18px, env(safe-area-inset-top)) 20px 4px;
  padding-inline-start: max(20px, env(safe-area-inset-left));
  padding-inline-end: max(20px, env(safe-area-inset-right));
}
.page-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 1px;
}
.page-sub {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 4px;
}

.home-page-sub {
  margin: 0 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}

/* ---------------- 信息页 ---------------- */

.conversation-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  text-align: left;
  color: var(--ink);
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}
.conversation-row:active { transform: scale(0.985); }
.conversation-avatar { position: relative; flex-shrink: 0; line-height: 0; }
.conversation-avatar .avatar { width: 52px; height: 52px; font-size: 28px; }
.conversation-avatar .dot { position: absolute; right: 0; bottom: 2px; }
.conversation-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.conversation-top,
.conversation-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.conversation-name {
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-time { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.conversation-preview {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-arrow { color: #d8c1cd; font-size: 22px; line-height: 1; flex-shrink: 0; }
.messages-call-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
}

/* ---------------- 聊天页顶部通话入口 ---------------- */

.chat-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-call-btn { width: 36px; height: 36px; }

/* ---------------- 通话页 ---------------- */

.empty-icon { font-size: 52px; margin-bottom: 6px; animation: floaty 3s ease-in-out infinite; }
.call-page-card { text-align: center; margin-top: 18px; padding: 26px 20px; }
.call-page-partner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.call-page-name { font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.call-page-status { font-size: 13px; color: var(--ok); }
.call-page-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.call-big-btn {
  border: 0;
  border-radius: 22px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
  transition: transform 0.08s ease;
}
.call-big-btn:active { transform: scale(0.96); }
.call-big-btn.voice { background: linear-gradient(150deg, #6ec6ff, #3aa6ff); box-shadow: 0 10px 24px rgba(70, 160, 255, 0.28); }
.call-big-btn.video { background: linear-gradient(150deg, var(--pink), #b86bff); box-shadow: 0 10px 24px rgba(255, 107, 157, 0.30); }
.call-big-btn .cbb-icon { font-size: 34px; }
.call-big-btn:disabled { opacity: 0.55; }

/* ---------------- 我的页 ---------------- */

.me-edit-card { margin-top: 18px; display: flex; flex-direction: column; }
.me-avatar-center { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.avatar-tip { font-size: 12px; color: var(--ink-2); }
.me-edit-card .avatar-picker { justify-content: center; margin-bottom: 16px; }
.me-edit-card .btn-primary { margin-top: 4px; }
.account-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.account-line .account-value { color: var(--ink); font-weight: 600; }
.me-actions {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin: 24px 0 8px;
}
.me-actions .danger-link { font-size: 14px; text-decoration: none; }

.security-card { margin-top: 16px; padding: 10px 18px; }
.security-title { font-size: 13px; color: var(--ink-2); font-weight: 700; margin: 6px 0 4px; }
.security-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  padding: 13px 0;
}
.security-row.static { border-bottom: 0; }
.row-arrow { color: #c3a3b2; font-size: 20px; }
.row-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.row-value { color: var(--ink-2); font-size: 12px; max-width: 60%; text-align: right; overflow-wrap: anywhere; }

.modal-form { text-align: left; margin: 14px 0 4px; }
.modal-form .field { margin-bottom: 10px; }
.modal-form .form-error { margin: 0 0 4px; }
.modal-btn-row { display: flex; gap: 10px; }
.modal-btn-row .half { flex: 1; padding: 11px 8px; font-size: 14px; }

/* ---------------- 登录页 ---------------- */

.view-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.auth-shell {
  width: 100%;
  max-width: 400px;
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 36px 26px 24px;
  min-height: 0;
  backdrop-filter: blur(12px);
}

.auth-logo { font-size: 56px; animation: floaty 3s ease-in-out infinite; }
.auth-logo-wrap {
  display: flex;
  justify-content: center;
}
.auth-logo-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 6px;
  animation: floaty 3s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.auth-title { margin: 8px 0 2px; font-size: 30px; letter-spacing: 3px; }
.auth-title span { font-size: 14px; letter-spacing: 1px; color: var(--ink-2); font-weight: 400; margin-left: 8px; }
.auth-sub { color: var(--ink-2); margin: 4px 0 24px; font-size: 14px; }

.mode-tabs {
  display: flex;
  background: #fbeef4;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}
.mode-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  padding: 9px 0;
  transition: all 0.2s ease;
}
.mode-tab.active {
  background: #fff;
  color: var(--pink);
  box-shadow: 0 3px 10px rgba(255, 130, 170, 0.2);
}

.auth-form { text-align: left; }
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin: 0 0 6px 4px;
  font-weight: 500;
}
.field input, .code-input, .msg-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .code-input:focus, .msg-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.12);
}

.avatar-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-picker .pick {
  width: 42px; height: 42px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: #fff4f8;
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.avatar-picker .pick.active { border-color: var(--pink); background: #ffe7f0; transform: scale(1.06); }

.form-error {
  color: var(--danger);
  font-size: 13px;
  background: rgba(255, 77, 109, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 2px 0 12px;
}

.auth-form .btn-primary { width: 100%; margin-top: 4px; }
.privacy-note { margin: 20px 0 0; font-size: 11px; color: #b293a3; }
.auth-cs-btn {
  display: block;
  margin: 12px auto 0;
  font-size: 13px;
  color: var(--pink);
  text-decoration: underline;
}

/* ---------------- 首页 ---------------- */

.home-shell { height: 100vh; height: 100dvh; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 18px 10px;
}
.brand { font-weight: 800; font-size: 17px; letter-spacing: 1px; }
.site-logo {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 2px;
  vertical-align: -7px;
}

.home-body { flex: 1; padding: 10px 18px max(24px, env(safe-area-inset-bottom)); }
.pair-card { text-align: center; }
.pair-card h2 { margin: 4px 0 10px; font-size: 19px; }
.hint { color: var(--ink-2); font-size: 13px; line-height: 1.7; margin: 0 0 16px; }

.code-wrap { margin-top: 16px; }
.invite-code {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 10px;
  font-variant-numeric: tabular-nums;
  color: transparent;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  text-align: center;
  margin: 8px 0;
}
.code-wrap .btn-ghost { font-size: 13px; text-decoration: underline; }

.or-divider { display: flex; align-items: center; gap: 12px; color: #c3a3b2; font-size: 12px; margin: 18px 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: #f0dbe6; }

.inline-form { display: flex; gap: 8px; }
.inline-form .code-input {
  text-align: center;
  font-size: 20px;
  letter-spacing: 7px;
  font-weight: 700;
  flex: 1;
}
.inline-form .btn-primary { padding: 12px 18px; white-space: nowrap; }

.us-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.me-card, .partner-card { text-align: center; padding: 18px 8px; }
.heart-between { font-size: 28px; animation: beat 1.3s ease-in-out infinite; }
.role-tag {
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 8px;
  background: #fdf0f6;
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
}
.name { font-weight: 700; margin-top: 9px; overflow-wrap: anywhere; }
.partner-head { display: inline-block; position: relative; }
.partner-head .dot { position: absolute; right: 2px; bottom: 5px; }

@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.18); }
  30% { transform: scale(1); }
}

.love-days { text-align: center; margin-top: 16px; padding: 18px 20px; }
.days-label { font-size: 13px; color: var(--ink-2); }
.days-num { font-size: 34px; font-weight: 800; margin: 4px 0 2px; color: var(--pink); }
.online-text { font-size: 13px; color: var(--ok); }

.big-action { position: relative; width: 100%; margin-top: 18px; }

.call-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.shortcut-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--ink);
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}
.shortcut-btn:active { transform: scale(0.97); }
.sc-icon { font-size: 24px; }

#unbindBtn { display: block; margin: 22px auto 0; }

/* ---------------- 聊天页 ---------------- */

.chat-shell {
  height: 100vh;
  height: 100dvh;
}

/* 聊天/客服页整屏锁高：旧浏览器兜底 100vh，新版用 100dvh；消息区内部滚动 */
.view-chat,
.view-cs {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.chat-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  padding-inline-start: max(12px, env(safe-area-inset-left));
  padding-inline-end: max(12px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(190, 90, 140, 0.12);
  color: var(--pink);
  transition: transform 0.08s ease;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chat-partner { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; }
.chat-partner-text { min-width: 0; }
.chat-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-status { font-size: 12px; color: var(--ink-2); }
.chat-status.typing { color: var(--pink); }

.chat-actions { display: flex; gap: 6px; }
.chat-actions .icon-btn { background: linear-gradient(135deg, #fff, #ffeef5); }

.chat-msgs {
  flex: 1;
  min-height: 0;
  padding: 18px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.emoji-panel,
.chat-plus-panel,
.typing-tip {
  flex-shrink: 0;
}

.day-sep {
  align-self: center;
  font-size: 11px;
  color: #b797a7;
  background: rgba(255, 255, 255, 0.65);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 12px 0 4px;
}

.msg-row { display: flex; align-items: flex-end; gap: 7px; animation: msgIn 0.2s ease; max-width: 82%; }
.msg-row,
.msg-bubble {
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.partner { align-self: flex-start; }

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.msg-row .mini-avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}
.mini-avatar img,
.replay-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.msg-bubble {
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.msg-row.me .msg-bubble {
  background: linear-gradient(135deg, var(--pink), #ff88b0);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg-row.partner .msg-bubble {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 12px rgba(190, 90, 140, 0.10);
  border-bottom-left-radius: 6px;
}
.msg-time { font-size: 10px; color: #b293a3; margin-top: 3px; text-align: right; padding: 0 4px; }

.heart-msg .msg-bubble {
  background: transparent !important;
  box-shadow: none !important;
  font-size: 34px;
  padding: 0;
  text-align: center;
  animation: pulseHeart 1s ease-in-out infinite;
}
@keyframes pulseHeart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.msg-row .msg-bubble.media-bubble {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
  white-space: normal;
}
.chat-media-img {
  display: block;
  width: min(240px, 64vw);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(120, 60, 100, 0.16);
}
.chat-media-video {
  display: block;
  width: min(268px, 74vw);
  max-height: 320px;
  border-radius: 16px;
  background: #000;
  box-shadow: 0 6px 18px rgba(120, 60, 100, 0.16);
}
.voice-msg-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 86px;
  cursor: pointer;
  user-select: none;
}
.voice-msg-bubble.playing .voice-play-icon { animation: voicePulse 1s infinite; }
@keyframes voicePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.voice-bars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}
.voice-bars i {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.7;
}
.voice-bars i:nth-child(2) { height: 10px; }
.voice-bars i:nth-child(3) { height: 6px; }
.voice-bars i:nth-child(4) { height: 14px; }
.voice-msg-bubble.playing .voice-bars i {
  animation: voiceWave 0.7s ease-in-out infinite alternate;
}
.voice-msg-bubble.playing .voice-bars i:nth-child(2) { animation-delay: 0.12s; }
.voice-msg-bubble.playing .voice-bars i:nth-child(3) { animation-delay: 0.24s; }
.voice-msg-bubble.playing .voice-bars i:nth-child(4) { animation-delay: 0.36s; }
@keyframes voiceWave {
  from { height: 4px; }
  to { height: 16px; }
}
.voice-duration {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
  margin-left: 3px;
}
.msg-row.me .voice-bars i { background: #fff; }
.msg-row.partner .voice-bars i { background: #777; }
.sticker-bubble {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 58px;
  line-height: 1;
}
.msg-row .msg-bubble.sticker-bubble { background: transparent !important; }

.typing-tip {
  padding: 0 18px 5px;
  font-size: 12px;
  color: var(--pink);
  display: flex;
  align-items: center;
  gap: 5px;
}
.typing-tip span {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: blinkDot 1s infinite;
}
.typing-tip span:nth-child(2) { animation-delay: 0.2s; }
.typing-tip span:nth-child(3) { animation-delay: 0.4s; }

.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  padding-inline-start: max(12px, env(safe-area-inset-left));
  padding-inline-end: max(12px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
}
.msg-input { flex: 1; min-width: 0; border-radius: 999px; }
.composer-heart, .send-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.composer-heart { background: #fff2f7; font-size: 22px; transition: transform 0.1s ease; }
.composer-heart:active { transform: scale(0.86); }
.composer-media-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pink-2);
  transition: transform 0.08s ease, background 0.2s ease;
}
.composer-media-btn svg { width: 22px; height: 22px; }
.composer-media-btn:active { transform: scale(0.86); background: #f4eefb; }
.composer-media-btn.voice-active {
  background: #ffe6ef;
  color: var(--pink);
}
.voice-hold {
  flex: 1;
  height: 44px;   /* 更大的触摸热区，按起来更跟手 */
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  /* 关键：按住说话时不要把手势交给页面滚动/长按菜单，否则会频繁 pointercancel 导致「按了半天没反应」 */
  touch-action: none;
  -ms-touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.voice-hold.recording {
  background: #ffe6ef;
  color: var(--pink);
  border-color: var(--pink);
}
.voice-hold.cancel {
  background: #fff0f1;
  color: var(--danger);
  border-color: var(--danger);
}

/* 录音中的浮动提示（松开发送 / 上滑取消 + 计时） */
.voice-tip {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 260;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(35, 18, 32, 0.86);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.voice-tip .voice-tip-cancel {
  color: #ffb3c4;
  font-weight: 600;
}
.emoji-panel {
  max-height: 250px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 8px 8px 4px;
  overflow-y: auto;
}
.emoji-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.emoji-tab {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}
.emoji-tab.active { background: #ffe9f2; color: var(--pink); font-weight: 600; }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.emoji-grid button {
  border: 0;
  background: transparent;
  font-size: 24px;
  border-radius: 8px;
  padding: 5px 0;
}
.emoji-grid button:active { background: #f6edf2; transform: scale(1.1); }
.sticker-grid { grid-template-columns: repeat(4, 1fr); }
.sticker-grid button {
  font-size: 42px;
  height: 68px;
  background: #fff;
  border: 1px solid #f2e4eb;
  border-radius: 12px;
}
.chat-plus-panel {
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 12px 8px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.chat-plus-panel button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.chat-plus-panel button span {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff4f8;
  border-radius: 14px;
  font-size: 26px;
}
.chat-plus-panel button:active span { background: #ffe7f0; transform: scale(0.94); }
.chat-plus-panel em { font-style: normal; }
.send-btn {
  background: linear-gradient(135deg, var(--pink), #ff8fb2);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.35);
}
.send-btn svg { width: 20px; height: 20px; fill: #fff; stroke: #fff; stroke-width: 0.4; }

/* ---------------- 爱心飘屏 ---------------- */

.burst-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}
.burst-heart {
  position: absolute;
  bottom: -40px;
  animation: floatUp 2.6s ease-in forwards;
  will-change: transform, opacity;
  text-shadow: 0 4px 18px rgba(255, 90, 140, 0.35);
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(-115vh) scale(1.15) rotate(var(--rot, 12deg)); opacity: 0; }
}

/* ---------------- 通话浮层 ---------------- */

.call-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 130, 170, 0.55), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(161, 140, 209, 0.5), transparent 45%),
    linear-gradient(160deg, #2b1a2b, #171022);
  color: #fff;
  overflow: hidden;
}

.call-video-stage { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; }
.call-video-stage video { display: none; pointer-events: none; }
.call-overlay.video-mode .call-video-stage video { display: block; width: 100%; height: 100%; object-fit: cover; }
#remoteVideo { width: 100%; height: 100%; object-fit: cover; transform: none !important; }
#localVideo { transform: scaleX(-1); }
.call-video-unblock {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.call-video-stage.swapped #localVideo {
  position: absolute;
  inset: 0;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: 0;
  z-index: 0;
}
.call-video-stage.swapped #remoteVideo {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  left: auto;
  width: 116px;
  height: 160px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: #000;
  z-index: 3;
}
#localVideo {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 116px;
  height: 160px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  background: #000;
  z-index: 3;
  pointer-events: none;
  transform: scaleX(-1);
}
#remoteAudio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.call-info {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: max(30px, env(safe-area-inset-top));
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.call-overlay.video-mode .call-info { position: absolute; left: 0; right: 0; top: 0; padding: 120px 0 0; pointer-events: none; }
.call-overlay.video-mode .call-info .avatar { width: 82px; height: 82px; font-size: 44px; }
.call-name { font-size: 25px; font-weight: 700; letter-spacing: 1px; max-width: 80%; overflow-wrap: anywhere; }
.call-status { font-size: 15px; opacity: 0.85; min-height: 22px; font-variant-numeric: tabular-nums; }

.call-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(15, 8, 18, 0.28);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.call-btn {
  width: 78px;
  border: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
  transition: transform 0.08s ease, background 0.2s ease;
}
.call-btn:active { transform: scale(0.94); }
.call-btn .cb-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; background: rgba(255,255,255,0.12); }
.call-btn.accept .cb-icon { background: var(--ok); }
.call-btn.reject .cb-icon, .call-btn.hangup .cb-icon { background: var(--danger); }
.call-btn.off .cb-icon { background: rgba(255, 255, 255, 0.08); opacity: 0.55; }
.call-btn.off { opacity: 0.7; }

/* 横屏和窄屏通话按钮要放在基础样式之后，才能覆盖默认尺寸 */
@media (orientation: landscape) {
  #localVideo {
    width: 96px;
    height: 132px;
    top: max(10px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }
  .call-video-stage.swapped #remoteVideo {
    width: 96px;
    height: 132px;
    right: max(12px, env(safe-area-inset-right));
  }
  .call-btn {
    width: 66px;
    padding: 8px 4px;
    font-size: 12px;
    border-radius: 22px;
  }
  .call-btn .cb-icon {
    width: 34px;
    height: 34px;
  }
  .call-actions {
    gap: 10px;
    padding: 6px max(14px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
  .call-overlay.video-mode .call-info {
    padding-top: 34px;
  }
  .call-overlay.video-mode .call-info .avatar {
    width: 54px;
    height: 54px;
    font-size: 28px;
  }
}
@media (max-width: 340px) {
  .call-btn {
    width: 60px;
  }
  .call-btn .cb-icon {
    width: 32px;
    height: 32px;
  }
}

.ring-pulse { animation: ringPulse 1.5s ease-out infinite; }
@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
  100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); }
}

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  pointer-events: none;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(30, 20, 30, 0.9);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  max-width: 86vw;
  text-align: center;
  animation: toastIn 0.2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- 账号提示弹窗 ---------------- */

.app-modal-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 300;
  background: rgba(35, 18, 32, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  backdrop-filter: blur(4px);
}
.app-modal-card {
  width: 100%;
  max-width: 360px;
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.25);
  padding: 28px 24px 22px;
  text-align: center;
}
.app-modal-icon { font-size: 44px; }
.app-modal-card h3 { margin: 10px 0 8px; font-size: 18px; }
.app-modal-card p { color: var(--ink-2); font-size: 14px; line-height: 1.7; margin: 0 0 16px; }
.cs-card {
  background: #fff4f8;
  border: 1px solid #f6d9e6;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 18px;
}
.cs-label { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.app-modal-card .btn-primary { width: 100%; }

/* 桌面端美化 */
@media (min-width: 760px) {
  .page { padding: 0; }
  .shell { box-shadow: 0 0 80px rgba(200, 130, 170, 0.18); border-left: 1px solid rgba(255,255,255,0.55); border-right: 1px solid rgba(255,255,255,0.55); }
}

/* ==================================================
   首页：情侣头像条 + 参考站时光卡（复刻至 lgnewui-day-wrapper 结束）
   ================================================== */

.home-lovers-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 18px 16px 14px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(190, 90, 140, 0.12);
  text-align: center;
}

.home-lovers-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  width: 100%;
}

.home-lover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 64px;
}

.home-lover-avatar {
  width: 58px;
  height: 58px;
  font-size: 30px;
}

.home-lover-avatar-wrap {
  position: relative;
  display: inline-flex;
  line-height: 0;
}

.home-lover-avatar-wrap .dot {
  position: absolute;
  right: -2px;
  bottom: 1px;
}

.home-lover-name {
  max-width: 96px;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-lovers-heart {
  margin-top: 16px;
  font-size: 24px;
  animation: beat 1.3s ease-in-out infinite;
}

.home-online-text {
  font-size: 12px;
  color: var(--ok);
}

/* ---- 参考站时光卡 ---- */

.lgnewui-day-wrapper {
  --ll-day-card-bg: rgba(255, 255, 255, 0.88);
  --ll-day-text-main: #2d3748;
  --ll-day-text-sub: #718096;
  --ll-day-text-light: #a0aec0;
  --ll-day-accent: #e53e3e;
  --ll-day-font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
  --ll-day-font-cn-serif: Georgia, "Songti SC", "Noto Serif SC", "STSong", serif;
  --ll-day-font-nums: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, ui-monospace, monospace;
  width: 100%;
  box-sizing: border-box;
  margin: 16px auto 0;
  animation: ll-home-rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes ll-home-rise {
  0% { opacity: 0; transform: translateY(10px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.lgnewui-day-fusion-card {
  background-color: var(--ll-day-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 46px 28px 34px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 10px 20px -10px rgba(0, 0, 0, 0.04);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 34px;
  overflow: hidden;
  border: 1px solid rgba(227, 227, 227, 0.6);
  text-align: center;
}

.lgnewui-day-ambient-light {
  position: absolute;
  bottom: -150px;
  right: -100px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 182, 193, 0.45) 0%, rgba(230, 230, 250, 0.28) 40%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  filter: blur(58px);
  z-index: 0;
  pointer-events: none;
}

.lgnewui-day-mac-dots {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 7px;
  z-index: 10;
}

.lgnewui-day-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lgnewui-day-dot-red { background-color: #ff5f57; }
.lgnewui-day-dot-yellow { background-color: #ffbd2e; }
.lgnewui-day-dot-green { background-color: #28c840; }

.lgnewui-day-left-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.lgnewui-day-title-container {
  margin-bottom: 26px;
  text-align: left;
}

.lgnewui-day-poetic-title {
  font-family: var(--ll-day-font-cn-serif);
  font-size: 25px;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.6;
  letter-spacing: 0.05em;
  margin: 0;
}

.lgnewui-day-start-date-capsule {
  display: inline-flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 5px 12px 5px 5px;
  border-radius: 50px;
  gap: 10px;
  width: fit-content;
  transition: all 0.3s ease;
  cursor: default;
}

.lgnewui-day-start-date-capsule:hover {
  background-color: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.lgnewui-day-icon-circle {
  width: 28px;
  height: 28px;
  background-color: var(--ll-day-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 93, 122, 0.32);
}

.lgnewui-day-icon-circle svg {
  width: 15px;
  height: 15px;
  animation: lgnewui-day-heartbeat 2s infinite ease-in-out;
}

.lgnewui-day-timer-val.lgnewui-day-anim-active {
  animation: lgnewui-day-silky-reveal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes lgnewui-day-silky-reveal {
  0% { opacity: 0; transform: translateY(5px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lgnewui-day-heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.15); }
  70% { transform: scale(1); }
}

.lgnewui-day-date-text-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  justify-content: center;
}

.lgnewui-day-date-label-small {
  font-family: var(--ll-day-font-ui);
  font-size: 9px;
  color: var(--ll-day-text-light);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.lgnewui-day-date-value-clean {
  font-family: var(--ll-day-font-nums);
  font-size: 14px;
  font-weight: 600;
  color: var(--ll-day-text-sub);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.lgnewui-day-right-section {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.lgnewui-day-main-days-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.lgnewui-day-main-days-number {
  font-family: var(--ll-day-font-nums);
  font-variant-numeric: tabular-nums;
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #1a202c 0%, #4a5568 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #1a202c;
  display: inline-block;
}

.lgnewui-day-days-divider {
  width: 40px;
  height: 4px;
  background-color: var(--ll-day-accent);
  border-radius: 2px;
  margin: 5px auto 10px;
}

.lgnewui-day-days-label {
  font-family: var(--ll-day-font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--ll-day-text-light);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-right: -0.4em;
}

.lgnewui-day-digital-timer {
  display: flex;
  gap: 26px;
  justify-content: center;
}

.lgnewui-day-timer-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lgnewui-day-timer-val {
  font-family: var(--ll-day-font-nums);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 600;
  color: var(--ll-day-text-main);
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lgnewui-day-timer-label {
  margin-top: 8px;
  font-family: var(--ll-day-font-ui);
  font-size: 10px;
  color: var(--ll-day-text-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

@media (max-width: 480px) {
  .lgnewui-day-fusion-card {
    padding: 42px 22px 30px;
  }
  .lgnewui-day-main-days-number {
    font-size: 20vw;
  }
  .lgnewui-day-digital-timer {
    gap: 20px;
  }
  .lgnewui-day-timer-val {
    font-size: 24px;
  }
}

@media (min-width: 768px) {
  .lgnewui-day-fusion-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 48px 54px;
    gap: 42px;
    text-align: left;
  }
  .lgnewui-day-left-section {
    align-items: flex-start;
  }
  .lgnewui-day-title-container { margin-bottom: 0; }
  .lgnewui-day-right-section { align-items: flex-end; }
  .lgnewui-day-digital-timer { justify-content: flex-end; }
}

/* ==================================================
   首页：背景轮播 hero
   ================================================== */

.home-hero {
  position: relative;
  height: 330px;
  min-height: 300px;
  margin-top: 8px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 18px 44px rgba(120, 60, 100, 0.24);
  -webkit-tap-highlight-color: transparent;
}

.home-hero-slides {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  background-size: cover;
  background-position: center;
  will-change: opacity, transform;
}

.home-hero-slide.active {
  opacity: 1;
  animation: home-hero-kenburns 18s ease-in-out infinite alternate;
}

.home-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes home-hero-kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* 场景 1：暮色霞光 */
.home-bg-sunset {
  background:
    radial-gradient(circle at 70% 26%, rgba(255, 247, 214, 0.96) 0 46px, rgba(255, 247, 214, 0) 48px),
    radial-gradient(circle at 18% 76%, rgba(255, 255, 255, 0.28) 0 90px, rgba(255, 255, 255, 0) 91px),
    linear-gradient(178deg, #ffdde9 0%, #ffb3ab 48%, #f76d6d 100%);
}

.home-bg-sunset::after {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -24%;
  height: 55%;
  background: linear-gradient(180deg, rgba(116, 38, 60, 0) 0%, rgba(116, 38, 60, 0.55) 100%);
  clip-path: polygon(0 42%, 12% 25%, 24% 45%, 38% 18%, 52% 42%, 65% 28%, 78% 46%, 90% 24%, 100% 42%, 100% 100%, 0 100%);
}

/* 场景 2：星光夜色 */
.home-bg-starry {
  background:
    radial-gradient(1.5px 1.5px at 18% 22%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 32% 66%, #ffe9f2, transparent),
    radial-gradient(1.5px 1.5px at 55% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 74% 42%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 70%, #ffe9f2, transparent),
    radial-gradient(2px 2px at 42% 46%, #ffffffcc, transparent),
    linear-gradient(176deg, #191245 0%, #35206a 48%, #6b3f96 100%);
}

.home-bg-starry::before {
  content: "";
  position: absolute;
  top: 16%;
  right: 18%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #fffdf0 0 12px, #f9eecb 13px 19px, rgba(249, 238, 203, 0) 20px);
  box-shadow: 0 0 34px rgba(255, 241, 190, 0.65);
}

.home-bg-starry::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(42, 20, 84, 0) 0%, rgba(20, 10, 52, 0.68) 100%);
  clip-path: polygon(0 52%, 14% 30%, 29% 56%, 44% 22%, 60% 58%, 75% 34%, 90% 60%, 100% 44%, 100% 100%, 0 100%);
}

/* 场景 3：海风晨光 */
.home-bg-seaside {
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, 0.9) 0 30px, rgba(255, 255, 255, 0) 31px),
    radial-gradient(circle at 30% 72%, rgba(255, 255, 255, 0.2) 0 110px, rgba(255, 255, 255, 0) 111px),
    linear-gradient(176deg, #a8e6ff 0%, #7fd8ff 42%, #6ec6ff 60%, #ffc9e2 100%);
}

.home-bg-seaside::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(178deg, rgba(50, 122, 175, 0.12) 0%, rgba(50, 122, 175, 0.34) 52%, rgba(32, 92, 140, 0.58) 100%);
  clip-path: polygon(0 30%, 10% 62%, 22% 34%, 34% 70%, 46% 38%, 60% 74%, 72% 44%, 84% 68%, 100% 40%, 100% 100%, 0 100%);
}

/* 场景 4：花海梦境 */
.home-bg-blossom {
  background:
    radial-gradient(7px 7px at 16% 24%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(6px 6px at 28% 18%, #ffe3f0, transparent),
    radial-gradient(8px 8px at 62% 28%, #fff, transparent),
    radial-gradient(7px 7px at 78% 20%, #ffe3f0, transparent),
    radial-gradient(9px 9px at 42% 34%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(8px 8px at 88% 40%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(6px 6px at 52% 22%, rgba(255, 255, 255, 0.7), transparent),
    linear-gradient(176deg, #ffe0ef 0%, #dcc8ff 55%, #9d8bff 100%);
}

.home-bg-blossom::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -32%;
  height: 60%;
  background: radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.22) 0 46px, rgba(255, 255, 255, 0) 48px),
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.18) 0 52px, rgba(255, 255, 255, 0) 54px),
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.22) 0 42px, rgba(255, 255, 255, 0) 44px);
  clip-path: polygon(0 62%, 14% 28%, 28% 66%, 42% 34%, 56% 70%, 70% 38%, 84% 72%, 100% 42%, 100% 100%, 0 100%);
}

.home-hero-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.16) 48%, rgba(0, 0, 0, 0.42) 100%);
  pointer-events: none;
}

.home-hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  pointer-events: none;
}

.home-hero-couple {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 30px;
}

.home-hero-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 76px;
}

.home-hero-avatar {
  width: 72px;
  height: 72px;
  font-size: 38px;
  border-width: 3px;
  box-shadow: 0 8px 24px rgba(40, 20, 60, 0.28);
}

.home-hero-avatar-wrap {
  position: relative;
  display: inline-flex;
  line-height: 0;
}

.home-hero-avatar-wrap .dot {
  position: absolute;
  right: 1px;
  bottom: 4px;
  width: 13px;
  height: 13px;
  border-width: 2px;
}

.home-hero-heart {
  margin-top: 22px;
  font-size: 26px;
  filter: drop-shadow(0 4px 10px rgba(180, 30, 90, 0.35));
  animation: beat 1.3s ease-in-out infinite;
}

.home-hero-name {
  max-width: 104px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-hero-online {
  padding: 6px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.home-hero-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

.home-hero-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-hero-dot.active {
  width: 20px;
  background: #fff;
}

@media (max-width: 480px) {
  .home-hero {
    height: 300px;
  }
  .home-hero-avatar {
    width: 64px;
    height: 64px;
    font-size: 34px;
  }
}

/* ==================================================
   信息页：对话回放入口
   ================================================== */

.replay-entry {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(190, 90, 140, 0.08);
  color: var(--ink);
  text-align: left;
  transition: transform 0.08s ease, box-shadow 0.2s ease;
}

.replay-entry:active {
  transform: scale(0.985);
  box-shadow: 0 4px 14px rgba(190, 90, 140, 0.12);
}

.replay-entry-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #1d1d1f 0%, #4b5563 100%);
  box-shadow: 0 6px 16px rgba(29, 29, 31, 0.2);
}

.replay-entry-icon svg {
  width: 21px;
  height: 21px;
}

.replay-entry-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.replay-entry-title {
  font-size: 15px;
  font-weight: 700;
}

.replay-entry-sub {
  font-size: 12px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-entry-arrow {
  font-size: 22px;
  color: #d8c1cd;
}

/* ==================================================
   对话回放页（参考 about.php 聊天设备效果）
   ================================================== */

.replay-shell {
  position: relative;
  height: 100vh;
  height: 100dvh;
}

.replay-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  z-index: 5;
}

.replay-body {
  flex: 1;
  padding: 18px 16px 108px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 214, 229, 0.55) 0 90px, rgba(255, 255, 255, 0) 92px),
    radial-gradient(circle at 92% 88%, rgba(216, 204, 255, 0.5) 0 130px, rgba(255, 255, 255, 0) 132px),
    linear-gradient(180deg, #fbf6fa 0%, #f4f0fb 100%);
}

.replay-loading {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-2);
  font-size: 13px;
}

.replay-loading span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink);
  animation: replay-dot 1.1s ease-in-out infinite;
}

.replay-loading span:nth-child(2) { animation-delay: 0.15s; }
.replay-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes replay-dot {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-5px); opacity: 1; }
}

.replay-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 16px;
}

.replay-notice::before,
.replay-notice::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1));
}

.replay-notice::after {
  background: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.1));
}

.replay-notice span {
  background: rgba(0, 0, 0, 0.04);
  color: #a1a1a6;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.replay-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 9px 0;
  max-width: 88%;
  animation: replay-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes replay-in {
  0% { opacity: 0; transform: translateY(10px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.replay-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 8px rgba(180, 90, 140, 0.12);
}

.replay-row .replay-bubble {
  max-width: 76%;
  font-size: 15px;
  line-height: 1.5;
  padding: 10px 16px;
  border-radius: 20px;
  overflow-wrap: anywhere;
  transition: transform 0.1s;
}

.replay-row.partner {
  align-self: flex-start;
  justify-content: flex-start;
}

.replay-row.partner .replay-bubble {
  background: #ffffff;
  color: #1d1d1f;
  border-bottom-left-radius: 4px;
}

.replay-row.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.replay-row.mine .replay-bubble {
  background: #007aff;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.replay-row.mine .replay-bubble.replay-heart {
  background: linear-gradient(135deg, #ff6b9d, #ff8fb2);
  box-shadow: 0 6px 18px rgba(255, 107, 157, 0.28);
}

.replay-row.partner .replay-bubble.replay-heart {
  background: linear-gradient(135deg, #ff8fb2, #ffb3c6);
}

.replay-row .replay-bubble.replay-media-bubble {
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
}
.replay-media-img {
  display: block;
  width: min(220px, 58vw);
  border-radius: 16px;
}
.replay-media-video {
  display: block;
  width: min(250px, 68vw);
  max-height: 300px;
  border-radius: 16px;
  background: #000;
}
.replay-row .replay-bubble.replay-sticker-bubble {
  padding: 0;
  background: transparent !important;
  font-size: 58px;
  line-height: 1;
}

.replay-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 12px;
  background: #fff;
  border-radius: 20px;
  border-bottom-left-radius: 4px;
}

.replay-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.replay-typing i:nth-child(1) { animation-delay: -0.32s; }
.replay-typing i:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.replay-console {
  position: absolute;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(120, 60, 100, 0.16);
  z-index: 20;
}

.replay-ctl-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.08s ease, background 0.2s ease;
}

.replay-ctl-btn svg {
  width: 18px;
  height: 18px;
}

.replay-ctl-btn:active {
  transform: scale(0.9);
}

.replay-ctl-btn.replay-ctl-main {
  width: 46px;
  height: 46px;
  background: #1d1d1f;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

#replaySpeedBtn {
  min-width: 42px;
  font-variant-numeric: tabular-nums;
}

/* ---- 信息页内联对话回放（自动播放，不跳转新页面） ---- */

#view-messages {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

#view-messages .page-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#view-messages .home-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: max(100px, calc(env(safe-area-inset-bottom) + 82px));
}

#messages-bound {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.replay-inline {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  margin: 12px 0 20px;
  padding: 16px 14px 12px;
  overflow: hidden;
  height: 400px;
  height: min(680px, max(400px, calc(100vh - 300px)));
  height: min(680px, max(400px, calc(100dvh - 300px)));
}

.replay-inline-head {
  text-align: left;
  margin-bottom: 4px;
}

.replay-inline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
}

.replay-inline-sub {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.2px;
  color: var(--ink-2);
}

.lgnewui-replay-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 18px 18px 0 0;
  margin-top: 10px;
}

.lgnewui-replay-avatar {
  width: 38px;
  height: 38px;
  font-size: 20px;
}

.lgnewui-replay-header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lgnewui-replay-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #1d1d1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lgnewui-replay-status {
  font-size: 12px;
  color: #8e8e93;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}

.lgnewui-chat-status-dot {
  width: 8px;
  height: 8px;
  background: #34c759;
  border-radius: 50%;
  flex-shrink: 0;
}

.replay-inline-status {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pink);
}

.replay-body-inline {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  margin: 12px 0 2px;
  padding: 20px 14px 24px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 0 0 18px 18px;
  background: #f5f5f7;
  scrollbar-width: none;
}

.replay-body-inline .replay-loading {
  min-height: 90px;
}

.replay-console-inline {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: auto;
  min-width: 250px;
  justify-content: center;
  margin-top: 8px;
  align-self: center;
  justify-content: space-between;
  gap: 2px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: 26px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.replay-console-inline .replay-ctl-btn {
  width: 40px;
  height: 40px;
}

.replay-console-inline .replay-ctl-btn.replay-ctl-main {
  width: 44px;
  height: 44px;
}

.replay-console-inline .replay-ctl-main.paused {
  background: #ff2d55;
  animation: pulse-pink 2s infinite;
}

@keyframes pulse-pink {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 45, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); }
}

/* ==================================================
   我的页（微信式整洁列表 + 编辑资料内页）
   ================================================== */

.me-profile-row {
  width: 100%;
  padding: 18px 16px;
  margin-top: 0;
}

.me-list-avatar {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  font-size: 30px;
}

.wechat-me-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #f5edf1;
  font-size: 14px;
}

button.wechat-me-row {
  cursor: pointer;
}

.wechat-me-row:active {
  background: #faf2f6;
}

.wechat-me-row.static {
  cursor: default;
}

.wechat-me-row.danger .me-row-name {
  color: var(--danger);
  text-align: center;
}

.wechat-me-row.danger {
  justify-content: center;
}

.me-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.me-row-name {
  font-weight: 600;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-row-sub {
  font-size: 12px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-row-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 17px;
  background: #f7f0f4;
}
.me-row-icon svg { width: 19px; height: 19px; }

.me-list-group {
  margin-top: 14px;
  background: #fff;
  border: 1px solid #f3e9ee;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(190, 90, 140, 0.06);
}

.me-list-group .wechat-me-row:last-child {
  border-bottom: 0;
}

.me-list-actions {
  margin-bottom: 8px;
}

.profile-edit-title {
  font-size: 16px;
  font-weight: 700;
}

.profile-edit-card {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(190, 90, 140, 0.1);
  padding: 22px 18px 20px;
}

/* ==================================================
   图片 / 视频全屏查看
   ================================================== */

.media-viewer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.media-viewer-body {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mediaViewerIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.media-viewer-body img,
.media-viewer-body video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.media-viewer-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 42px;
  height: 42px;
  z-index: 501;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.media-viewer-close svg {
  width: 21px;
  height: 21px;
}

@keyframes mediaViewerIn {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.boot-loading {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 130, 170, 0.4), transparent 42%),
    radial-gradient(circle at 84% 80%, rgba(161, 140, 209, 0.36), transparent 42%),
    linear-gradient(160deg, #fff7fa, #f7f1ff);
}

.boot-loading p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 1px;
}

.boot-loading-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255, 107, 157, 0.2);
  border-top-color: var(--pink);
  animation: bootSpin 0.8s linear infinite;
}

@keyframes bootSpin {
  to { transform: rotate(360deg); }
}

/* ===== 运营能力：注册协议 / 举报 / 公告与版本 ===== */

.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 2px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  text-align: left;
}
.agree-row input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--pink);
  flex-shrink: 0;
}

/* 「记住密码」勾选项：注册 / 登录都显示 */
.remember-row {
  margin: 8px 0 2px;
  color: var(--ink);
}
.agree-row a {
  color: var(--pink);
  text-decoration: none;
}

.field-static {
  background: #fff;
  border: 1px solid #efdce6;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  color: var(--ink);
  min-height: 18px;
}
.field-select,
.field-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #efdce6;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  padding: 10px 12px;
  outline: none;
}
.field-select:focus,
.field-textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.12);
}
.field-textarea {
  resize: vertical;
  min-height: 64px;
}

.me-row-icon.report {
  background: #fff1f4;
}
.me-row-icon.update {
  background: #eef8ff;
}
.modal-btn-row .btn-primary.half:disabled {
  opacity: 0.6;
}

/* ===== 聊天页直接拍照（参考微信相机） ===== */

.camera-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-shell {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 520px;
  overflow: hidden;
  background: #000;
}
#cameraVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-head {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 2;
}
.camera-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 20px;
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.camera-btn:active { background: rgba(255, 255, 255, 0.45); }
.camera-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.camera-shutter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2);
}
.camera-shutter:active { background: #fff; }
.camera-tip {
  margin: 0 26px;
  color: #fff;
  font-size: 13px;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ===== 消息撤回 / 回复引用（参考微信） ===== */

.msg-recall-line {
  align-self: center;
  font-size: 11px;
  color: #ad8b9b;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 4px 0;
  max-width: 100%;
}
.msg-call-line {
  color: #9b7f90;
  background: rgba(255, 255, 255, 0.72);
}

.msg-quote {
  display: block;
  background: rgba(0, 0, 0, 0.045);
  border-left: 2px solid rgba(255, 107, 157, 0.6);
  border-radius: 5px;
  padding: 5px 8px;
  margin: 0 0 5px;
  font-size: 12px;
  color: var(--ink-2);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-row.me .msg-quote {
  border-left-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
}
.replay-row.mine .msg-quote {
  border-left-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.reply-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff7fa;
  border-top: 1px solid var(--line);
}
.reply-bar-info {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.5;
}
#replyBarLabel {
  color: var(--pink);
  font-weight: 700;
  margin-right: 6px;
}
#replyBarText {
  color: var(--ink-2);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reply-bar-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #f3e6ed;
  color: var(--ink-2);
  flex-shrink: 0;
}

.msg-inline-actions {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  padding: 2px 4px 0;
}
.msg-row.me .msg-inline-actions {
  justify-content: flex-end;
}
.msg-inline-action {
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 1px 5px rgba(190, 90, 140, 0.12);
}
.msg-inline-action:active {
  background: #ffe7f0;
  color: var(--pink);
}
.msg-inline-action.danger {
  color: var(--danger);
}

/* ===== 全站统一线性图标（微信风格：细描边 + 圆角端点） ===== */

.me-row-icon svg,
.chat-plus-panel button span svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chat-plus-panel button span svg {
  width: 28px;
  height: 28px;
}
.chat-plus-panel button span {
  color: var(--pink);
}
.call-btn .cb-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.call-btn.accept .cb-icon svg,
.call-btn .cb-icon svg {
  stroke: #fff;
}
.reply-bar-close {
  font-size: 14px;
}

/* 注册页（微信式：昵称 / 手机号 / 验证码 / 密码 / 协议） */
.code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-row input {
  flex: 1;
  min-width: 0;
}
.code-row button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--pink);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 0 14px;
  height: 42px;
}
.code-row button:disabled {
  color: #c3a3b2;
  opacity: 0.8;
}
.form-hint {
  margin: -4px 2px 8px;
  font-size: 12px;
  color: var(--ink-2);
  text-align: left;
}
.profile-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0 14px;
}
.me-row-icon.notify {
  background: #fff7e8;
}
.switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e6dbe2;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}
.switch.on {
  background: var(--pink);
}
.switch.on::after {
  transform: translateX(18px);
}

/* 编辑资料页：微信式分组卡片 */
.profile-scroll {
  padding: 12px 0 max(100px, env(safe-area-inset-bottom));
}
.profile-section {
  margin: 0 16px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(190, 90, 140, 0.07);
}
.profile-section-gap {
  margin-top: 18px;
}
.profile-cell {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #f6eef2;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.profile-cell:last-child {
  border-bottom: 0;
}
.profile-cell-label {
  width: 72px;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 500;
}
.profile-cell input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  text-align: right;
  font-size: 15px;
  color: var(--ink);
  padding: 12px 0;
}
.profile-cell input::placeholder {
  color: #c1a9b7;
  font-size: 13px;
}
.profile-avatar-cell {
  min-height: 78px;
  cursor: pointer;
}
.profile-avatar-cell:active {
  background: #faf2f6;
}
.profile-avatar-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  margin-left: auto;
}
.avatar.profile-avatar {
  width: 60px;
  height: 60px;
  font-size: 28px;
}
.avatar-edit-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-edit-badge svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-save {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px 0;
}
.profile-tip {
  margin: 10px 18px 0;
}
.profile-hint {
  margin: 10px 18px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}
/* 我的页面重构：分组标题 + 底部导航安全距离 */
#view-me {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
#view-me .page-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
#view-me .home-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(148px, calc(env(safe-area-inset-bottom) + 136px));
}
.me-hero {
  position: relative;
  margin: 2px 16px 0;
  padding: 4px;
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(135deg, var(--pink) 0%, var(--violet) 100%);
  box-shadow: 0 10px 26px rgba(190, 90, 140, 0.22);
}

.me-hero::after {
  content: '💗';
  position: absolute;
  right: -6px;
  bottom: -16px;
  font-size: 78px;
  line-height: 1;
  opacity: 0.18;
  transform: rotate(-12deg);
  pointer-events: none;
}

.me-hero::before {
  content: '';
  position: absolute;
  left: -30px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.me-hero-main {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}
.me-hero-main:active {
  opacity: 0.92;
}
.me-hero-avatar {
  width: 64px;
  height: 64px;
  font-size: 30px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 6px 16px rgba(120, 40, 80, 0.18);
}
.me-hero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.me-hero-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(120, 40, 80, 0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-hero-id {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-hero-status {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.me-hero-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.9;
}
.me-hero-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.me-group-title {
  margin: 18px 22px 8px;
  font-size: 12px;
  color: #b293a3;
  letter-spacing: 0.5px;
}
.me-bottom-space {
  height: 18px;
}
.wechat-me-row.danger {
  justify-content: center;
  text-align: center;
}
.wechat-me-row.danger .me-row-main {
  align-items: center;
}
.wechat-me-row.danger .me-row-sub {
  color: #c98ba1;
  font-size: 11px;
}
.btn-primary.btn-danger {
  background: linear-gradient(135deg, #ff5c7a, #ff8fa3);
  box-shadow: 0 8px 20px rgba(255, 77, 109, 0.28);
}

/* 危险操作确认按钮的防误触倒计时状态 */
.btn-primary.btn-danger:disabled {
  opacity: 0.6;
  box-shadow: none;
  cursor: default;
}
.btn-plain.full {
  width: 100%;
  display: block;
  margin-top: 8px;
}
.app-modal-card p {
  white-space: pre-line;
}
/* 表单错误提示：红色描边定位到具体输入框 */
.field input.input-error,
.code-row input.input-error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.12) !important;
}
.form-error {
  line-height: 1.6;
}

/* ===== 键盘弹出适配：隐藏底部导航、压缩留白，避免页面被顶 ===== */
body.keyboard-open .tabbar,
body.keyboard-open .tabbar-shield {
  display: none !important;
}
body.keyboard-open .home-body,
body.keyboard-open .page-shell .scrollable {
  padding-bottom: 20px !important;
}
body.keyboard-open #view-me .home-body,
body.keyboard-open #view-messages .home-body {
  padding-bottom: 24px !important;
}
/* iOS 输入聚焦时若字号小于 16px 会自动放大页面，这里统一 16px 防止跳动 */
input,
select,
textarea {
  font-size: 16px;
}
/* 关键输入框强制 16px，避免 iOS 聚焦自动放大页面 */
#authUsername, #authPassword, #authPassword2, #authNickname,
#joinCode, #msgInput, #csInput, #meNickname, #meLoginId,
#mePhone, #meEmail, #pwdOld, #pwdNew, #pwdNew2, #reportDetail {
  font-size: 16px;
}

/* ===== 我的页面压缩：减少纵向长度 ===== */
#view-me .home-body {
  padding-bottom: max(122px, calc(env(safe-area-inset-bottom) + 110px));
}
.me-hero {
  margin: 4px 14px 0;
}
.me-hero-main {
  padding: 12px 14px;
  gap: 11px;
}
.me-hero-avatar {
  width: 54px;
  height: 54px;
  font-size: 26px;
}
.me-hero-name {
  font-size: 17px;
}
.me-hero-id,
.me-hero-status {
  font-size: 11.5px;
}
.me-group-title {
  margin: 12px 20px 6px;
}
.me-list-group {
  margin-top: 10px;
}
.wechat-me-row {
  padding: 10px 14px;
  gap: 10px;
}
.me-row-icon {
  width: 30px;
  height: 30px;
  font-size: 15px;
  border-radius: 9px;
}
.me-row-name {
  font-size: 14.5px;
}
.me-row-sub {
  font-size: 11.5px;
}
.me-list-avatar {
  width: 52px;
  height: 52px;
  font-size: 26px;
}
.me-bottom-space {
  height: 6px;
}
.profile-cell {
  min-height: 50px;
}
.profile-avatar-cell {
  min-height: 68px;
}

/* ===== 全项目自适应：不同尺寸手机屏幕 ===== */
html {
  -webkit-text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
}
.page-head {
  padding-left: clamp(14px, 4.2vw, 22px);
  padding-right: clamp(14px, 4.2vw, 22px);
}
.home-body {
  padding-left: clamp(12px, 3.6vw, 20px);
  padding-right: clamp(12px, 3.6vw, 20px);
}
.page-head h2 {
  font-size: clamp(20px, 5.6vw, 25px);
}
.chat-name {
  font-size: clamp(14px, 4vw, 16px);
}
.msg-bubble {
  font-size: clamp(14px, 4vw, 15.5px);
}

/* 小屏（iPhone SE / 老安卓） */
@media (max-width: 360px) {
  .tab-btn {
    width: 74px;
    font-size: 12px;
  }
  .me-hero-avatar {
    width: 48px;
    height: 48px;
    font-size: 23px;
  }
  .wechat-me-row {
    padding: 9px 12px;
  }
  .composer {
    gap: 5px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .composer-media-btn {
    width: 30px;
    height: 30px;
  }
  .send-btn {
    width: 38px;
    height: 38px;
  }
  .replay-console-inline {
    min-width: 0;
    width: 100%;
  }
}

/* 大屏手机 / 折叠屏 */
@media (min-width: 431px) {
  .home-body {
    padding-left: 22px;
    padding-right: 22px;
  }
  .me-hero-main {
    padding: 14px 16px;
  }
}

/* 平板 / 桌面 */
@media (min-width: 720px) {
  .view {
    max-width: 560px;
  }
}

	 /* ===== 已绑定状态（我的页面）再压缩，减少纵向长度 ===== */
#view-me .home-body {
  padding-top: 4px;
}
#view-me .me-list-group {
  margin-top: 8px;
}
#view-me .me-group-title {
  margin: 10px 20px 4px;
}
#view-me .wechat-me-row {
  min-height: 46px;
  padding: 9px 14px;
}
#view-me .me-row-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-radius: 8px;
}
#view-me .me-row-main {
  gap: 2px;
}
#view-me .me-row-name {
  font-size: 14px;
}
#view-me .me-row-sub {
  font-size: 11px;
}
#meBoundGroup {
  margin-top: 8px;
}
#view-me .me-list-actions {
  margin-top: 8px;
}
#view-me .me-hero-status {
  font-size: 11px;
  padding: 2px 9px;
}
#view-me .me-hero {
  margin-bottom: 0;
}
#view-me .me-bottom-space {
  height: 4px;
}

/* ===== 我的页面第二轮压缩（约再减 10%） ===== */
#view-me .me-group-title {
  display: none;
}
#view-me .home-body {
  padding-bottom: max(112px, calc(env(safe-area-inset-bottom) + 100px));
}
#view-me .wechat-me-row {
  min-height: 44px;
  padding: 8px 14px;
}
#view-me .me-list-group {
  margin-top: 6px;
}
#view-me .me-hero {
  margin: 2px 14px 0;
}
#view-me .me-hero-main {
  padding: 10px 14px;
  gap: 10px;
}
#view-me .me-hero-avatar {
  width: 48px;
  height: 48px;
  font-size: 23px;
}
#view-me .me-hero-name {
  font-size: 16px;
}
#view-me .me-hero-id {
  font-size: 11px;
}
#view-me .me-hero-status {
  font-size: 10.5px;
  padding: 2px 8px;
  margin-top: 1px;
}
#view-me .me-row-icon {
  width: 26px;
  height: 26px;
  font-size: 13px;
  border-radius: 8px;
}
#view-me .me-row-name {
  font-size: 13.5px;
}
#view-me .me-row-sub {
  font-size: 10.5px;
}
#view-me .me-list-actions {
  margin-top: 6px;
}
#meBoundGroup {
  margin-top: 6px;
}
#view-me .profile-avatar-cell {
  min-height: 60px;
}

/* ===== 实名认证页 ===== */
.verify-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.verify-status-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff4f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.verify-status-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.verify-photo-cell {
  min-height: 64px;
}
.verify-photo-wrap {
  position: relative;
  margin-left: auto;
  width: 76px;
  height: 48px;
  border-radius: 10px;
  background: #faf3f6;
  border: 1px dashed #eadbe3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.verify-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.verify-photo-hint {
  font-size: 11px;
  color: #b293a3;
}

/* 首页实名提示条 */
.verify-banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 12px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4f8, #f6f1ff);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 6px 18px rgba(190, 90, 140, 0.08);
}
.verify-banner-icon {
  font-size: 20px;
}
.verify-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.verify-banner-text strong {
  font-size: 14px;
}
.verify-banner-text em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink-2);
}

/* 实名认证页：已认证只读展示 */
.verify-readonly {
  padding: 14px 16px 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.verify-readonly .verify-view-row {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.verify-readonly .verify-view-row span {
  width: 76px;
  flex-shrink: 0;
  color: var(--ink-2);
}
.verify-readonly .verify-view-row b {
  flex: 1;
  word-break: break-all;
  color: var(--ink);
}
.verify-readonly-photos {
  display: flex;
  gap: 10px;
  padding: 6px 16px 16px;
}
.verify-photo-lg {
  flex: 1;
  min-width: 0;
  width: 48%;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  display: block;
  object-fit: cover;
}

/* ===== 情侣模式卡片 ===== */
.couple-card-pinned {
  margin: 0 16px 6px;
  padding: 8px 16px 12px;
}

.couple-card {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.couple-card:active {
  background: rgba(0, 0, 0, 0.02);
}

.couple-card {
  margin: 0;
  padding: 14px 16px 12px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.couple-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.couple-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 「可点击进入内页」的视觉提示 */
.couple-enter-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, #ff4081 100%);
  box-shadow: 0 4px 10px rgba(255, 64, 129, 0.28);
  transition: transform 0.18s ease;
  animation: coupleEnterNudge 4.5s ease-in-out infinite;
}

@keyframes coupleEnterNudge {
  0%, 82%, 100% { transform: translateX(0); }
  88% { transform: translateX(3px); }
  94% { transform: translateX(0); }
}

.couple-enter-arrow svg {
  width: 15px;
  height: 15px;
}

.couple-card:active .couple-enter-arrow {
  transform: translateX(3px);
}
.couple-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.couple-distance {
  font-size: 13px;
  font-weight: 700;
  color: var(--pink);
}
.couple-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
}
.couple-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.couple-side-label {
  font-size: 11px;
  color: var(--ink-2);
}
.couple-side-region {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.couple-heart-sep {
  display: inline-block;
  font-size: 16px;
  filter: drop-shadow(0 2px 6px rgba(255, 107, 157, 0.45));
  animation: coupleHeartBeat 1.8s ease-in-out infinite;
}

@keyframes coupleHeartBeat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.24); }
  24% { transform: scale(0.98); }
  36% { transform: scale(1.16); }
  50% { transform: scale(1); }
}
.couple-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.location-list {
  max-height: 58vh;
  overflow-y: auto;
}
.location-item {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f6eef2;
  background: transparent;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink);
}
.location-item:last-child {
  border-bottom: 0;
}
.location-item:active {
  background: #faf2f6;
}
.location-item.active {
  color: var(--pink);
  font-weight: 700;
}

/* ================= 情侣模式内页（复刻参考站地图模式） ================= */

/* ---- 多账号切换 ---- */

/* ---- 消息提示与后台常驻引导 ---- */
.notify-guide {
  max-width: 420px;
  text-align: left;
  padding: 20px 20px 18px;
  /* 小屏机型：卡片自身可滚动，按钮永远点得到 */
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.notify-guide h3 {
  text-align: center;
}

.notify-guide .app-modal-icon {
  margin: 0 auto 6px;
}

.notify-guide-intro {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.notify-guide .btn-primary {
  display: block;
  width: 100%;
  padding: 12px 20px;
  font-size: 14.5px;
}

.notify-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.notify-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid #f3eaf0;
  border-radius: 14px;
  background: #fdfbfc;
}

.notify-step-icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.notify-step-main {
  flex: 1;
  min-width: 0;
}

.notify-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.notify-step-desc {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.notify-step-btn {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #ffd9e6;
  border-radius: 10px;
  background: #fff5f9;
  color: var(--pink);
  font-size: 12px;
  font-weight: 600;
}

.notify-step-btn:active {
  transform: scale(0.96);
}

.notify-guide-status {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* 后台常驻服务实时状态条 */
.notify-service-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 11px;
  border: 1px solid #f3eaf0;
  border-radius: 12px;
  background: #fdf7fa;
}

.notify-service-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffb020;
  box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.16);
}

.notify-service-dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.notify-service-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.notify-service-refresh {
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid #ffd9e6;
  border-radius: 999px;
  background: #fff;
  color: var(--pink);
  font-size: 12px;
  font-weight: 600;
}

.notify-service-refresh:active {
  transform: scale(0.96);
}

/* 测试通知 / 更多系统设置 */
.notify-guide-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.notify-guide-ghost {
  flex: 1;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid #f3eaf0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.notify-guide-ghost:active {
  transform: scale(0.97);
  background: #fdf7fa;
}

.btn-plain {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 8px;
}

.btn-plain:active {
  background: #fdf7fa;
}

.auth-back {
  margin: 2px 0 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--pink);
  font-size: 13px;
  font-weight: 600;
}

.me-row-dot {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-right: 8px;
  border-radius: 999px;
  background: #ff3b5c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.account-row:last-child {
  border-bottom: 0;
}

.account-row .avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  font-size: 20px;
}

/* 账号登录态已失效：不再静默掉线，直接在列表里标出来并可重新登录 */
.account-expired {
  color: #e2354f;
  font-weight: 600;
}

/* ================= 登录页「一键登录」（本机保存的账号） ================= */
.saved-login {
  width: 100%;
  max-width: 460px;
  margin: 14px auto 0;
  padding: 14px 14px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(190, 90, 140, 0.14);
  text-align: left;
}

.saved-login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.saved-login-clear {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
}

.saved-login-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #f6ecf1;
}

.saved-login-row .avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  font-size: 18px;
}

.saved-login-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.saved-login-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-login-id {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-login-btn {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), #ff8fb2);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.28);
}

.saved-login-btn:active { transform: scale(0.96); }

.saved-login-del {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f7eef3;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 24px;
}

.saved-login-tip {
  margin: 8px 0 4px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.save-login-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.app-modal-card .btn-plain.full { margin-top: 8px; }

.account-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.account-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-id {
  font-size: 12px;
  color: var(--muted);
}

.account-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b5c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.account-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--pink);
  background: rgba(255, 107, 157, 0.14);
}

.account-remove {
  padding: 6px 12px;
  border: 1px solid #f2dbe5;
  border-radius: 10px;
  background: #fff;
  color: #d4567f;
  font-size: 12px;
}

/* ---- 设置我的位置（重新排版） ---- */
.loc-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 14px 28px;
}

.loc-hero {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #ffe1ed;
  background: linear-gradient(135deg, #fff5f9 0%, #ffffff 70%);
  box-shadow: 0 10px 24px rgba(255, 107, 157, 0.08);
}

.loc-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.loc-hero-label {
  font-size: 13px;
  color: var(--muted);
}

.loc-tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: #f2f0f3;
  color: #8b8288;
}

.loc-tag.is-gps {
  background: rgba(255, 107, 157, 0.14);
  color: var(--pink);
  font-weight: 600;
}

.loc-tag.is-manual {
  background: rgba(124, 77, 255, 0.12);
  color: #7c4dff;
  font-weight: 600;
}

.loc-hero-value {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.loc-hero-coord {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: #b3a9b0;
}

.loc-block {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #f4eef2;
  background: #fff;
}

.loc-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.loc-block-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.loc-mini-btn {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, #ff4081 100%);
}

.loc-picked {
  max-width: 62%;
  overflow: hidden;
  font-size: 12px;
  color: var(--pink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loc-list {
  overflow: hidden;
  border: 1px solid #f4eef2;
  border-radius: 16px;
  background: #fff;
}

.loc-list .location-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #f7f2f5;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
}

.loc-list .location-item:last-child {
  border-bottom: 0;
}

.loc-list .location-item.active {
  color: var(--pink);
  font-weight: 700;
}

.loc-footnote {
  margin: 2px 4px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.loc-tip {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.loc-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.loc-crumb-item {
  border: none;
  background: none;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--pink);
  cursor: pointer;
}

.loc-crumb-item.active {
  color: var(--ink);
  font-weight: 600;
  background: #faf2f6;
}

.loc-crumb-sep {
  color: #d7c7d1;
}

.loc-map {
  width: 100%;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  background: #eceff1;
}

.loc-pin {
  background: transparent;
  border: none;
}

.loc-pin-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 28px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.couple-mode-root {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  min-height: 0;
  overflow: hidden;
  background: #101014;
  z-index: 60;
}

.couple-map {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #e8eaed;
}

.couple-map .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #555;
}

/* ---- 缩放倍数指示器 ---- */
.couple-mode-root .zoom-indicator {
  position: absolute;
  top: 20px;
  top: calc(20px + env(safe-area-inset-top));
  left: 20px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  z-index: 120;
  transition: opacity 0.3s ease;
}

.couple-mode-root .zoom-current {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.couple-mode-root .zoom-range {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---- 右上角功能按钮 ---- */
.couple-mode-root .full-screen-function {
  position: absolute;
  top: 20px;
  top: calc(20px + env(safe-area-inset-top));
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 120;
}

.couple-mode-root .control-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 6px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.couple-mode-root .control-icon-button:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.34);
}

.couple-mode-root .control-icon {
  width: 20px;
  height: 20px;
}

/* ---- 右侧模式切换 ---- */
.couple-mode-root .mode-switcher {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(14px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 28px;
  background: rgb(255 255 255 / 14%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.couple-mode-root.is-open .mode-switcher {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.couple-mode-root .mode-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: all 0.3s ease;
}

.couple-mode-root .mode-btn[data-mode="lovers"].active {
  background: linear-gradient(135deg, #ff6b9d 0%, #ff4081 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 64, 129, 0.4);
}

.couple-mode-root .mode-btn[data-mode="moments"].active {
  background: linear-gradient(135deg, #3d3530, #2a2520);
  color: #c9b896;
}

.couple-mode-root .mode-btn[data-mode="messages"].active {
  background: linear-gradient(135deg, #ff8a65 0%, #ff7043 100%);
  color: #fff;
}

.couple-mode-root .mode-btn[data-mode="albums"].active {
  background: linear-gradient(135deg, #9c7cff 0%, #7c4dff 100%);
  color: #fff;
}

.couple-mode-root .mode-btn[data-mode="events"].active {
  background: linear-gradient(135deg, #64b5f6 0%, #2196f3 100%);
  color: #fff;
}

/* ---- 顶部情侣信息面板 ---- */
.couple-mode-root .lovers-panel {
  position: absolute;
  top: 66px;
  top: calc(66px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%) translateY(-14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 32px);
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 60px;
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.couple-mode-root.is-open .lovers-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.couple-mode-root .lover-card {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  border-radius: 30px 10px 10px 30px;
  transition: all 0.3s ease;
}

.couple-mode-root .lover-card.lover-right {
  justify-content: flex-end;
  border-radius: 10px 30px 30px 10px;
}

.couple-mode-root .lover-card:active {
  background: rgba(255, 255, 255, 0.05);
}

.couple-mode-root .avatar-box {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.couple-mode-root .avatar-box .avatar-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(244, 114, 182, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.16);
  font-size: 22px;
}

.couple-mode-root .avatar-box .avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.couple-mode-root .lover-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.couple-mode-root .lover-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
}

.couple-mode-root .lover-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.6;
  white-space: nowrap;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.couple-mode-root .love-distance-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.couple-mode-root .love-distance-center:active {
  transform: scale(0.94);
}

.couple-mode-root .distance-icon {
  display: inline-flex;
  color: #bbbbbb;
  margin-bottom: 2px;
}

.couple-mode-root .distance-val {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #e2e8f0;
}

/* ---- 底部距离面板 ---- */
.couple-mode-root .love-distance-panel {
  position: absolute;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  display: none;
  padding: 16px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
  z-index: 100;
}

.couple-mode-root .love-distance-panel.show {
  display: block;
  animation: couplePanelIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes couplePanelIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.couple-mode-root .love-distance-panel .panel-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.couple-mode-root .love-distance-panel .panel-body {
  font-size: 18px;
  font-weight: 600;
  color: var(--pink);
}

/* ---- 返回 / 设置位置按钮 ---- */
.couple-back-btn,
.couple-set-location {
  position: absolute;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 10002;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(18, 18, 20, 0.85);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
  transition: transform 0.2s ease;
}

.couple-back-btn:active,
.couple-set-location:active {
  transform: scale(0.94);
}

.couple-back-btn {
  left: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.couple-set-location {
  right: 18px;
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  border-color: rgba(255, 107, 157, 0.5);
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.94), rgba(255, 64, 129, 0.94));
}

/* ---- 地图上的头像标记与连线 ---- */
.couple-marker {
  background: transparent;
  border: none;
}

.couple-marker-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 3px solid #ff6b9d;
  box-shadow: 0 6px 18px rgba(255, 64, 129, 0.42);
  font-size: 22px;
}

.couple-marker-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.couple-marker-inner.is-partner {
  border-color: #7c4dff;
  box-shadow: 0 6px 18px rgba(124, 77, 255, 0.42);
}

.couple-marker-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 157, 0.6);
  animation: couplePulse 2.4s ease-out infinite;
}

.couple-marker-inner.is-partner + .couple-marker-ring {
  border-color: rgba(124, 77, 255, 0.6);
}

@keyframes couplePulse {
  0% { transform: scale(0.85); opacity: 0.75; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.couple-line-dash {
  stroke-dasharray: 10 12;
  animation: coupleDash 14s linear infinite;
}

@keyframes coupleDash {
  to { stroke-dashoffset: -440; }
}

/* 连线中点跳动的爱心 */
.couple-heart-marker {
  background: transparent;
  border: none;
}

.couple-heart-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 21px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid rgba(255, 107, 157, 0.55);
  box-shadow: 0 8px 20px rgba(255, 64, 129, 0.38);
  animation: coupleHeartBeat 1.8s ease-in-out infinite;
}

/* 右侧「情侣模式」按钮里的爱心跟着跳动 */
.couple-mode-root .mode-btn[data-mode="lovers"].active svg {
  transform-origin: 50% 50%;
  animation: coupleHeartBeat 2s ease-in-out infinite;
}

@media (max-width: 360px) {
  .couple-mode-root .lovers-panel { padding: 10px 12px; }
  .couple-mode-root .avatar-box,
  .couple-mode-root .avatar-box .avatar-img { width: 40px; height: 40px; }
  .couple-mode-root .lover-name { font-size: 13px; }
  .couple-mode-root .mode-btn { width: 40px; height: 40px; }
}

@media (orientation: landscape) {
  .topbar, .page-head, .home-body, .replay-topbar {
    padding-inline-start: max(18px, env(safe-area-inset-left));
    padding-inline-end: max(18px, env(safe-area-inset-right));
  }
  .chat-topbar, .composer {
    padding-inline-start: max(12px, env(safe-area-inset-left));
    padding-inline-end: max(12px, env(safe-area-inset-right));
  }
  .app-modal-mask, .view-auth {
    padding-inline-start: max(18px, env(safe-area-inset-left));
    padding-inline-end: max(18px, env(safe-area-inset-right));
  }
  .couple-mode-root .zoom-indicator { left: max(20px, env(safe-area-inset-left)); }
  .couple-mode-root .full-screen-function { right: max(20px, env(safe-area-inset-right)); }
  .couple-mode-root .mode-switcher { right: max(14px, env(safe-area-inset-right)); }
  .couple-back-btn { left: max(18px, env(safe-area-inset-left)); }
  .couple-set-location { right: max(18px, env(safe-area-inset-right)); }
}
