:root {
  color-scheme: dark;
  --ink: #f5f8f5;
  --muted: #b6bbc2;
  --page: #050706;
  --glass: rgba(12, 15, 13, 0.86);
  --glass-line: rgba(236, 255, 239, 0.1);
  --danger: rgba(255, 69, 58, 0.82);
  --xin-accent: #74ff52;
  --xin-accent-soft: #baff9f;
  --xin-text-soft: #b6bbc2;
  --xin-text-faint: #777e85;
  --xin-surface: linear-gradient(140deg, #1d1f24 0%, #101314 24%, #040505 64%, #0d0e0f 80%, #181b1f 100%);
  --xin-surface-soft: linear-gradient(145deg, rgba(29, 33, 31, 0.97), rgba(8, 10, 9, 0.98) 58%, rgba(19, 23, 21, 0.98));
  --xin-highlight: inset 0.5px 0.5px 0.5px rgba(255, 255, 255, 0.34), inset -0.5px -0.5px 0.5px rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background-color: var(--page);
  overscroll-behavior: none;
}

html {
  background: var(--page);
}

body {
  background:
    radial-gradient(circle at 18% 20%, rgba(27, 111, 98, 0.84), transparent 28rem),
    radial-gradient(circle at 84% 24%, rgba(190, 116, 18, 0.92), transparent 22rem),
    radial-gradient(circle at 52% 58%, rgba(34, 59, 168, 0.9), transparent 26rem),
    linear-gradient(145deg, #061522 0%, #0d1428 58%, #2c1905 100%);
  background-attachment: fixed;
  background-size: 100vw 100dvh, 100vw 100dvh, 100vw 100dvh, 100vw 100dvh;
  background-repeat: no-repeat;
  overflow: hidden;
  scrollbar-width: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(27, 111, 98, 0.84), transparent 28rem),
    radial-gradient(circle at 84% 24%, rgba(190, 116, 18, 0.92), transparent 22rem),
    radial-gradient(circle at 52% 58%, rgba(34, 59, 168, 0.9), transparent 26rem),
    linear-gradient(145deg, #061522 0%, #0d1428 58%, #2c1905 100%);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

button {
  font: inherit;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

[hidden] {
  display: none !important;
}

/* 心桥主页由右下角乐宝承接语音交互，不再显示旧的底部输入模块。 */
body.system-page .composer-area {
  display: none !important;
}

.app-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) env(safe-area-inset-right) max(12px, env(safe-area-inset-bottom)) env(safe-area-inset-left);
  background-color: var(--page);
  background:
    radial-gradient(circle at 18% 20%, rgba(27, 111, 98, 0.84), transparent 28rem),
    radial-gradient(circle at 84% 24%, rgba(190, 116, 18, 0.92), transparent 22rem),
    radial-gradient(circle at 52% 58%, rgba(34, 59, 168, 0.9), transparent 26rem),
    linear-gradient(145deg, #061522 0%, #0d1428 58%, #2c1905 100%);
  background-size: 100vw 100dvh, 100vw 100dvh, 100vw 100dvh, 100vw 100dvh;
  background-repeat: no-repeat;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  touch-action: none;
  -webkit-overflow-scrolling: touch;
  will-change: transform;
}

.app-frame.is-elastic-releasing {
  transition: transform 240ms cubic-bezier(0.2, 0.82, 0.2, 1);
}

/* v1.2.5 横屏保持窄屏居中；竖屏铺满设备真实宽度（折叠屏/平板/大屏手机） */
@media (orientation: landscape) {
  .app-frame {
    max-width: 460px;
  }
}

.privacy-segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.privacy-segment button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.privacy-segment button {
  min-height: 38px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 760;
}

.privacy-segment button.is-selected {
  background: rgba(255, 255, 255, 0.3);
}

.phone-find-toggle {
  width: fit-content;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 760;
}

.phone-find-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #fff;
}

.phone-find-toggle span {
  pointer-events: none;
}

.system-inline-page {
  width: 100%;
  padding: 0 18px 6px;
  position: relative;
}

body.phone-directory-page .system-inline-page {
  padding: 0;
  min-height: calc(100dvh - 200px);
}

.system-inline-page[hidden] {
  display: none;
}

.inline-system-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 46px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(24px) saturate(145%);
}

.inline-system-hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 13px;
}

.inline-system-hero img {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.inline-system-hero div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.inline-system-hero span,
.inline-system-section h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 780;
}

.inline-system-hero h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.inline-system-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.42;
}

.inline-system-section {
  display: grid;
  gap: 10px;
}

.inline-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.account-status-card {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.account-status-card strong {
  color: #fff;
  font-size: 15px;
  font-weight: 860;
}

.account-status-card span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 690;
  line-height: 1.36;
}

.inline-settings-grid button,
.inline-settings-grid a,
.inline-contact-chip,
.inline-result {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.inline-settings-grid button,
.inline-settings-grid a {
  min-height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.plugin-store-entry-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(112, 255, 196, 0.25);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(56, 189, 248, 0.12));
  font: inherit;
  text-align: left;
}

.plugin-store-entry-button span {
  font-size: 15px;
  font-weight: 860;
}

.plugin-store-entry-button small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 680;
}

.plugin-store-page {
  display: grid;
  gap: 14px;
  padding: 4px 0 22px;
  color: #fff;
}

.plugin-store-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.plugin-store-header > button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 30px;
  line-height: 1;
}

.plugin-store-header div {
  display: grid;
  gap: 2px;
}

.plugin-store-header span,
.plugin-store-status,
.plugin-store-card-copy small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.plugin-store-header h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 920;
}

.plugin-store-status {
  margin: 0;
  line-height: 1.45;
}

.plugin-store-list {
  display: grid;
  gap: 10px;
}

.plugin-store-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
}

.plugin-store-card.is-installed {
  border-color: rgba(93, 255, 176, 0.34);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(255, 255, 255, 0.08));
}

.plugin-store-card.is-locked {
  border-color: rgba(255, 213, 128, 0.2);
  background: linear-gradient(135deg, rgba(255, 193, 92, 0.08), rgba(255, 255, 255, 0.055));
}

.plugin-store-card > img {
  width: 62px;
  height: 62px;
  grid-row: span 2;
  border-radius: 15px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

.plugin-store-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.plugin-store-card-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 900;
}

.plugin-store-lock {
  font-size: 14px;
  line-height: 1;
}

.plugin-store-card-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.plugin-store-toggle {
  grid-column: 2;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #092016;
  background: #82f2b5;
  font: inherit;
  font-size: 12px;
  font-weight: 880;
}

.plugin-store-card.is-installed .plugin-store-toggle {
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.plugin-store-toggle:disabled {
  opacity: 0.58;
}

.plugin-store-card.is-locked .plugin-store-toggle {
  color: rgba(255, 238, 202, 0.76);
  background: rgba(255, 205, 114, 0.1);
  border: 1px solid rgba(255, 214, 145, 0.18);
  cursor: not-allowed;
}

.plugin-store-loading,
.plugin-store-error,
.plugin-store-empty {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.plugin-store-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #82f2b5;
  animation: plugin-store-pulse 900ms ease-in-out infinite alternate;
}

.plugin-store-loading span:nth-child(2) { animation-delay: 150ms; }
.plugin-store-loading span:nth-child(3) { animation-delay: 300ms; }

.plugin-store-error {
  flex-direction: column;
}

.plugin-store-error p {
  margin: 0;
}

.plugin-store-error button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: #092016;
  background: #82f2b5;
  font-weight: 850;
}

@keyframes plugin-store-pulse {
  from { transform: translateY(3px); opacity: 0.35; }
  to { transform: translateY(-3px); opacity: 1; }
}

.inline-toggle {
  min-height: 38px;
}

.inline-search-box {
  min-height: 48px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.18);
}

.inline-search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.inline-search-box input::placeholder {
  color: rgba(255, 255, 255, 0.54);
}

.inline-search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.inline-contact-chip {
  min-width: 0;
  border-radius: 18px;
  padding: 9px 6px;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.inline-contact-chip img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.inline-contact-chip span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 780;
}

.inline-result-list {
  display: grid;
  gap: 8px;
}

.inline-result {
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.inline-result strong {
  font-size: 14px;
  font-weight: 850;
}

.inline-result span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.34;
}

.inline-empty {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 12px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 720;
}

.edge-budget-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px) saturate(140%);
}

.edge-budget-card span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 760;
}

.edge-budget-card b {
  color: #fff;
  font-weight: 900;
}

.edge-budget-card small,
.edge-module-card small,
.edge-runtime-line {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.edge-module-list {
  display: grid;
  gap: 8px;
}

.edge-demo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.edge-demo-actions button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px) saturate(140%);
  font-size: 13px;
  font-weight: 820;
}

.edge-demo-actions button:active {
  transform: scale(0.97);
}

.edge-module-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 64px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
}

.edge-module-card div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.edge-module-card strong,
.edge-module-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edge-module-card strong {
  color: #fff;
  font-size: 14px;
  font-weight: 880;
}

.edge-module-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.edge-module-card button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: #10151b;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 880;
}

.edge-module-card button:disabled {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.16);
}

.edge-module-card.is-ready {
  border-color: rgba(117, 255, 191, 0.26);
  background: rgba(117, 255, 191, 0.1);
}

.edge-runtime-line {
  margin: 2px 0 0;
  padding: 0 2px;
}

.contact-rail {
  width: 100%;
  height: 136px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 8px calc((100% - 86px) / 2) 12px;
  background: transparent;
  transition: background 0.2s ease-out;
}

/* 固定在顶部状态（上滑时） */
.contact-rail.is-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}

.contact-rail::-webkit-scrollbar {
  display: none;
}


.contact-card {
  width: 86px;
  min-width: 86px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  display: grid;
  justify-items: center;
  gap: 8px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transform: scale(var(--scale, 0.82));
  opacity: var(--opacity, 0.58);
  filter: blur(var(--blur, 0.6px));
  transform-origin: center center;
  transition: transform 160ms ease, opacity 160ms ease, color 160ms ease, filter 160ms ease;
  overflow: visible;
  position: relative;
}

.contact-card.ai-entry::after {
  content: "AI";
  position: absolute;
  top: 2px;
  right: 13px;
  min-width: 22px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(7, 19, 29, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-card.has-unread::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 15px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(7, 18, 27, 0.88);
  background: #ff3347;
  box-shadow: 0 0 0 3px rgba(255, 51, 71, 0.18);
  z-index: 2;
}

/* 像 macOS Dock 一样：新消息到达时头像俏皮地弹跳几下，然后自动停下。 */
.contact-card.has-new-message-bounce {
  animation: rail-new-message-bounce 1.65s cubic-bezier(0.2, 0.72, 0.28, 1) both;
  z-index: 4;
}

@keyframes rail-new-message-bounce {
  0%, 100% { transform: scale(var(--scale, 0.82)) translateY(0); }
  12% { transform: scale(var(--scale, 0.82)) translateY(-20px); }
  25% { transform: scale(var(--scale, 0.82)) translateY(0); }
  38% { transform: scale(var(--scale, 0.82)) translateY(-13px); }
  51% { transform: scale(var(--scale, 0.82)) translateY(0); }
  64% { transform: scale(var(--scale, 0.82)) translateY(-7px); }
  77% { transform: scale(var(--scale, 0.82)) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-card.has-new-message-bounce {
    animation: none;
  }
}

/* ── 共同记忆：现代记忆简牍 ─────────────────────────────────────── */
.memory-book-shell {
  position: relative;
  padding: 0 26px;
  perspective: 1200px;
}

.dynamic-card.memory-page {
  isolation: isolate;
  width: 100%;
  min-height: 306px;
  aspect-ratio: auto;
  overflow: visible;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
  padding: 24px 22px 18px 38px;
  border: 1px solid rgba(196, 184, 151, 0.68);
  border-radius: 5px 22px 22px 5px;
  color: #2d342d;
  text-align: left;
  background:
    radial-gradient(ellipse at 53% 43%, rgba(248, 243, 226, 0.96) 0%, rgba(233, 224, 200, 0.91) 50%, rgba(196, 184, 151, 0.38) 68%, transparent 78%),
    repeating-linear-gradient(0deg, rgba(92, 91, 70, 0.025) 0 1px, transparent 1px 7px),
    linear-gradient(145deg, #4f493b 0%, #94886e 16%, #d8cdae 47%, #928369 84%, #403a30 100%);
  box-shadow:
    8px 10px 0 -4px #776d59,
    13px 15px 0 -8px rgba(66, 60, 49, 0.96),
    0 30px 64px rgba(0, 0, 0, 0.68),
    inset 36px 0 48px -34px rgba(18, 17, 14, 0.88),
    inset -36px 0 48px -34px rgba(18, 17, 14, 0.84),
    inset 0 1px rgba(255, 255, 255, 0.46);
  transform-origin: 8% 50%;
  backdrop-filter: none;
  -webkit-tap-highlight-color: transparent;
}

.dynamic-card.memory-page::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 14px;
  z-index: -1;
  width: 1px;
  height: auto;
  border: 0;
  border-radius: 0;
  background: rgba(122, 49, 38, 0.28);
  box-shadow: 4px 0 rgba(122, 49, 38, 0.08);
  clip-path: none;
  opacity: 1;
}

.dynamic-card.memory-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  height: auto;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(86, 54, 37, 0.1), transparent 11%),
    linear-gradient(180deg, rgba(255,255,255,.28), transparent 18%, rgba(103, 86, 57, .05));
}

.dynamic-card.memory-page span,
.dynamic-card.memory-page strong,
.dynamic-card.memory-page em {
  position: static;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  text-align: inherit;
}

.memory-page-thread {
  position: absolute !important;
  inset: 14px auto 14px 6px !important;
  width: 20px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  pointer-events: none;
}

.memory-page-thread i {
  width: 9px;
  height: 9px;
  border: 2px solid rgba(122, 49, 38, 0.72);
  border-radius: 50%;
  background: #e7ddc3;
  box-shadow: 0 1px rgba(255,255,255,.72);
}

.memory-page-kicker {
  display: block;
  color: rgba(83, 82, 65, 0.66);
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 11px !important;
  font-weight: 680 !important;
  letter-spacing: 0.12em;
}

.memory-page-copy {
  align-self: start;
  display: grid !important;
  gap: 13px;
}

.memory-page-copy strong {
  display: block;
  color: #263129;
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: clamp(23px, 7vw, 31px);
  font-weight: 780;
  line-height: 1.22;
  letter-spacing: 0.035em;
}

.memory-page-copy > span {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: rgba(47, 56, 48, 0.76);
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 15px !important;
  font-weight: 560 !important;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.memory-page-media {
  position: relative !important;
  width: 100%;
  height: 78px;
  overflow: hidden !important;
  display: block !important;
  border: 1px solid rgba(79, 78, 57, 0.13);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(48, 67, 51, 0.94), rgba(25, 34, 28, 0.96));
  box-shadow: inset 0 1px rgba(255,255,255,.12);
}

.memory-page-media[hidden] {
  display: none !important;
}

.memory-page-media img,
.memory-page-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-page-media.is-video-only::before {
  content: "▶";
  position: absolute;
  inset: 50% auto auto 18px;
  color: rgba(246, 241, 220, 0.96);
  font-size: 20px;
  transform: translateY(-50%);
}

.memory-media-kind {
  position: absolute !important;
  right: 9px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  background: rgba(8, 13, 10, 0.68);
  font-size: 9px !important;
  font-weight: 760 !important;
  letter-spacing: .06em;
  backdrop-filter: blur(8px);
}

.memory-page-footer {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(72, 73, 55, 0.13);
  color: rgba(74, 74, 57, 0.56);
  font-size: 10px !important;
  font-weight: 650 !important;
}

.memory-page-footer em {
  color: rgba(116, 46, 37, 0.78);
  font-family: ui-serif, "Songti SC", serif;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.dynamic-card.memory-page.is-placeholder {
  background:
    radial-gradient(ellipse at 53% 43%, rgba(248, 243, 226, 0.96) 0%, rgba(233, 224, 200, 0.91) 50%, rgba(196, 184, 151, 0.38) 68%, transparent 78%),
    repeating-linear-gradient(0deg, rgba(92, 91, 70, 0.025) 0 1px, transparent 1px 7px),
    linear-gradient(145deg, #4f493b 0%, #94886e 16%, #d8cdae 47%, #928369 84%, #403a30 100%);
}

.memory-page-turn {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 38px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(229, 239, 226, 0.16);
  border-radius: 999px;
  color: rgba(244, 248, 241, 0.86);
  background: rgba(10, 15, 11, 0.78);
  box-shadow: 0 12px 28px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.08);
  font-family: ui-serif, Georgia, serif;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.memory-page-turn-prev { left: 0; }
.memory-page-turn-next { right: 0; }
.memory-page-turn:active { transform: translateY(-50%) scale(.92); }
.memory-page-turn:disabled { opacity: .22; }

.memory-public-control {
  position: relative;
  margin: 14px 27px 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(195, 255, 174, .16);
  border-radius: 16px;
  color: rgba(246, 255, 241, .9);
  background: rgba(255, 255, 255, .035);
}

.memory-public-control[hidden] { display: none !important; }
.memory-public-control input { position: absolute; opacity: 0; pointer-events: none; }

.memory-public-control > span {
  grid-row: 1 / 3;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(205, 255, 190, .34);
  border-radius: 6px;
  background: rgba(0, 0, 0, .28);
}

.memory-public-control input:checked + span {
  color: #07110a;
  background: #baff91;
  box-shadow: 0 0 18px rgba(116, 255, 82, .2);
}

.memory-public-control input:checked + span::after { content: "✓"; font-size: 13px; font-weight: 950; }
.memory-public-control strong { font-size: 11px; font-weight: 850; }
.memory-public-control small { color: rgba(225, 255, 214, .48); font-size: 9px; line-height: 1.4; }
.memory-public-control:has(input:disabled) { opacity: .55; }

.memory-pagination {
  min-height: 28px;
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.memory-pagination[hidden] { visibility: hidden; display: flex; }

.memory-pagination button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(238, 246, 235, 0.24);
  transition: width 180ms ease, background 180ms ease;
}

.memory-pagination button.is-active {
  width: 24px;
  background: rgba(116, 255, 82, 0.72);
}

.dynamic-card.memory-page.page-turn-forward {
  animation: memoryPageForward 420ms cubic-bezier(.2,.75,.24,1) both;
}

.dynamic-card.memory-page.page-turn-backward {
  animation: memoryPageBackward 420ms cubic-bezier(.2,.75,.24,1) both;
}

@keyframes memoryPageForward {
  0% { opacity: .35; transform: translateX(18px) rotateY(-11deg) scale(.97); filter: blur(3px); }
  62% { opacity: 1; transform: translateX(-2px) rotateY(1.5deg) scale(1.006); filter: blur(0); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes memoryPageBackward {
  0% { opacity: .35; transform: translateX(-18px) rotateY(11deg) scale(.97); filter: blur(3px); }
  62% { opacity: 1; transform: translateX(2px) rotateY(-1.5deg) scale(1.006); filter: blur(0); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

.dynamic-slide.is-text-memory {
  background: #050605;
}

body.dynamic-detail-open .composer-area {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.dynamic-slide.is-text-memory > .dynamic-actions,
.dynamic-slide.is-text-memory > .dynamic-slide-copy {
  display: none;
}

#dynamicSummaryCard.dynamic-summary-card {
  color: #283128;
  background:
    repeating-linear-gradient(0deg, rgba(91, 88, 62, .025) 0 1px, transparent 1px 8px),
    radial-gradient(ellipse at 50% 39%, #f1ead6 0%, #e5dbc0 47%, #b8aa88 72%, #776b55 88%, #423c31 100%);
  box-shadow:
    inset 58px 0 72px -48px rgba(14, 13, 11, 0.86),
    inset -58px 0 72px -48px rgba(14, 13, 11, 0.86),
    inset 0 24px 44px -42px rgba(255, 255, 255, 0.55),
    inset 0 -42px 60px -42px rgba(18, 17, 14, 0.68);
}

#dynamicSummaryCard .dynamic-summary-header {
  display: grid;
  justify-content: stretch;
  gap: 7px;
  padding: max(54px, calc(42px + env(safe-area-inset-top))) 26px 18px 34px;
  border-bottom: 1px solid rgba(72, 69, 48, 0.14);
  text-align: left;
}

.memory-reader-eyebrow {
  color: rgba(115, 44, 34, .68);
  font-family: ui-serif, "Songti SC", serif;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .16em;
}

#dynamicSummaryCard .dynamic-summary-title {
  color: #273128;
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: clamp(25px, 7.2vw, 34px);
  font-weight: 780;
  line-height: 1.25;
}

.memory-reader-meta {
  color: rgba(58, 65, 56, .52);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .05em;
}

.memory-reader-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.memory-reader-media {
  position: relative;
  margin: 22px 26px 0 34px;
  overflow: hidden;
  border: 1px solid rgba(69, 69, 48, .14);
  border-radius: 18px;
  background: rgba(31, 40, 33, .92);
  box-shadow: 0 18px 34px rgba(56, 45, 27, .16);
}

.memory-reader-media[hidden] { display: none; }

.memory-reader-media img,
.memory-reader-media video {
  width: 100%;
  max-height: 34vh;
  display: block;
  object-fit: cover;
}

#dynamicSummaryCard .dynamic-summary-body {
  min-height: auto;
  padding: 24px 28px 38px 36px;
  color: rgba(40, 49, 41, .88);
  font-family: ui-serif, "Songti SC", "STSong", serif;
  font-size: 17px;
  font-weight: 520;
  line-height: 2;
  letter-spacing: .035em;
  overflow: visible;
}

#dynamicSummaryCard .dynamic-summary-expand-btn {
  color: rgba(50, 58, 50, .68);
  border-color: rgba(72, 69, 48, .12);
  background: rgba(241, 234, 214, .94);
}

.memory-reader-controls {
  flex-shrink: 0;
  padding: 12px 18px max(13px, calc(9px + env(safe-area-inset-bottom)));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(72, 69, 48, .14);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(220, 210, 181, .97) 0%, rgba(166, 153, 123, .97) 66%, rgba(91, 82, 66, .98) 100%);
  box-shadow: 0 -12px 30px rgba(62, 52, 35, .12);
}

.memory-reader-controls button {
  min-height: 38px;
  border: 1px solid rgba(68, 75, 65, .16);
  border-radius: 999px;
  color: rgba(48, 56, 49, .82);
  background: rgba(247, 241, 222, .42);
  font: inherit;
  font-size: 12px;
  font-weight: 720;
}

.memory-reader-controls button:last-child { justify-self: stretch; }
.memory-reader-controls button:disabled { opacity: .3; }
.memory-reader-controls span { color: rgba(73, 71, 54, .52); font-size: 11px; font-weight: 720; }

.dynamic-attachment-preview {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  border: 1px solid rgba(215, 255, 201, .18);
  border-radius: 18px;
  background: rgba(4, 8, 5, .54);
}

.dynamic-attachment-preview[hidden] { display: none; }
.dynamic-attachment-preview img,
.dynamic-attachment-preview video { width: 100%; max-height: 210px; display: block; object-fit: cover; }
.dynamic-attachment-preview > button {
  position: absolute;
  right: 9px;
  top: 9px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 8, 6, .72);
  font-size: 11px;
  font-weight: 720;
  backdrop-filter: blur(10px);
}

.dynamic-area.module-size-small .memory-book-shell { padding: 0 14px; }
.dynamic-area.module-size-small .dynamic-card.memory-page { min-height: 238px; padding: 18px 14px 14px 25px; }
.dynamic-area.module-size-small .memory-page-copy strong { font-size: 19px; }
.dynamic-area.module-size-small .memory-page-copy > span { -webkit-line-clamp: 3; font-size: 12px !important; }
.dynamic-area.module-size-small .memory-page-turn { width: 28px; height: 42px; font-size: 22px; }

@media (prefers-reduced-motion: reduce) {
  .dynamic-card.memory-page.page-turn-forward,
  .dynamic-card.memory-page.page-turn-backward {
    animation: none;
  }
  .memory-pagination button,
  .memory-page-turn {
    transition: none;
  }
}

/* 用户公开主页：小莲花中心与匿名前 12 互动圈。 */
.public-heart-circle {
  padding: 18px 12px 24px;
  color: #f7fff2;
  background: #000;
}

.profile-public-preview-heading,
.public-heart-circle-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(239, 255, 232, 0.96);
}

.profile-public-preview-heading > span,
.public-heart-circle-preview-bar > span {
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.profile-public-preview-heading small,
.public-heart-circle-preview-bar small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(196, 229, 191, 0.7);
  font-size: 10px;
}

.profile-public-preview-heading i,
.public-heart-circle-preview-bar i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #83f071;
  box-shadow: 0 0 10px rgba(131, 240, 113, 0.72);
}

.public-heart-circle-preview-bar {
  width: min(344px, 100%);
  padding: 10px 12px;
  margin: 0 auto 16px;
  border: 1px solid rgba(131, 240, 113, 0.18);
  border-radius: 14px;
  background: rgba(111, 214, 94, 0.055);
}

.public-heart-circle .lotus-lamp-heading {
  width: min(344px, 100%);
  margin: 0 auto 10px;
  align-items: center;
}

.public-heart-circle .lotus-lamp-heading span,
.public-heart-circle .lotus-lamp-status {
  color: rgba(236, 255, 229, 0.82);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.public-heart-circle .lotus-lamp-heading strong {
  color: #f6fff1;
  font-size: 16px;
  font-weight: 900;
}

.public-heart-circle .lotus-wish-button {
  min-width: 94px;
  height: 42px;
  border-color: rgba(184, 255, 145, 0.74);
  color: #efffe7;
  background: #000;
  box-shadow: 0 0 18px rgba(139, 255, 102, 0.16), inset 0 0 0 1px rgba(184, 255, 145, 0.08);
  font-size: 13px;
}

.public-heart-circle .lotus-lamp-stage {
  position: relative;
  width: min(336px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.public-heart-circle .lotus-lamp-stage::after {
  display: none;
}

.public-heart-circle-dormant {
  width: min(344px, 100%);
  min-height: 154px;
  margin: 0 auto;
  padding: 22px 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed rgba(184, 255, 145, 0.24);
  border-radius: 26px;
  color: rgba(236, 255, 229, 0.72);
  background: #000;
  text-align: center;
}

.public-heart-circle-dormant > span {
  color: rgba(184, 255, 145, 0.48);
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(184, 255, 145, 0.16));
}

.public-heart-circle-dormant strong {
  color: #efffe9;
  font-size: 15px;
  font-weight: 900;
}

.public-heart-circle-dormant small {
  max-width: 260px;
  color: rgba(232, 255, 225, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.public-heart-circle.is-lotus-awake .lotus-lamp-stage {
  width: min(210px, 68vw);
}

.public-heart-circle.is-lotus-awake .lotus-lamp-visual {
  width: 48%;
  height: 48%;
}

.public-heart-circle.is-ring-awake .public-heart-circle-member.is-unlit {
  visibility: hidden;
  opacity: 0;
}

.public-heart-circle.is-ring-awake .public-heart-circle-member.is-lit {
  visibility: visible;
  opacity: 1;
}

.public-heart-circle .public-heart-circle-track {
  position: absolute;
  z-index: 0;
  inset: 7%;
  border: 1px solid rgba(184, 255, 145, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 45%, rgba(127, 255, 92, 0.04) 57%, transparent 72%),
    conic-gradient(from 20deg, rgba(127, 255, 92, 0.02), rgba(255, 196, 92, 0.2), rgba(117, 221, 255, 0.16), rgba(127, 255, 92, 0.02));
  box-shadow:
    0 0 30px rgba(127, 255, 92, 0.09),
    inset 0 0 24px rgba(127, 255, 92, 0.06);
  opacity: 0.88;
  pointer-events: none;
}

.public-heart-circle .public-heart-circle-track::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 225, 133, 0.12);
  border-radius: inherit;
}

.public-heart-circle .public-heart-circle-member-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}

.public-heart-circle .public-heart-circle-member {
  width: clamp(43px, 14.5vw, 56px);
  height: clamp(43px, 14.5vw, 56px);
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.public-heart-circle .public-heart-circle-member::before {
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(var(--circle-hue), 100%, 72%, var(--circle-alpha)), transparent 67%);
  filter: blur(var(--circle-blur));
  opacity: var(--circle-intensity);
  transform: scale(var(--circle-scale));
}

.public-heart-circle .public-heart-circle-member img {
  width: 100%;
  height: 100%;
  border: 1px solid hsla(var(--circle-hue), 100%, 78%, var(--circle-border-alpha));
  border-radius: 50%;
  object-fit: cover;
  opacity: var(--circle-opacity);
  filter:
    brightness(var(--circle-brightness))
    saturate(var(--circle-saturation))
    drop-shadow(0 0 var(--circle-spread) hsla(var(--circle-hue), 100%, 70%, var(--circle-alpha)));
  mix-blend-mode: screen;
}

.public-heart-circle .public-heart-circle-member.is-unlit::before {
  opacity: 0.04;
  animation: none;
}

.public-heart-circle .public-heart-circle-member.is-unlit img {
  border-color: rgba(220, 239, 218, 0.14);
  opacity: 0.2;
  filter: grayscale(0.86) brightness(0.45) saturate(0.35);
  animation: none;
}

.public-heart-circle .public-heart-circle-member.is-viewer img {
  outline: 2px solid #b8ff91;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(184, 255, 145, 0.08), 0 0 24px rgba(184, 255, 145, 0.42);
}

.public-heart-circle .lotus-lamp-visual {
  z-index: 5;
  inset: auto;
  width: 31%;
  height: 31%;
  opacity: 1;
  transform: scale(1);
  pointer-events: none;
}

.public-heart-circle .lotus-lamp-image {
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 16px hsla(var(--lotus-hue), 100%, 72%, 0.34));
}

.public-heart-circle .lotus-lamp-aura {
  width: 116%;
  height: 94%;
  filter: blur(12px);
}

.public-heart-circle.is-unlit .lotus-lamp-visual {
  opacity: 0.58;
  filter: grayscale(0.18) brightness(0.72);
}

.public-heart-circle-motion,
.public-heart-circle-privacy,
.public-heart-circle-touched {
  width: min(344px, 100%);
  margin-inline: auto;
  text-align: center;
}

.public-heart-circle-motion {
  margin-top: 4px;
  margin-bottom: 0;
  color: rgba(202, 255, 180, 0.82);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.5;
}

.public-heart-circle-motion span {
  margin-right: 5px;
  color: #b8ff91;
  font-size: 16px;
}

.public-heart-circle .lotus-lamp-status {
  width: min(344px, 100%);
  min-height: 42px;
  margin: 8px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(184, 255, 145, 0.44);
  border-radius: 14px;
  color: #000;
  background: #b8ff91;
  box-shadow: 0 0 20px rgba(184, 255, 145, 0.13);
}

.public-heart-circle .lotus-light-touch {
  position: relative;
  z-index: 1;
  width: min(344px, 100%);
  min-height: 62px;
  margin: 10px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border: 1px solid rgba(255, 213, 112, 0.72);
  border-radius: 16px;
  color: #fff6d9;
  background: #000;
  box-shadow: 0 0 20px rgba(255, 196, 92, 0.1), inset 0 0 0 1px rgba(255, 225, 133, 0.05);
  text-align: left;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.public-heart-circle .lotus-light-touch::before {
  display: none;
}

.public-heart-circle .lotus-light-touch-icon {
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 213, 112, 0.72));
  animation: heartlink-native-breathe 2.8s ease-in-out infinite;
}

.public-heart-circle .lotus-light-touch > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.public-heart-circle .lotus-light-touch strong {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.public-heart-circle .lotus-light-touch small {
  color: rgba(255, 244, 213, 0.76);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.public-heart-circle-touched {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 213, 112, 0.46);
  border-radius: 14px;
  color: #ffe8aa;
  background: #000;
  font-size: 12px;
  font-weight: 780;
}

.public-heart-circle-touched span {
  margin-right: 5px;
  color: #b8ff91;
}

.public-heart-circle-privacy {
  margin-top: 10px;
  margin-bottom: 0;
  color: rgba(232, 255, 225, 0.7);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.55;
}

@media (max-width: 350px) {
  .public-heart-circle { padding-inline: 10px; }
  .public-heart-circle .lotus-lamp-stage { width: 100%; }
  .public-heart-circle .public-heart-circle-member { width: 44px; height: 44px; }
  .public-heart-circle .lotus-lamp-heading strong { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .public-heart-circle .lotus-lamp-visual,
  .public-heart-circle .public-heart-circle-member.is-lit::before,
  .public-heart-circle .public-heart-circle-member.is-lit img,
  .public-heart-circle .lotus-light-touch-icon {
    animation: none;
  }
}

.contact-card img {
  width: 56px;
  height: 56px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  transition: width 160ms ease, height 160ms ease, border-radius 160ms ease;
}

/* 选中时放大 */
.contact-card.is-active img {
  width: 72px;
  height: 72px;
}

.project-entry-card { position: relative; }

/* 联系人收住系统头像区，真人和真实会话头像继续排在它右边。 */
.contact-rail .contact-card.system-contact[data-role="phone-contacts"] { order: 100; }
.contact-rail .contact-card.recent-dynamic-card { order: 200; }

/* 心链：直接写入心桥的手机竖屏原生页，不再使用星球/心链跳转卡。 */
.chat-area.has-heartlink-native-page {
  display: block;
  min-height: calc(100dvh - 136px - env(safe-area-inset-top));
  padding: 4px 14px calc(30px + env(safe-area-inset-bottom));
  margin-bottom: 0;
  overflow: visible;
  align-content: start;
  mask-image: none;
  -webkit-mask-image: none;
}

body.heartlink-native-mode .app-frame {
  overscroll-behavior-y: auto;
  background:
    radial-gradient(circle at 50% 24%, rgba(84, 190, 111, .13), transparent 21rem),
    radial-gradient(circle at 6% 68%, rgba(93, 176, 158, .07), transparent 25rem),
    linear-gradient(180deg, #070b08 0%, #030604 62%, #020302 100%) !important;
}

body.heartlink-native-mode .app-frame::after {
  height: max(18px, env(safe-area-inset-bottom));
}

.heartlink-native-page {
  --heartlink-green: #b8ff91;
  --heartlink-soft: rgba(225, 255, 225, .66);
  --heartlink-line: rgba(214, 255, 214, .13);
  --heartlink-card: rgba(234, 255, 235, .055);
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  color: #f5fff4;
}

/* 每位真实用户的心链固定在其头像对应页面底部，不再占用“我的心链”。 */
.heartlink-profile-inline {
  width: 100%;
  margin: 18px 0 20px;
  padding: 18px 14px 24px;
  scroll-margin-top: 112px;
  border-top: 1px solid rgba(184, 255, 145, .14);
  border-bottom: 1px solid rgba(184, 255, 145, .12);
  background:
    radial-gradient(circle at 50% 18%, rgba(84, 190, 111, .12), transparent 20rem),
    linear-gradient(180deg, rgba(7, 11, 8, .98), rgba(2, 3, 2, .98));
}

.heartlink-profile-inline-toolbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 8px 3px;
  color: rgba(242, 255, 238, .84);
  background: linear-gradient(180deg, rgba(3, 6, 4, .98) 70%, rgba(3, 6, 4, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.heartlink-profile-inline-toolbar span {
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
}

.heartlink-profile-inline-toolbar button {
  min-width: 64px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgba(184, 255, 145, .3);
  border-radius: 999px;
  color: #eaffdf;
  background: rgba(184, 255, 145, .08);
  font-size: 12px;
  font-weight: 820;
}

.heartlink-profile-inline-content,
.heartlink-profile-inline .heartlink-native-page {
  width: 100%;
}

.heartlink-profile-inline .heartlink-native-header {
  padding-top: 12px;
}

.heartlink-native-page button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.heartlink-native-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 5px 18px;
}

.heartlink-native-header > div {
  min-width: 0;
}

.heartlink-native-header span,
.heartlink-native-section-head span {
  display: block;
  color: rgba(211, 255, 205, .48);
  font-size: 10px;
  font-weight: 840;
  letter-spacing: .16em;
}

.heartlink-native-header h1 {
  margin: 5px 0 5px;
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1;
}

.heartlink-native-header p {
  margin: 0;
  color: rgba(235, 255, 233, .58);
  font-size: 12px;
  line-height: 1.5;
}

.heartlink-native-privacy-button {
  width: 52px;
  min-width: 52px;
  height: 52px;
  display: grid;
  place-content: center;
  gap: 2px;
  border: 1px solid var(--heartlink-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.heartlink-native-privacy-button span {
  color: var(--heartlink-green);
  font-size: 17px;
  line-height: 1;
}

.heartlink-native-privacy-button small {
  color: rgba(235, 255, 233, .62);
  font-size: 9px;
  font-weight: 760;
}

.heartlink-native-pool {
  position: relative;
  overflow: hidden;
  padding: 13px 12px 14px;
  border: 1px solid var(--heartlink-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 54%, rgba(109, 255, 116, .1), transparent 37%),
    radial-gradient(circle at 76% 18%, rgba(255, 223, 128, .06), transparent 29%),
    rgba(239, 255, 240, .04);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 24px 60px rgba(0, 0, 0, .2);
}

.heartlink-native-pool::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image: radial-gradient(rgba(213, 255, 207, .28) .65px, transparent .8px);
  background-size: 19px 19px;
  mask-image: radial-gradient(circle at 50% 56%, #000, transparent 73%);
}

.heartlink-native-pool-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 1px;
}

.heartlink-native-pool-head > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(235, 255, 233, .66);
  font-size: 11px;
  font-weight: 760;
}

.heartlink-native-pool-head > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--heartlink-green);
  box-shadow: 0 0 12px rgba(143, 255, 115, .72);
}

.heartlink-native-pool-head button,
.heartlink-native-section-head button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(186, 255, 154, .2);
  border-radius: 999px;
  color: rgba(232, 255, 226, .82);
  background: rgba(169, 255, 130, .07);
  font-size: 11px;
  font-weight: 820;
}

.heartlink-native-pool-head button b {
  color: var(--heartlink-green);
  font-size: 14px;
}

.heartlink-native-ring {
  position: relative;
  width: min(286px, 78vw);
  aspect-ratio: 1;
  margin: 8px auto 3px;
  border: 1px solid rgba(191, 255, 166, .16);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 9px rgba(197, 255, 180, .015),
    inset 0 0 70px rgba(126, 255, 130, .035),
    0 0 48px rgba(90, 255, 100, .025);
}

.heartlink-native-ring::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px dashed rgba(211, 255, 198, .07);
  border-radius: 50%;
}

.heartlink-native-member-slot {
  position: absolute;
  z-index: 3;
  left: var(--member-x);
  top: var(--member-y);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
}

.heartlink-native-member-slot i {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 255, 207, .13);
  border-radius: 50%;
  color: transparent;
  background: rgba(223, 255, 220, .035);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.heartlink-native-member-slot.is-lit i {
  width: 30px;
  height: 30px;
  border-color: rgba(193, 255, 165, .56);
  color: #efffed;
  background: linear-gradient(145deg, rgba(120, 209, 116, .58), rgba(24, 71, 36, .78));
  box-shadow:
    0 0 0 4px rgba(133, 255, 113, .07),
    0 0 calc(12px + 14px * var(--member-warmth)) rgba(136, 255, 112, calc(.32 + .28 * var(--member-warmth))),
    inset 0 1px rgba(255, 255, 255, .35);
}

.heartlink-native-member-slot.is-me i {
  color: #172311;
  background: linear-gradient(145deg, #e2ffd1, #9fe778);
}

.heartlink-native-pool-core {
  position: absolute;
  z-index: 2;
  inset: 27%;
  display: grid;
  place-content: center;
  justify-items: center;
  border: 1px solid rgba(195, 255, 172, .12);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(186, 255, 162, .12), rgba(5, 15, 8, .48) 62%, rgba(3, 8, 5, .72));
  box-shadow: inset 0 0 32px rgba(115, 255, 104, .045), 0 0 26px rgba(120, 255, 111, .035);
  text-align: center;
}

.heartlink-native-core-spark {
  color: var(--heartlink-green);
  font-size: 22px;
  text-shadow: 0 0 18px rgba(154, 255, 118, .8);
  animation: heartlink-native-breathe 3.2s ease-in-out infinite;
}

.heartlink-native-pool-core strong {
  margin-top: 2px;
  font-size: 17px;
  letter-spacing: .08em;
}

.heartlink-native-pool-core small {
  max-width: 90px;
  margin-top: 5px;
  color: rgba(228, 255, 225, .5);
  font-size: 9px;
  line-height: 1.35;
}

.heartlink-native-pool-note {
  position: relative;
  z-index: 2;
  margin: 7px 0 0;
  color: rgba(225, 255, 221, .38);
  font-size: 9px;
  font-weight: 680;
  letter-spacing: .015em;
  text-align: center;
}

.heartlink-native-rule {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 2px 0;
  color: rgba(231, 255, 226, .34);
  font-size: 9px;
  line-height: 1.5;
}

.heartlink-native-rule span {
  color: rgba(179, 255, 151, .62);
  font-size: 14px;
}

.heartlink-native-sheet-backdrop {
  position: fixed;
  z-index: 170;
  inset: 0;
  background: rgba(0, 4, 1, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.heartlink-native-sheet {
  position: fixed;
  z-index: 171;
  left: 50%;
  bottom: 0;
  width: min(100%, 430px);
  max-height: min(78dvh, 680px);
  overflow-y: auto;
  padding: 26px 18px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid rgba(206, 255, 192, .13);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: #f5fff3;
  background:
    radial-gradient(circle at 50% 0, rgba(120, 255, 107, .09), transparent 18rem),
    rgba(8, 13, 9, .985);
  box-shadow: 0 -20px 70px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .07);
  transform: translate(-50%, 12px);
  opacity: 0;
}

.heartlink-native-sheet.is-opening {
  transform: translate(-50%, 0);
  opacity: 1;
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1), opacity 180ms ease;
}

/* 二级心链弹窗挂到 body 后始终高于聊天、工具栏、清除按钮和底部输入区。 */
body > .heartlink-native-sheet-backdrop {
  z-index: 2147483300;
}

body > .heartlink-native-sheet {
  z-index: 2147483301;
}

body.heartlink-sheet-open .surface-toolbar,
body.heartlink-sheet-open .composer-area {
  pointer-events: none !important;
}

.heartlink-native-sheet-grip {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(230, 255, 225, .16);
  transform: translateX(-50%);
}

.heartlink-native-sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 255, 214, .12);
  border-radius: 50%;
  color: rgba(238, 255, 235, .6) !important;
  background: rgba(255, 255, 255, .04);
  font-size: 19px;
}

.heartlink-native-sheet h2 {
  max-width: calc(100% - 48px);
  margin: 0 0 9px;
  font-size: 22px;
  line-height: 1.2;
}

.heartlink-native-sheet-lead {
  margin: 0 0 16px;
  color: rgba(233, 255, 230, .53);
  font-size: 11px;
  line-height: 1.65;
}

.heartlink-native-input-label {
  display: block;
  margin: 0 0 7px;
  color: rgba(239, 255, 236, .75);
  font-size: 11px;
  font-weight: 820;
}

.heartlink-native-textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 13px;
  border: 1px solid rgba(202, 255, 187, .15);
  border-radius: 17px;
  outline: 0;
  color: #f7fff5;
  background: rgba(255, 255, 255, .045);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.heartlink-native-sheet-primary,
.heartlink-native-sheet-secondary,
.heartlink-native-sheet-danger {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 860;
}

.heartlink-native-sheet-primary {
  border: 1px solid rgba(184, 255, 153, .4);
  color: #15210f !important;
  background: linear-gradient(135deg, #d8ffc2, #9de875);
}

.heartlink-native-sheet-secondary {
  border: 1px solid rgba(220, 255, 212, .13);
  color: rgba(241, 255, 238, .72) !important;
  background: rgba(255, 255, 255, .045);
}

.heartlink-native-sheet-danger {
  border: 1px solid rgba(255, 146, 146, .19);
  color: #ffb9b9 !important;
  background: rgba(255, 85, 85, .065);
}

.heartlink-native-sheet-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.heartlink-native-wish-quote {
  margin: 12px 0;
  padding: 15px;
  border: 1px solid rgba(204, 255, 188, .11);
  border-radius: 18px;
  color: rgba(248, 255, 246, .86);
  background: rgba(255, 255, 255, .035);
  font-size: 14px;
  font-style: normal;
  line-height: 1.65;
}

.heartlink-echo-original {
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid rgba(184, 255, 145, .24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(184, 255, 145, .10), rgba(184, 255, 145, .025));
}

.heartlink-echo-original .heartlink-native-wish-quote {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #f8fff6;
  background: transparent;
  font-size: 19px;
  font-weight: 780;
  line-height: 1.55;
}

.heartlink-native-policy-list {
  display: grid;
  gap: 8px;
}

.heartlink-native-member-detail > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(191, 255, 166, .32);
  border-radius: 50%;
  color: #eaffdf;
  background: rgba(139, 219, 111, .19);
  font-size: 12px;
  font-weight: 900;
}

.heartlink-native-member-detail > span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.heartlink-native-member-detail {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 13px 0;
  padding: 12px;
  border: 1px solid rgba(210, 255, 199, .1);
  border-radius: 17px;
  background: rgba(255, 255, 255, .035);
}

.heartlink-native-member-detail strong,
.heartlink-native-member-detail small {
  display: block;
}

.heartlink-native-member-detail strong {
  font-size: 13px;
}

.heartlink-native-member-detail small {
  margin-top: 3px;
  color: rgba(230, 255, 225, .42);
  font-size: 9px;
}

.heartlink-native-policy-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .035);
}

.heartlink-native-policy-list > div > span {
  color: var(--heartlink-green);
  font-size: 18px;
  text-align: center;
}

.heartlink-native-policy-list p {
  margin: 0;
}

.heartlink-native-policy-list strong,
.heartlink-native-policy-list small {
  display: block;
}

.heartlink-native-policy-list strong {
  font-size: 11px;
}

.heartlink-native-policy-list small {
  margin-top: 3px;
  color: rgba(230, 255, 225, .42);
  font-size: 9px;
  line-height: 1.45;
}

.heartlink-native-toast {
  position: fixed;
  z-index: 190;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  max-width: min(84vw, 360px);
  padding: 9px 13px;
  border: 1px solid rgba(198, 255, 180, .16);
  border-radius: 999px;
  color: rgba(246, 255, 243, .9);
  background: rgba(10, 18, 11, .94);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .34);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 160ms ease, transform 180ms ease;
  font-size: 10px;
  font-weight: 760;
  text-align: center;
}

.heartlink-native-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 心链手机页 v2：真实匿名头像圆环、纯黑底、亮边与高辨识字号。 */
body.heartlink-native-mode .app-frame {
  background: #000 !important;
}

.heartlink-native-header {
  align-items: center;
  padding: 12px 4px 16px;
}

.heartlink-native-header span,
.heartlink-native-section-head span {
  color: rgba(205, 255, 181, .92);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .12em;
}

.heartlink-native-header p {
  margin-top: 6px;
  color: rgba(242, 255, 236, .82);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.5;
}

.heartlink-native-privacy-button {
  width: 58px;
  min-width: 58px;
  height: 58px;
  border-color: rgba(184, 255, 145, .68);
  color: #edffe5;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(184, 255, 145, .1), 0 0 18px rgba(116, 255, 82, .09);
}

.heartlink-native-privacy-button span {
  font-size: 20px;
}

.heartlink-native-privacy-button small {
  color: rgba(237, 255, 228, .9);
  font-size: 12px;
  font-weight: 850;
}

.heartlink-native-pool {
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.heartlink-native-pool::before {
  display: none;
}

.heartlink-native-pool-head {
  padding: 0 4px;
}

.heartlink-native-pool-head > span {
  color: rgba(239, 255, 232, .86);
  font-size: 13px;
  font-weight: 820;
}

.heartlink-native-pool-head > span i {
  width: 9px;
  height: 9px;
  box-shadow: 0 0 14px rgba(143, 255, 115, .9);
}

.heartlink-native-pool-head button,
.heartlink-native-section-head button {
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(184, 255, 145, .62);
  color: #f1ffe9;
  background: #000;
  font-size: 13px;
  font-weight: 880;
  box-shadow: inset 0 0 0 1px rgba(184, 255, 145, .08);
}

.heartlink-native-pool-head button b {
  font-size: 17px;
}

.heartlink-native-ring {
  width: min(348px, 100%);
  margin: 8px auto 0;
  border: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: none;
}

.heartlink-native-ring.is-dragging {
  cursor: grabbing;
}

.heartlink-native-ring:focus-visible {
  outline: 2px solid rgba(184, 255, 145, .8);
  outline-offset: 2px;
  border-radius: 50%;
}

.heartlink-native-ring::after {
  display: none;
}

.heartlink-native-ring-track {
  position: absolute;
  inset: 8.5%;
  border: 1px solid rgba(184, 255, 145, .36);
  border-radius: 50%;
  box-shadow: inset 0 0 30px rgba(116, 255, 82, .05), 0 0 38px rgba(116, 255, 82, .06);
  transform: rotate(var(--ring-rotation, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
}

.heartlink-native-ring-track::before,
.heartlink-native-ring-track::after {
  position: absolute;
  inset: -4px;
  border: 1px dashed rgba(208, 255, 199, .11);
  border-radius: 50%;
  content: "";
}

.heartlink-native-ring-track::after {
  left: 42%;
  top: -2px;
  right: auto;
  bottom: auto;
  width: 16%;
  height: 3px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(184, 255, 145, .96), transparent);
  box-shadow: 0 0 15px rgba(116, 255, 82, .72);
}

.heartlink-native-member-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  transform: rotate(var(--ring-rotation, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
}

.heartlink-native-member-slot {
  width: clamp(42px, 12vw, 54px);
  height: clamp(42px, 12vw, 54px);
  pointer-events: auto;
  isolation: isolate;
  transform: translate(-50%, -50%) rotate(var(--ring-counter-rotation, 0deg));
  transition: filter .25s ease, opacity .25s ease;
}

.heartlink-native-member-slot::before {
  position: absolute;
  z-index: -1;
  inset: var(--halo-inset, -18px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--halo-r, 112), var(--halo-g, 177), var(--halo-b, 225), var(--halo-soft-alpha, .19)) 0 18%,
    rgba(var(--halo-r, 112), var(--halo-g, 177), var(--halo-b, 225), var(--halo-alpha, .26)) 34%,
    transparent 72%
  );
  filter: blur(3px);
  opacity: 0;
  content: "";
  pointer-events: none;
}

.heartlink-native-member-slot.is-lit::before {
  opacity: 1;
  animation: heartlink-native-member-halo 3.9s ease-in-out var(--member-delay, 0s) infinite;
}

.heartlink-native-member-slot img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle, #000 0 51%, rgba(0, 0, 0, .96) 58%, rgba(0, 0, 0, .28) 70%, transparent 78%);
  mask-image: radial-gradient(circle, #000 0 51%, rgba(0, 0, 0, .96) 58%, rgba(0, 0, 0, .28) 70%, transparent 78%);
  pointer-events: none;
  user-select: none;
}

.heartlink-native-member-slot.is-unlit {
  opacity: .52;
}

.heartlink-native-member-slot.is-unlit img {
  filter: grayscale(.28) saturate(.62) brightness(.65);
}

.heartlink-native-member-slot.is-lit img {
  filter: saturate(.9) brightness(1.03);
  animation: heartlink-native-member-image 3.9s ease-in-out var(--member-delay, 0s) infinite;
}

.heartlink-native-member-slot:hover {
  filter: brightness(1.13);
}

.heartlink-native-member-slot:focus-visible {
  outline: 2px solid rgba(206, 255, 184, .9);
  outline-offset: 3px;
}

.heartlink-native-pool-core {
  inset: 27%;
  border-color: rgba(184, 255, 145, .32);
  color: #f7fff3;
  background: radial-gradient(circle at 50% 38%, rgba(116, 255, 82, .13), #000 66%);
  box-shadow: inset 0 0 34px rgba(116, 255, 82, .07), 0 0 28px rgba(116, 255, 82, .06);
}

.heartlink-native-pool-core strong {
  font-size: 19px;
}

.heartlink-native-pool-core small {
  max-width: 112px;
  color: rgba(239, 255, 232, .78);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.4;
}

.heartlink-native-motion-hint,
.heartlink-native-pool-note {
  position: relative;
  z-index: 8;
  color: rgba(239, 255, 232, .78);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.5;
  text-align: center;
}

.heartlink-native-motion-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
}

.heartlink-native-motion-hint span {
  color: var(--heartlink-green);
  font-size: 16px;
}

.heartlink-native-pool-note {
  margin: 5px 0 0;
  color: rgba(230, 255, 219, .68);
  letter-spacing: .01em;
}

.heartlink-native-rule {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(184, 255, 145, .6);
  border-radius: 17px;
  color: rgba(241, 255, 235, .9);
  background: #000;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.55;
  box-shadow: inset 0 0 0 1px rgba(184, 255, 145, .06);
}

.heartlink-native-rule span {
  color: var(--heartlink-green);
  font-size: 18px;
}

.heartlink-native-sheet {
  background: #000;
  border-color: rgba(184, 255, 145, .48);
}

.heartlink-native-sheet-lead {
  color: rgba(240, 255, 234, .78);
  font-size: 13px;
}

.heartlink-native-input-label {
  color: rgba(246, 255, 242, .92);
  font-size: 13px;
}

.heartlink-native-sheet-primary,
.heartlink-native-sheet-secondary,
.heartlink-native-sheet-danger {
  font-size: 14px;
}

.heartlink-native-member-detail small {
  color: rgba(238, 255, 232, .72);
  font-size: 11px;
}

.heartlink-native-member-detail strong {
  font-size: 14px;
}

.heartlink-native-policy-list small {
  color: rgba(238, 255, 232, .72);
  font-size: 12px;
}

.heartlink-native-policy-list strong {
  font-size: 13px;
}

.heartlink-native-toast {
  border-color: rgba(184, 255, 145, .52);
  color: #f3ffed;
  background: #000;
  font-size: 12px;
}

.heartlink-native-page small {
  color: rgba(239, 255, 232, .78);
  font-size: 12px;
  line-height: 1.4;
}

@keyframes heartlink-native-member-halo {
  0%, 100% { transform: scale(.92); opacity: .72; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes heartlink-native-member-image {
  0%, 100% { filter: saturate(.88) brightness(.98); }
  50% { filter: saturate(1.02) brightness(1.11); }
}

@keyframes heartlink-native-breathe {
  0%, 100% { opacity: .68; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 350px) {
  .chat-area.has-heartlink-native-page { padding-inline: 10px; }
  .heartlink-native-ring { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .heartlink-native-core-spark { animation: none; }
  .heartlink-native-member-slot.is-lit::before,
  .heartlink-native-member-slot.is-lit img { animation: none; }
  .heartlink-native-sheet { transition: none; }
}

/* 主页头像始终保持方形圆角 */
[data-role="settings"] img {
  border-radius: 14px !important;
}

/* 自定义头像（群聊方形多头像 / 单聊首字母色块）也要跟随选中态缩放，保持与系统头像一致 */
.contact-card .group-avatar-grid,
.contact-card .contact-row-avatar {
  width: 56px;
  height: 56px;
  transition: width 160ms ease, height 160ms ease;
}
.contact-card.is-active .group-avatar-grid,
.contact-card.is-active .contact-row-avatar {
  width: 72px;
  height: 72px;
  font-size: 22px;
}

/* ── 第三方 APP 快捷入口 ─────────────────────────────── */
.app-shortcuts {
  padding: 0 18px 12px;
}

.app-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.app-shortcut-item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 760;
  transition: transform 120ms ease, background 120ms ease;
}

.app-shortcut-item:active {
  transform: scale(0.94);
}

.app-shortcut-item img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.app-shortcut-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 760;
}

/* 已绑定小绿点 */
.app-bound-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4fffb0;
  box-shadow: 0 0 6px rgba(79, 255, 176, 0.7);
  font-style: normal;
}

/* 添加按钮 */
.app-shortcut-add {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.app-shortcut-add-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px dashed rgba(255, 255, 255, 0.36);
  display: grid;
  place-items: center;
  font-size: 26px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
}

/* ─────────────────────────────────────────────────── */

/* ── 联系人页面 ───────────────────────────────────────────── */
.contacts-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 4px 0 0;
}

.contacts-search-bar {
  padding: 12px 18px 28px;
  flex-shrink: 0;
}

.contacts-search-bar input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 640;
  outline: none;
  transition: all 0.2s;
}

.contacts-search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.contacts-search-bar input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.contacts-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-result-item {
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.search-result-item strong {
  display: block;
  font-size: 15px;
  font-weight: 880;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 4px;
}

.search-result-item small {
  display: block;
  font-size: 13px;
  font-weight: 640;
  color: rgba(255, 255, 255, 0.6);
}

.search-result-source {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(102, 126, 234, 0.2);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 720;
  color: rgba(102, 126, 234, 1);
  margin-top: 6px;
}

.contacts-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 12px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.contacts-tabs::-webkit-scrollbar { display: none; }

.contacts-tab {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 760;
}

.nearby-people-card {
  display: grid;
  gap: 14px;
  margin: 0 18px 12px;
  padding: 16px;
  border: 1px solid rgba(93, 210, 255, 0.28);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(47, 153, 211, 0.18), rgba(255, 255, 255, 0.06));
}

.nearby-people-card strong {
  color: #fff;
  font-size: 15px;
}

.nearby-people-card p,
.nearby-people-card small {
  display: block;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.55;
}

.nearby-people-card .nearby-people-error { color: #ffb6af; }

.nearby-people-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nearby-people-actions button {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid rgba(104, 218, 255, 0.5);
  border-radius: 999px;
  background: rgba(27, 139, 181, 0.42);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.nearby-people-actions button.secondary {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.nearby-people-actions button:disabled { opacity: 0.52; }

.contacts-tab.is-active {
  background: rgba(255,255,255,0.92);
  color: #07131d;
  border-color: transparent;
}

.create-topic-button {
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.add-friend-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 25px;
  font-weight: 480;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.add-friend-button span {
  transform: translateY(-1px);
}

.add-friend-button:active {
  background: rgba(255,255,255,0.24);
  transform: scale(0.94);
}

.contacts-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px 16px;
}

.contacts-empty {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  padding: 40px 0;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(7,19,29,0.001); /* 让滑动捕获生效但视觉不变 */
  text-align: left;
  width: 100%;
  position: relative;
  z-index: 2;
  transform: translateX(var(--row-swipe-x, 0px));
  transition: transform 160ms ease;
  touch-action: pan-y;
}
.contact-row-wrap.is-dragging .contact-row {
  transition: none;
}
.contact-row:active { background: rgba(255,255,255,0.08); }

.contact-row-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}
.contact-row-wrap.is-removing {
  animation: contactRowRemove 220ms ease forwards;
}
@keyframes contactRowRemove {
  to { opacity: 0; transform: scaleY(0.4); height: 0; margin: 0; }
}

.contact-row-hint {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  z-index: 1;
  cursor: pointer;
}
.hint-profile {
  left: 0;
  background: linear-gradient(90deg, #1B6F62, transparent);
  opacity: var(--hint-profile-opacity, 0);
}
.hint-delete {
  right: 0;
  background: linear-gradient(270deg, #c0392b, transparent);
  justify-content: flex-end;
  opacity: var(--hint-delete-opacity, 0);
}

.contact-row-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 880;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.contact-row-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.contact-row-info strong {
  font-size: 14.5px;
  font-weight: 800;
  color: #fff;
}
.contact-row-info small {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

.contact-group-select {
  max-width: 72px;
  min-height: 30px;
  padding: 3px 22px 3px 9px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.08);
  font: 700 12px/1 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  flex: 0 0 auto;
}

.contact-row-chevron {
  color: rgba(255,255,255,0.35);
  font-size: 18px;
}

/* ── 创建话题 / 添加成员 弹窗：固定在视口中央
   用 inset:0 + margin:auto 居中，避免 transform 在 iOS Safari 上引起内容截断 ── */
.create-topic-page {
  position: fixed;
  inset: 0;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 22px;
  padding: 0;
  width: min(390px, calc(100vw - 34px));
  height: clamp(500px, calc(100dvh - 64px), 640px);
  max-height: min(640px, calc(100vh - 64px));
  max-height: min(640px, calc(100dvh - 64px));
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  /* 比原来（0.96）明显更浅更透明，同时深色足够保证文字对比度不丢失 */
  background: rgba(16, 32, 48, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 24px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  color: #fff;
}

.create-topic-page:not([open]),
.create-topic-page[hidden] {
  display: none;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.create-topic-page::backdrop {
  background: rgba(4, 9, 16, 0.42);
  backdrop-filter: blur(10px);
}

/* 拉长弹出节奏，跟项目里其他弹窗（如绑定账号）保持同一种柔和过渡感，
   但时长翻倍以上，避免"弹出过快、观感生硬"。 */
.create-topic-page[open] {
  display: flex;
  animation: dialog-fade-in-slow 220ms ease both;
}

@keyframes dialog-fade-in-slow {
  from {
    opacity: 0;
    filter: blur(8px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

.create-topic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  flex-shrink: 0;
}
.create-topic-header span {
  font-size: 15px;
  font-weight: 880;
  color: #fff;
}
.create-topic-header button {
  font-size: 14px;
  font-weight: 780;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  padding: 4px 6px;
}
#finishTopicButton {
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.32);
  font-weight: 800;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}
#finishTopicButton.is-ready {
  background: #1aad19;
  color: #fff;
  font-weight: 880;
  box-shadow: 0 6px 16px rgba(26,173,25,0.4);
}
#finishTopicButton.is-ready:active {
  transform: scale(0.95);
}

.create-topic-input {
  margin: 6px 18px 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  cursor: text;
}
.create-topic-input span {
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
}
.create-topic-input input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
}
.create-topic-input input::placeholder {
  color: rgba(255,255,255,0.4);
}

.create-topic-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.group-picker-scope {
  margin: 0 18px 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  flex: 0 0 auto;
}
/* iOS 安全区底部适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .create-topic-list {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

.topic-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  min-height: 58px;
}
.topic-contact-row:active { background: rgba(255,255,255,0.08); }

.topic-select-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease, border-color 120ms ease;
}
.topic-contact-row.is-selected .topic-select-circle {
  background: #1aad19;
  border-color: #1aad19;
}
.topic-contact-row.is-selected .topic-select-circle::after {
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

/* ── 群聊方形头像（最多4格） ──────────────────────────────── */
.group-avatar-grid {
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: rgba(255,255,255,0.08);
}
.group-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 880;
  color: #fff;
}

.group-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-message-sender {
  display: block;
  margin: 0 0 4px;
  color: rgba(196, 255, 178, 0.72);
  font-size: 10px;
  font-weight: 780;
}
.group-cell-empty {
  background: rgba(255,255,255,0.06);
}
.group-cell-count {
  background: rgba(255,255,255,0.22);
  font-size: 15px;
}

/* 已创建 AI 应用聊天页右上角动作：和左侧清空/加人小圆按钮分离 */
.toolbar-created-app-actions {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.toolbar-edit-button {
  pointer-events: auto;
  min-width: 54px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(8, 16, 24, 0.28);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.toolbar-invite-button {
  border-color: rgba(79, 255, 176, 0.32);
  background: rgba(32, 196, 90, 0.2);
}

/* 虚拟人物聊天页右上角"有约"按钮：与 ×/+ 同一水平线（top:8px, height:34px） */
.date-agent-button {
  position: absolute;
  top: 8px;
  right: 18px;
  z-index: 4;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,138,80,0.5);
  background: rgba(255,138,80,0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: auto;
  display: grid;
  place-items: center;
  line-height: 1;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.date-agent-button:active {
  transform: scale(0.95);
}


/* 联系人轨道：新创建 AI 应用的空头像占位 */
.created-app-avatar-empty {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px dashed rgba(255,255,255,0.28);
}
.contact-card.is-active .created-app-avatar-empty {
  width: 72px;
  height: 72px;
}

.created-app-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.created-app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.created-app-edit-button {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  flex-shrink: 0;
}
.created-app-invite-button {
  max-width: 118px;
  padding-left: 12px;
  padding-right: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 个人公开资料在其他用户页面继续作为只读资料卡使用。 */
.profile-public-card {
  margin: 10px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-public-preview-heading {
  padding: 10px 12px;
  border: 1px solid rgba(131, 240, 113, 0.14);
  border-radius: 14px;
  background: rgba(111, 214, 94, 0.045);
}
.profile-public-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-avatar-slot {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
  border: 1.5px dashed rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}
.profile-avatar-slot.has-image {
  border-style: solid;
  border-color: transparent;
}
.profile-avatar-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-slot-hint {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(255,255,255,0.45);
  text-align: center;
}
.profile-name-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 880;
  color: #fff;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.profile-contact-name-block {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}
.profile-contact-original-name {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 650;
}
.profile-name-input::placeholder {
  color: rgba(255,255,255,0.4);
  font-weight: 700;
}
.profile-public-fields {
  display: flex;
  flex-direction: column;
}

/* 合并后的单一设置折叠区。 */
.profile-section-toggle {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.16);
  border: 1.5px solid rgba(255,255,255,0.26);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 880;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.profile-section-toggle:active {
  transform: scale(0.97);
}
.profile-section-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.4);
}
.profile-toggle-chevron {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
}
.profile-section-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}
.profile-section-body[hidden] {
  display: none;
}
.profile-field-group {
  display: flex;
  flex-direction: column;
}
.profile-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
  width: 100%;
  background: none;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
.profile-field-label {
  font-size: 14px;
  font-weight: 760;
  color: rgba(255,255,255,0.88);
  flex-shrink: 0;
}
.profile-field-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.profile-field-input {
  width: 100%;
  text-align: right;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.profile-field-input::placeholder {
  color: rgba(255,255,255,0.36);
  font-weight: 600;
}
.profile-field-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 18px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.72) 50%) right 7px center / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(255,255,255,0.72) 50%, transparent 50%) right 2px center / 6px 6px no-repeat;
}
.profile-field-select option {
  color: #111;
  background: #fff;
}
.profile-field-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.profile-field-chevron {
  color: rgba(255,255,255,0.36);
  font-size: 17px;
}
.profile-visibility-group {
  padding: 4px 4px 2px;
}
.profile-visibility-title {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-weight: 700;
  margin-bottom: 8px;
  padding: 0 4px;
}
.profile-visibility-options {
  display: flex;
  gap: 10px;
}
.profile-visibility-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  font-weight: 720;
  color: rgba(255,255,255,0.78);
  cursor: pointer;
}
.profile-visibility-option input {
  accent-color: #1aad19;
  margin: 0;
}
.profile-visibility-option:has(input:checked) {
  border-color: rgba(26,173,25,0.55);
  background: rgba(26,173,25,0.16);
  color: #fff;
}

.inline-search-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
}
.inline-search-icon {
  font-size: 14px;
  opacity: 0.7;
}
.inline-search-topbar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.inline-search-topbar input::placeholder {
  color: rgba(255,255,255,0.45);
}
.host-plain-message .chat-bubble-wrap p {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}
.group-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: -8px 0 8px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
}
.group-chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.group-chat-header-info strong {
  font-size: 15px;
  font-weight: 880;
  color: #fff;
}
.group-chat-header-info small {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-ended-notice {
  margin: 60px 24px 0;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}
.system-archive-message {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  padding: 0 16px;
}
.system-archive-text {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255,255,0.14);
  color: rgba(255,255,255,0.52);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}
.contact-card span {
  max-width: 86px;
  min-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}
.contact-card .contact-name-label.is-remark-editable {
  cursor: pointer;
}
.contact-card .contact-name-label.is-remark-editable::after {
  content: " ✎";
  font-size: 9px;
  font-weight: 800;
  opacity: 0.58;
}
.contact-card.is-active {
  color: #fff;
  filter: blur(0);
}
.contact-card.is-active span {
  font-size: 14px;
  font-weight: 880;
}
.contact-card.is-active .contact-name-label.is-remark-editable::after {
  opacity: 1;
}

.contact-remark-overlay {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.contact-remark-panel {
  width: min(100%, 340px);
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(15, 27, 37, 0.97);
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}
.contact-remark-panel strong {
  font-size: 18px;
  font-weight: 900;
}
.contact-remark-panel p,
.contact-remark-panel small {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.5;
}
.contact-remark-panel input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.contact-remark-panel input:focus {
  border-color: rgba(125, 220, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(87, 189, 235, 0.14);
}
.contact-remark-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.contact-remark-actions button {
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 760;
}
.contact-remark-actions button.is-primary {
  border-color: transparent;
  background: #fff;
  color: #10212c;
}
.contact-remark-actions button:disabled {
  opacity: 0.36;
}
.contact-card.system-contact img {
  background: transparent;
  padding: 0;
  object-fit: contain;
}

.contact-card.system-shortcut img {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.surface-toolbar {
  width: 100%;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  position: relative;
  z-index: 4;
}


body.search-page .surface-toolbar {
  height: 44px;
  min-height: 44px;
  padding: 0 18px 0 58px;
  pointer-events: auto;
}

/* ── 系统搜索：工具栏输入框（与清空按钮平行） ─────────────────────── */
.search-toolbar-input-wrap {
  flex: 0 1 300px;
  max-width: calc(100% - 12px);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(18px) saturate(150%);
  pointer-events: auto;
}
.search-toolbar-icon {
  font-size: 13px;
  opacity: 0.7;
}
.search-toolbar-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}
.search-toolbar-input-wrap input::placeholder {
  color: rgba(255,255,255,0.42);
}

/* ── 系统搜索：结果二级页面 ───────────────────────────────────── */
.search-results-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}
.search-empty-hint {
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  padding: 40px 20px;
  margin: 0;
}
.search-result-group {
  display: flex;
  flex-direction: column;
}
.search-result-group-title {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  margin: 0 4px 6px;
}
.search-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  background: none;
  text-align: left;
}
.search-result-row:last-child {
  border-bottom: none;
}
.search-result-row:active {
  background: rgba(255,255,255,0.06);
}

.notification-area {
  width: 100%;
  padding: 0 18px;
  overflow: hidden;
}

.clear-all-button {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(8, 16, 24, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.14);
  font-size: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.clear-all-button:active {
  transform: scale(0.94);
}

.home-login-button {
  position: absolute;
  top: 8px;
  right: 54px;
  left: auto;
  z-index: 4;
  min-width: 66px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(160, 222, 255, 0.5);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(45, 151, 255, 0.86), rgba(77, 106, 255, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 22px rgba(20, 78, 180, 0.24);
  font-size: 13px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.home-login-button[hidden] {
  display: none;
}

.home-login-button.is-logged-in {
  border-color: rgba(138, 240, 205, 0.48);
  background: linear-gradient(135deg, rgba(27, 171, 144, 0.78), rgba(45, 126, 225, 0.8));
}

.home-login-button:active {
  transform: scale(0.96);
}

/* 滚动历史消息按钮：工具栏水平居中，避开左侧圆形按钮和右侧文字按钮 */
.toolbar-scroll-btn {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(8, 16, 24, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.14);
  font-size: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  touch-action: none;
}
.toolbar-scroll-btn[hidden] { display: none; }
.toolbar-scroll-btn:active { transform: scale(0.94); }

.clear-all-button.is-exit-button {
  color: #ff8a80;
  border-color: rgba(255, 138, 128, 0.4);
  background: rgba(95, 30, 28, 0.3);
}

/* +加人按钮：常驻在"清空消息/退出聊天"按钮右侧，同一排左上角。
   四个按钮（清除/加人/退出/结束话题）每页最多同时显示两到三个，
   具体显示哪些、谁在前谁在后，由 JS 的 layoutToolbarButtons() 统一计算 left 值。 */
.add-member-button {
  position: absolute;
  top: 8px;
  left: 48px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(8, 16, 24, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.14);
  font-size: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.add-member-button:active {
  transform: scale(0.94);
}

.exit-chat-button {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 138, 128, 0.4);
  border-radius: 50%;
  color: #ff8a80;
  background: rgba(95, 30, 28, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.14);
  font-size: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.exit-chat-button:active {
  transform: scale(0.94);
}

.end-topic-toolbar-button {
  position: absolute;
  top: 10px;
  right: 12px;
  left: auto;
  z-index: 4;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  pointer-events: auto;
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.end-topic-toolbar-button.is-ended {
  background: rgba(26, 173, 25, 0.18);
  border-color: rgba(26, 173, 25, 0.4);
}
.end-topic-toolbar-button:active {
  transform: scale(0.96);
}

.message-list {
  display: grid;
  gap: 10px;
  min-height: 332px;
  max-height: 332px;
  overflow: hidden;
  touch-action: none;
  align-content: start;
  mask-image: none;
  -webkit-mask-image: none;
}

.message-row {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  border-radius: 24px;
  touch-action: pan-y;
}

.delete-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 69, 58, 0.54) 48%, var(--danger) 100%);
  opacity: var(--delete-opacity, 0);
  transform: translateX(var(--delete-shift, 16px));
  transition: opacity 180ms ease, transform 180ms ease;
}

.delete-backdrop span {
  width: 96px;
  display: grid;
  place-items: center;
  padding-top: 42px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 16px;
  font-weight: 820;
}

.message-card {
  position: relative;
  min-height: 104px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--glass-line);
  border-radius: inherit;
  color: #fff;
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 46px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(24px) saturate(145%);
  transform: translateX(var(--swipe-x, 0px));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
  will-change: transform;
}

.message-row.is-dragging .message-card,
.message-row.is-dragging .delete-backdrop {
  transition: none;
}

.message-row.is-removing .message-card {
  opacity: 0;
  transform: translateX(-112%);
}

.message-row.is-removing .delete-backdrop {
  opacity: 0;
  display: none;
}

.message-row.is-removing {
  animation: collapse-row 220ms ease 170ms forwards;
}

.message-row.is-new {
  animation: reveal-row 220ms ease both;
}

.message-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.message-copy {
  min-width: 0;
}

.message-topline {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.message-topline strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 860;
}

.message-topline time {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.message-copy p {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  font-weight: 690;
  line-height: 1.24;
}

@keyframes collapse-row {
  to {
    min-height: 0;
    height: 0;
    margin-top: -10px;
    opacity: 0;
  }
}

@keyframes reveal-row {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 聊天区域滚动控制：定位在 chat-area-wrap 内顶部居中 ── */
.chat-area-wrap {
  position: relative;
}


.home-shorts-root {
  display: grid;
  gap: 10px;
  margin: 12px 18px 0;
  padding: 14px;
  border-radius: 18px;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 16px 34px rgba(0,0,0,.18);
  backdrop-filter: blur(18px) saturate(145%);
}

.home-shorts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-shorts-head div {
  display: grid;
  gap: 2px;
}

.home-shorts-head span,
.home-shorts-head small {
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 720;
}

.home-shorts-head strong {
  font-size: 17px;
  font-weight: 900;
}

.home-shorts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-shorts-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(5, 13, 22, .22);
  border: 1px solid rgba(255,255,255,.1);
}

.home-shorts-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(0,0,0,.32));
}

.home-shorts-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-shorts-frame iframe,
.home-shorts-widget iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.home-shorts-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.48));
  cursor: pointer;
}

.home-shorts-play span {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
}

.home-shorts-frame.is-playing {
  background: rgba(0,0,0,.62);
}

.home-shorts-card strong {
  color: rgba(255,255,255,.94);
  font-size: 12px;
  font-weight: 880;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-shorts-card span,
.home-shorts-hint,
.home-shorts-open {
  color: rgba(255,255,255,.56);
  font-size: 11px;
  line-height: 1.35;
}

.home-shorts-open {
  text-decoration: none;
  font-weight: 820;
}

.home-shorts-hint {
  margin: 0;
}

.home-shorts-widget {
  height: 520px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
}

body.home-shorts-stream-open {
  overflow: hidden;
}

body.home-shorts-stream-open .app-frame {
  overflow: hidden;
}

.home-shorts-stream {
  position: fixed;
  z-index: 2147483000;
  min-height: 100dvh;
  overflow: hidden;
  color: #fff;
  background: #03070e;
  touch-action: pan-x;
}

.home-shorts-stream-top,
.home-shorts-stream-actions {
  position: absolute;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-shorts-stream-top {
  top: max(12px, env(safe-area-inset-top));
}

.home-shorts-stream-actions {
  bottom: max(14px, env(safe-area-inset-bottom));
  justify-content: center;
}

.home-shorts-stream-close,
.home-shorts-stream-actions button,
.home-shorts-stream-fallback {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  backdrop-filter: blur(16px);
}

.home-shorts-stream-counter {
  color: rgba(255,255,255,.68);
  font-size: 13px;
  font-weight: 850;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.2);
  backdrop-filter: blur(16px);
}

.home-shorts-stream-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070d;
}

.home-shorts-stream-stage iframe,
#home-shorts-player {
  width: 100%;
  height: 100%;
  border: 0;
}

.home-shorts-stream-blocked {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(255,255,255,.1), rgba(3,7,14,.86));
}

.home-shorts-stream-blocked img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .32;
}

.home-shorts-stream-blocked div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: 280px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(0,0,0,.36);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(18px);
}

.home-shorts-stream-blocked strong {
  font-size: 16px;
  font-weight: 900;
}

.home-shorts-stream-blocked span {
  color: rgba(255,255,255,.68);
  font-size: 12px;
  line-height: 1.45;
}

.home-shorts-stream-swipe-edge {
  position: absolute;
  top: 72px;
  bottom: 104px;
  z-index: 3;
  width: 32px;
  touch-action: pan-x;
}

.home-shorts-stream-swipe-edge.is-left {
  left: 0;
}

.home-shorts-stream-swipe-edge.is-right {
  right: 0;
}

.home-shorts-stream-meta {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 58px);
  z-index: 4;
  display: grid;
  gap: 4px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, transparent, rgba(3,7,14,.2));
}

.home-shorts-stream-meta strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.home-shorts-stream-meta span {
  color: rgba(255,255,255,.62);
  font-size: 12px;
  font-weight: 760;
}

@media (min-width: 700px) {
  .home-shorts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .home-shorts-stream-actions {
    left: 8px;
    right: 8px;
    gap: 8px;
  }

  .home-shorts-stream-close,
  .home-shorts-stream-actions button,
  .home-shorts-stream-fallback {
    padding: 9px 11px;
    font-size: 12px;
  }
}


.chat-scroll-btn:active {
  transform: scale(0.9);
}

.chat-area {
  position: relative;
  display: grid;
  gap: 12px;
  height: auto;
  min-height: calc(100vh - 136px - 110px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
  max-height: none;
  overflow: visible;
  align-content: end;
  padding: 12px 18px 18px 18px;
  margin-bottom: calc(110px + env(safe-area-inset-bottom));
  scrollbar-width: none;
  touch-action: pan-y;
  overscroll-behavior: auto;
  mask-image: none;
  -webkit-mask-image: none;
}

/* 真人单聊和群聊在手机竖屏只保留紧凑的起始聊天区；消息增多后仍按内容自然向下增长，
   页面纵向浏览继续完全由用户手动控制。 */
@media (orientation: portrait) {
  body.human-chat-page .chat-area {
    min-height: min(320px, 34vh);
    min-height: clamp(220px, 34svh, 320px);
  }
}

.chat-area.has-xiaoxin-belief-hero {
  align-content: start;
  padding-top: clamp(20px, 5vh, 48px);
}

.xiaoxin-belief-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  display: grid;
  gap: 0;
  padding: clamp(22px, 6vw, 30px) clamp(17px, 5vw, 22px) clamp(28px, 8vw, 38px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 52% 15%, rgba(72, 255, 68, 0.09), transparent 52%),
    radial-gradient(ellipse at 8% 62%, rgba(36, 117, 65, 0.12), transparent 42%),
    linear-gradient(150deg, rgba(7, 20, 12, 0.96), rgba(3, 10, 7, 0.9));
  box-shadow: none;
}

.xiaoxin-belief-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(205, 255, 203, 0.09) 0.6px, transparent 0.6px);
  background-size: 6px 6px;
  opacity: 0.18;
  pointer-events: none;
}

.xiaoxin-belief-hero h2 {
  margin: 0;
  color: #f4f7f0;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-size: clamp(27.2px, 7.2vw, 30.4px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 1.26;
}

.xiaoxin-belief-hero h2 span {
  position: relative;
  display: inline-block;
  color: #55ff3c;
  text-shadow: 0 0 24px rgba(85, 255, 60, 0.12);
}

.xiaoxin-belief-hero h2 span::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 4%;
  bottom: -0.04em;
  height: 0.13em;
  border-radius: 50%;
  background: rgba(83, 211, 64, 0.25);
  transform: rotate(-1.2deg);
}

.xiaoxin-belief-hero p {
  margin: clamp(38px, 10vw, 52px) 0 0;
  color: rgba(224, 229, 228, 0.72);
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 430;
  letter-spacing: 0.02em;
  line-height: 1.9;
}

.xinqiao-belief-accordion {
  width: 100%;
  margin-top: clamp(38px, 10vw, 52px);
  display: grid;
  gap: 10px;
}

.xinqiao-belief-detail {
  overflow: hidden;
  border: 1px solid rgba(217, 255, 209, 0.13);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.xinqiao-belief-summary {
  width: 100%;
  min-height: 62px;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  color: #f4f7f0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.xinqiao-belief-summary > strong {
  font-size: 14px;
  font-weight: 820;
  line-height: 1.42;
}

.xinqiao-belief-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(116, 255, 82, 0.22);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #9cff81;
  background: rgba(116, 255, 82, 0.065);
  font-size: 16px;
  font-weight: 760;
  line-height: 1;
}

.xinqiao-belief-chevron {
  color: rgba(236, 255, 239, 0.48);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.xinqiao-belief-detail.is-open {
  border-color: rgba(116, 255, 82, 0.24);
  background: rgba(116, 255, 82, 0.045);
}

.xinqiao-belief-detail.is-open .xinqiao-belief-chevron {
  transform: rotate(45deg);
}

.xinqiao-belief-detail-body {
  padding: 15px 15px 17px;
  border-top: 1px solid rgba(217, 255, 209, 0.09);
  display: grid;
  gap: 12px;
}

.xinqiao-belief-detail-body[hidden] {
  display: none;
}

.xiaoxin-belief-hero .xinqiao-belief-detail-body > p {
  margin: 0;
  color: rgba(224, 229, 228, 0.72);
  font-size: 14px;
  line-height: 1.75;
}

.xiaoxin-belief-hero .xinqiao-belief-detail-body > p.xinqiao-belief-lead {
  color: rgba(246, 255, 243, 0.94);
  font-size: 16px;
  font-weight: 720;
  line-height: 1.65;
}

.xinqiao-belief-values,
.xinqiao-belief-lines {
  display: grid;
  gap: 10px;
}

.xinqiao-belief-values > div,
.xinqiao-belief-lines > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.xinqiao-belief-values > div > span,
.xinqiao-belief-lines > div > span {
  padding-top: 2px;
  color: #86ef6e;
  font-size: 11px;
  font-weight: 820;
  text-align: center;
}

.xinqiao-belief-values p,
.xinqiao-belief-lines p {
  margin: 0;
  display: grid;
  gap: 3px;
}

.xinqiao-belief-values strong,
.xinqiao-belief-lines strong {
  color: rgba(246, 255, 243, 0.94);
  font-size: 14px;
  line-height: 1.45;
}

.xinqiao-belief-values small,
.xinqiao-belief-lines small {
  color: rgba(224, 229, 228, 0.62);
  font-size: 12.5px;
  line-height: 1.6;
}

.xinqiao-belief-quotes blockquote {
  margin: 0;
  padding: 12px 13px;
  border-left: 2px solid rgba(116, 255, 82, 0.34);
  border-radius: 0 11px 11px 0;
  background: rgba(255, 255, 255, 0.025);
}

.xinqiao-belief-quotes blockquote p {
  margin: 0 0 6px;
  color: rgba(246, 255, 243, 0.9);
  font-size: 13.5px;
  line-height: 1.65;
}

.xinqiao-belief-quotes blockquote small {
  color: #86ef6e;
  font-size: 11.5px;
  font-weight: 760;
}

@media (max-width: 380px) {
  .xiaoxin-belief-hero {
    padding-inline: 17px;
  }

  .xiaoxin-belief-hero h2 {
    font-size: 26.4px;
  }

  .xiaoxin-belief-hero p {
    font-size: 16px;
  }
}


.chat-area[hidden],
.notification-area[hidden] {
  display: none;
}

.chat-message {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.phone-directory-background {
  position: absolute;
  inset: 8px 22px;
  z-index: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  pointer-events: none;
  opacity: 0.24;
  filter: blur(0.2px);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.18));
}

.phone-directory-background span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 760;
}

.phone-directory-background b {
  min-width: 38px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 900;
}

.chat-side-tools {
  width: 34px;
  min-width: 34px;
  display: grid;
  justify-items: center;
  gap: 5px;
}

.chat-message p {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  backdrop-filter: blur(20px) saturate(140%);
  font-size: 15px;
  font-weight: 680;
  line-height: 1.32;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-message.incoming p {
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
  backdrop-filter: none;
}

.chat-message.outgoing p {
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.34);
}

.system-chat-card {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 9px;
  padding: 14px 16px;
}

.system-chat-card.outgoing {
  justify-content: flex-end;
  align-items: flex-end;
}

.system-chat-card p {
  max-width: 100%;
  margin: 0;
  padding: 3px 0 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  backdrop-filter: none;
  font-size: 15px;
  font-weight: 690;
  line-height: 1.28;
}

.system-chat-card.outgoing p {
  max-width: 100%;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
}

.chat-bubble-wrap {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 43px);
  display: block;
}

.chat-bubble-wrap p {
  max-width: 100%;
}

.voice-speaker-button {
  width: 30px;
  height: 30px;
  min-width: 30px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 14px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.voice-speaker-button.is-playing {
  background: rgba(26, 173, 25, 0.32);
  border-color: rgba(26, 173, 25, 0.55);
  box-shadow: 0 0 0 4px rgba(26, 173, 25, 0.12);
}
.voice-speaker-button.is-muted {
  opacity: 0.58;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  filter: grayscale(1);
}
.voice-speaker-button:active {
  transform: scale(0.92);
}

/* 播放原声按钮▶：接收方在 chat-side-tools，发送方在 voice-duration-bar 内 */
.voice-play-original-button {
  width: 30px;
  height: 30px;
  min-width: 30px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.voice-play-original-button:active {
  transform: scale(0.92);
}

.voice-message-wrap {
  display: grid;
  gap: 6px;
  width: min(100%, 300px);
}

/* 时长条：仅发送方气泡内有（接收方按钮已移至 chat-side-tools） */
.voice-duration-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.voice-message-audio {
  display: none;
}

/* 气泡内的长文本折叠：文字和箭头同属一个气泡 */
.voice-text-block {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.voice-bubble-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.voice-text-block.is-expanded .voice-bubble-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}


.voice-translation-speaker {
  width: 26px;
  height: 26px;
  min-width: 26px;
  font-size: 12px;
  flex-shrink: 0;
}

.chat-message.outgoing {
  justify-content: flex-end;
  align-items: flex-end;
}

.chat-message.outgoing p {
  max-width: 82%;
}

.digital-human-panel {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 16px 36px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(22px) saturate(145%);
}

.digital-human-preview {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.digital-human-preview img {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.digital-human-panel.is-speaking .digital-human-preview img {
  animation: digital-human-speaking 520ms ease-in-out infinite;
  box-shadow:
    0 0 0 8px rgba(95, 198, 255, 0.14),
    0 0 34px rgba(95, 198, 255, 0.48),
    0 10px 22px rgba(0, 0, 0, 0.22);
}

.digital-human-preview span,
.digital-human-copy small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 760;
  text-align: center;
}

.digital-human-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.digital-human-copy strong {
  font-size: 16px;
  font-weight: 880;
}

.digital-human-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.34;
}

.digital-human-copy small {
  text-align: left;
}

.digital-human-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.digital-human-actions button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 820;
}

.chat-message.voice p {
  min-width: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invite-message-actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.invite-message-actions button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 820;
}

.invite-message-actions button:first-child {
  background: rgba(26, 173, 25, 0.78);
  border-color: rgba(26, 173, 25, 0.88);
}

.invite-message-status {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 760;
}

.composer-area {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  width: min(100%, 430px);
  min-height: calc(110px + env(safe-area-inset-bottom));
  padding: 5px 18px max(5px, env(safe-area-inset-bottom));
  overflow: visible;
  pointer-events: auto;
  touch-action: none;
  background: transparent;
}

.record-glow {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  width: 160px;
  height: 120px;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) scale(0.72);
  border-radius: 999px;
  background: radial-gradient(ellipse at 50% 62%, rgba(75, 172, 255, 0.72) 0%, rgba(75, 172, 255, 0.3) 42%, transparent 74%);
  filter: blur(2px);
  transition: opacity 180ms ease, transform 260ms ease;
}

.composer-area.is-recording .record-glow {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: recording-pulse 1150ms ease-in-out infinite;
}

.record-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translate(-50%, 18px);
  min-width: 164px;
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 0, 0, 0.22);
  opacity: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 760;
  backdrop-filter: blur(18px) saturate(140%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.composer-area.is-recording .record-hint,
.composer-area.show-hint .record-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bottom-input-bar {
  position: relative;
  z-index: 2;
  min-height: 90px;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: end;
  gap: 18px;
  pointer-events: auto;
  touch-action: none;
}

.bottom-icon-button,
.voice-home-button {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 28px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px) saturate(120%);
}

.bottom-icon-button {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 900;
}

.voice-home-button {
  width: 94px;
  height: 94px;
  justify-self: center;
  display: grid;
  place-items: center;
  border-width: 2px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 880;
  letter-spacing: 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-drag: none;
  overscroll-behavior: none;
  cursor: pointer;
}

.voice-home-button,
.voice-home-button * {
  touch-action: manipulation !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.voice-home-button [data-voice-label] {
  max-width: 54px;
  line-height: 1.16;
  text-align: center;
}

.voice-home-icon {
  width: 10px;
  height: 10px;
  overflow: hidden;
  border-radius: 50%;
  color: transparent;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(116, 255, 82, 0);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.composer-area.is-recording .voice-home-icon {
  box-shadow: 0 0 0 7px rgba(116, 255, 82, 0.18);
  animation: recording-dot-pulse 1s ease-in-out infinite;
}

@keyframes recording-dot-pulse {
  0%, 100% { transform: scale(0.82); }
  50% { transform: scale(1.18); }
}

.composer-area.is-recording .voice-home-button {
  border-color: rgba(130, 210, 255, 0.9);
  color: #fff;
  background: rgba(80, 176, 255, 0.12);
  box-shadow:
    0 0 0 10px rgba(72, 164, 255, 0.16),
    0 0 32px rgba(72, 164, 255, 0.58),
    inset 0 0 22px rgba(116, 204, 255, 0.22);
}

.voice-home-button.is-processing {
  opacity: 0.72;
  cursor: progress;
}

.text-composer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 3;
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr 46px;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(26px) saturate(150%);
  pointer-events: auto;
}

.text-composer[hidden] {
  display: none;
}

#messageInput {
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
  font-weight: 680;
  padding: 0 10px;
}

#messageInput::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

#sendTextButton {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #0a1a24;
  background: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  font-weight: 900;
}

.dynamic-area {
  padding: 18px 18px 4px;
}

/* 心桥主页由星球电视完整替代旧共同记忆；布局恢复逻辑也不能重新显示它。 */
body.system-page .dynamic-area {
  display: none !important;
}

.dynamic-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  background: transparent;
}

.dynamic-area h2 {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  font-weight: 780;
  letter-spacing: 0;
  background: transparent;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.dynamic-heading h2 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-dynamic-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.38), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 28px rgba(0, 0, 0, 0.18);
  font-size: 27px;
  line-height: 1;
  backdrop-filter: blur(22px) saturate(170%);
}

.add-dynamic-button:active {
  transform: scale(0.94);
}

.dynamic-area.is-readonly .add-dynamic-button {
  display: none;
}

.dynamic-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: block;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px) saturate(145%);
}

.dynamic-card.is-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.24), transparent 28%),
    rgba(255, 255, 255, 0.12);
}

.dynamic-card.is-placeholder::before {
  content: "";
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 38%, rgba(255, 255, 255, 0.9) 38% 62%, transparent 62%),
    rgba(255, 255, 255, 0.12);
  clip-path: polygon(32% 24%, 32% 76%, 76% 50%);
  opacity: 0.9;
}

.dynamic-card img,
.dynamic-card video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dynamic-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), transparent);
}

.dynamic-card.has-deferred-video::before,
.dynamic-slide.has-deferred-video::before {
  content: "▶";
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 50%;
  color: #fff;
  font-size: 25px;
  text-indent: 4px;
  background: rgba(0,0,0,.38);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.dynamic-card span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 18px;
  font-weight: 860;
}

.dynamic-detail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 70;
  display: grid;
  place-items: center;
  width: min(100%, 430px);
  padding: 0;
  opacity: var(--detail-opacity, 1);
  transform: translate(calc(-50% + var(--detail-x, 0px)), var(--detail-y, 0px));
  background: #05090f;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}

.dynamic-detail[hidden] {
  display: none;
}

.dynamic-detail.is-dragging {
  transition: none;
}

.dynamic-stage {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #05090f;
  box-shadow: none;
  touch-action: none;
}

.dynamic-detail-action-slot {
  position: absolute;
  left: 16px;
  top: max(14px, env(safe-area-inset-top));
  z-index: 92;
}

.dynamic-delete-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 90, 90, 0.45);
  border-radius: 50%;
  color: #ff8a80;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px) saturate(130%);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  padding-bottom: 2px;
}
.dynamic-delete-button:active {
  transform: scale(0.92);
}

.dynamic-detail[hidden] .dynamic-detail-action-slot {
  display: none;
}

.dynamic-slide {
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0;
  color: #fff;
}

.dynamic-slide img,
.dynamic-slide video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dynamic-slide video {
  background: #05090f;
}

.dynamic-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

/* ── 聊天总结专属全屏卡片 ───────────────────────────────── */
.dynamic-summary-card {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: linear-gradient(170deg, rgba(4, 10, 18, 0.98) 0%, rgba(8, 18, 30, 0.98) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dynamic-summary-card[hidden] { display: none; }

.dynamic-summary-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(52px, calc(40px + env(safe-area-inset-top))) 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.dynamic-summary-title {
  font-size: 15px;
  font-weight: 840;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.78);
  text-transform: none;
}

/* 正文区：默认完整展示（短文本不折叠） */
.dynamic-summary-body {
  flex: 1;
  min-height: 0;
  padding: 22px 24px 10px;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* 折叠态：截断 + 渐隐遮罩，不可滚动 */
.dynamic-summary-body.is-collapsed {
  overflow: hidden;
  max-height: 52vh;
  -webkit-mask-image: linear-gradient(to bottom, black 52%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 52%, transparent 100%);
}

/* 展开态：取消截断，恢复滚动 */
.dynamic-summary-body.is-expanded {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}

/* 展开/收起按钮：固定在卡片底部 */
.dynamic-summary-expand-btn {
  flex-shrink: 0;
  width: 100%;
  padding: 13px 20px;
  padding-bottom: max(13px, calc(10px + env(safe-area-inset-bottom)));
  background: rgba(4, 10, 18, 0.95);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.52);
  font-size: 13.5px;
  font-weight: 720;
  letter-spacing: 0.5px;
  text-align: center;
  cursor: pointer;
  transition: color 140ms ease;
}
.dynamic-summary-expand-btn[hidden] { display: none; }
.dynamic-summary-expand-btn:active { color: rgba(255, 255, 255, 0.88); }

.dynamic-slide-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(132px + env(safe-area-inset-bottom));
  z-index: 1;
  display: grid;
  gap: 5px;
}

.dynamic-actions {
  position: absolute;
  right: 10px;
  top: 44%;
  z-index: 2;
  display: grid;
  gap: 14px;
  transform: translateY(-50%);
}

.dynamic-actions button {
  width: 50px;
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.dynamic-actions span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(12px) saturate(140%);
  font-size: 24px;
  font-weight: 840;
}

.dynamic-actions small {
  font-size: 12px;
  font-weight: 760;
}

.dynamic-slide-copy strong {
  font-size: 22px;
  font-weight: 880;
}

.dynamic-slide-copy span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 720;
}

.add-dynamic-dialog {
  width: min(88vw, 360px);
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
}

.add-dynamic-dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

.add-dynamic-dialog[open] {
  animation: dialog-fade-in 260ms ease both;
}

.add-dynamic-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(28, 33, 42, 0.78);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px) saturate(150%);
}

.add-dynamic-panel strong {
  font-size: 22px;
  font-weight: 880;
}

.add-dynamic-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  font-weight: 680;
  line-height: 1.42;
}

.add-dynamic-panel textarea {
  min-height: 112px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 12px;
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
}

.add-dynamic-panel textarea::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.local-media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.local-media-actions button {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.95);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  font-size: 13px;
  font-weight: 820;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.local-media-actions button:active {
  transform: scale(0.97);
}

.add-dynamic-panel > button:last-child {
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #07131d;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 850;
}

.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.14);
  font-size: 22px;
}

.comment-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  background: rgba(0, 0, 0, 0.18);
}

.comment-sheet[hidden] {
  display: none;
}

.comment-panel {
  width: min(100%, 430px);
  max-height: 68dvh;
  margin: 0 auto;
  padding: 10px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(30, 35, 43, 0.96);
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.34);
  animation: sheet-rise 220ms ease both;
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.comment-panel strong {
  display: block;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 860;
}

.comment-list {
  display: grid;
  gap: 16px;
}

.comment-list p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 680;
}

.comment-list span {
  color: rgba(255, 255, 255, 0.44);
  margin-right: 8px;
}

.comment-input {
  display: block;
  margin-top: 18px;
}

.comment-input input {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: 0;
  font: inherit;
}

.square-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 18px 10px;
}

.square-module {
  min-width: 0;
}

.square-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.square-module h2 {
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  font-weight: 860;
}

.add-square-button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 22px rgba(0, 0, 0, 0.16);
  font-size: 23px;
  line-height: 1;
  backdrop-filter: blur(18px) saturate(160%);
}

.square-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: block;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 36px rgba(0, 0, 0, 0.18);
}

.square-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.square-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
}

.square-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 15px;
  font-weight: 820;
}

.square-detail {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: max(30px, env(safe-area-inset-top)) 22px max(30px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px) saturate(130%);
}

.square-detail[hidden] {
  display: none;
}

.square-stage {
  width: min(86vw, 370px);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 28px;
  overflow: hidden;
  background: #05090f;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  touch-action: pan-x;
}

.square-slide {
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0;
  color: #fff;
}

.square-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.square-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.square-slide-copy {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 62px;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.square-slide-copy strong {
  font-size: 21px;
  font-weight: 880;
}

.square-slide-copy span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.34;
}

.respond-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #07131d;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 860;
}

.respond-dialog {
  width: min(88vw, 360px);
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
}

.respond-dialog::backdrop {
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

.respond-dialog[open] {
  animation: dialog-fade-in 260ms ease both;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 12px 4px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 700;
}
.app-footer img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.app-footer-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.4;
}
.app-footer-text em {
  font-style: normal;
}

.module-menu-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.module-menu-dialog::backdrop,
.report-dialog::backdrop {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.module-menu-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: rgba(28, 33, 42, 0.84);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(24px) saturate(150%);
}

.module-menu-panel {
  grid-template-columns: repeat(3, 84px);
}

.report-dialog {
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
}

.module-menu-panel button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  color: #07131d;
  background: rgba(255, 255, 255, 0.88);
  font-weight: 820;
}

.module-menu-panel .danger,
.person-action-panel .danger {
  color: #fff;
  background: rgba(255, 69, 58, 0.86);
}

.bind-account-dialog {
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
}

.bind-account-dialog::backdrop {
  background: rgba(4, 9, 16, 0.42);
  backdrop-filter: blur(10px);
}

.bind-account-dialog[open] {
  animation: dialog-fade-in 220ms ease both;
}

.bind-account-panel {
  position: relative;
  width: min(340px, calc(100vw - 34px));
  display: grid;
  gap: 13px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 24px 62px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(26px) saturate(150%);
}

.bind-account-panel strong {
  font-size: 19px;
  font-weight: 880;
}

.bind-account-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.bind-account-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.account-form {
  display: grid;
  gap: 10px;
}

.account-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  outline: 0;
  padding: 0 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  font: inherit;
  font-size: 14px;
  font-weight: 720;
}

.account-form input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.bind-account-options button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 14px;
  font-weight: 820;
}

.bind-account-options button:disabled {
  opacity: 0.48;
}

/* ── 账号安全聚合弹窗 ─────────────────────────────────────────────── */
.account-security-dialog {
  width: min(360px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  box-sizing: border-box;
  margin: auto;
  border: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: transparent;
  color: #fff;
}
.account-security-dialog::backdrop {
  background: rgba(4, 9, 16, 0.5);
  backdrop-filter: blur(14px);
}
.account-security-dialog[open] {
  animation: dialog-fade-in 220ms ease both;
}

.account-security-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  gap: 16px;
  padding: 22px 20px 20px;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 32px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(32px) saturate(160%);
}

.account-security-panel *,
.account-security-panel *::before,
.account-security-panel *::after {
  box-sizing: border-box;
}

.account-security-panel > * {
  min-width: 0;
  max-width: 100%;
}

/* 顶部：头像 + 名字 + 二维码 + 关闭 */
.account-security-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-mini-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: transform 120ms ease;
}
.account-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.account-mini-avatar:active { transform: scale(0.92); }

.account-security-name {
  flex: 1;
  font-size: 15px;
  font-weight: 780;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-qr-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 120ms ease;
}
.account-qr-btn:active { transform: scale(0.92); }
.account-qr-btn[hidden] { display: none; }

.account-security-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65);
  font-size: 19px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 1;
  transition: transform 120ms ease;
}
.account-security-close:active { transform: scale(0.92); }

.account-security-status {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 650;
  overflow-wrap: anywhere;
}

/* 新爱号 / 已绑定手机号 / 邮箱 + 密码：单一输入框自动识别 */
.account-credential-form {
  display: grid;
  gap: 10px;
  width: 100%;
}
.account-credential-form[hidden] { display: none; }

.account-credential-field {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 780;
}
.account-credential-field > input,
.account-password-wrap {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.13);
}
.account-credential-field > input,
.account-password-wrap input {
  padding: 10px 12px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 720;
  outline: 0;
}
.account-credential-field > input {
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.account-credential-field > input::placeholder,
.account-password-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.account-credential-field > input:focus,
.account-password-wrap:focus-within {
  border-color: rgba(134, 255, 188, 0.68);
  box-shadow: 0 0 0 3px rgba(86, 232, 151, 0.12);
}
.account-password-wrap {
  display: flex;
  align-items: center;
  overflow: hidden;
}
.account-password-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
}
.account-password-wrap button {
  align-self: stretch;
  flex: 0 0 auto;
  width: 48px;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
}
.account-password-visibility svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-password-visibility[aria-pressed="false"] .password-eye-closed,
.account-password-visibility[aria-pressed="true"] .password-eye-open {
  display: none;
}
.account-password-visibility:active {
  color: #baff9f;
  background: rgba(116, 255, 82, 0.1);
}

.account-credential-submit {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(134, 255, 188, 0.72);
  border-radius: 14px;
  color: #06140d;
  background: linear-gradient(135deg, rgba(141, 255, 190, 0.96), rgba(73, 216, 140, 0.86));
  box-shadow: 0 10px 28px rgba(79, 220, 144, 0.22);
  font-size: 14px;
  font-weight: 860;
}
.account-credential-submit:disabled { opacity: .55; cursor: wait; }

.account-credential-rule {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.45;
}

.account-auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}
.account-auth-divider::before,
.account-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.account-auth-divider[hidden] { display: none; }

.account-signed-in-tools {
  display: grid;
  gap: 12px;
}
.account-signed-in-tools[hidden] { display: none; }

.account-password-change-toggle {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(190, 255, 170, 0.32);
  border-radius: 14px;
  color: rgba(248, 255, 245, 0.94);
  background: rgba(116, 255, 82, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 820;
}
.account-password-change-toggle > span:last-child {
  color: #baff9f;
  font-size: 22px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}
.account-password-change-toggle[aria-expanded="true"] > span:last-child {
  transform: rotate(90deg);
}

.account-password-change-form {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.12);
}
.account-password-change-form[hidden] { display: none; }
.account-password-change-form label {
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 720;
}
.account-password-change-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  outline: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 13px;
}
.account-password-change-form input:focus {
  border-color: rgba(134, 255, 188, 0.62);
}
.account-password-change-form > button {
  min-height: 42px;
  border: 1px solid rgba(134, 255, 188, 0.62);
  border-radius: 12px;
  color: #071006;
  background: linear-gradient(135deg, #baff9f, #74ff52);
  font-size: 12px;
  font-weight: 850;
}
.account-password-change-form > button:disabled { opacity: .55; }
.account-password-change-form p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.45;
}
.account-password-change-form p[data-kind="error"] { color: #ff9aa6; }
.account-password-change-form p[data-kind="success"] { color: #86f6ae; }

.account-bind-section {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}
.account-bind-heading {
  display: grid;
  gap: 3px;
}
.account-bind-heading strong {
  color: rgba(248, 255, 245, 0.96);
  font-size: 13px;
}
.account-bind-heading span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}
.account-bind-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.account-bind-btn {
  min-width: 0;
  padding: 11px 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  justify-items: center;
  gap: 5px;
}
.account-bind-btn img,
.account-bind-phone-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}
.account-bind-btn img { object-fit: cover; }
.account-bind-phone-icon {
  color: #d9ffca;
  background: rgba(116, 255, 82, 0.13);
  display: grid;
  place-items: center;
}
.account-bind-phone-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-bind-btn > span:not(.account-bind-phone-icon) {
  font-size: 11px;
  font-weight: 800;
}
.account-bind-btn small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
}
.account-bind-btn.is-linked {
  border-color: rgba(116, 255, 82, 0.52);
  background: rgba(116, 255, 82, 0.12);
  box-shadow: 0 8px 22px rgba(64, 214, 96, 0.1);
}
.account-bind-btn.is-linked small { color: #9bf7b5; }
.account-bind-btn:active { transform: scale(.96); }

/* 三个备用授权渠道：并排三格 */
.account-auth-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.account-channel-btn {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px 6px 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  transition: background 140ms ease, transform 120ms ease;
}
.account-channel-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.2);
}

.account-channel-btn.is-linked {
  border-color: rgba(76, 217, 132, 0.62);
  background: rgba(76, 217, 132, 0.18);
  box-shadow: 0 0 0 1px rgba(76, 217, 132, 0.18), 0 10px 26px rgba(76, 217, 132, 0.12);
}

.account-channel-img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
}

.account-channel-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 24px;
}

/* 邮箱输入框（折叠/展开） */
.account-email-form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.account-email-form[hidden] { display: none; }

.account-email-form input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  outline: 0;
}
.account-email-form input::placeholder { color: rgba(255, 255, 255, 0.4); }
.account-email-form input:focus { border-color: rgba(255, 255, 255, 0.45); }

.account-email-submit {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
  transition: transform 120ms ease;
}
.account-email-submit:active { transform: scale(0.96); }
.account-email-submit:disabled { opacity: .5; cursor: not-allowed; }

#accountEmailCodeInput {
  letter-spacing: 6px;
  font-size: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.account-email-hint { margin: 2px 0 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.account-email-hint[data-kind="error"] { color: #ff98a4; }
.account-email-hint[data-kind="success"] { color: #86f6ae; }
.account-email-hint[data-kind="info"] { color: rgba(255, 255, 255, .68); }

/* 底部操作：登录/退出登录 | 通行密钥登录 */
.account-security-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.account-footer-btn {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  font-weight: 820;
  transition: background 140ms ease, transform 120ms ease;
}
.account-footer-btn:active { transform: scale(0.97); }
.account-footer-btn.is-active {
  color: #06140d;
  border-color: rgba(134, 255, 188, 0.72);
  background: linear-gradient(135deg, rgba(141, 255, 190, 0.96), rgba(73, 216, 140, 0.86));
  box-shadow: 0 10px 28px rgba(79, 220, 144, 0.22);
}

.account-footer-btn.danger {
  color: #ffd9df;
  border-color: rgba(255, 92, 110, 0.28);
  background: rgba(255, 92, 110, 0.1);
}

.account-policy-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.account-policy-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dynamic-area,
.square-module {
  transition: width 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.dynamic-area.module-size-large {
  width: 100%;
}

.dynamic-area.module-size-small {
  width: calc(50% - 24px);
  min-width: 0;
  margin-left: 18px;
  padding-left: 0;
  padding-right: 0;
}

.square-module.module-size-small {
  grid-column: auto;
}

.square-module.module-size-large {
  grid-column: 1 / -1;
}

@keyframes dialog-fade-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes sheet-rise {
  from {
    transform: translateY(34px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes recording-pulse {
  0%, 100% {
    filter: blur(2px) brightness(1);
  }
  50% {
    filter: blur(3px) brightness(1.22);
  }
}

@keyframes digital-human-speaking {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-2px) scale(1.045);
    filter: brightness(1.16);
  }
}

/* ============================================================
 * UI 修订 v3 (2026-06-27 15:46) — 用户三条需求
 *   1)「设置」卡固定在主页"小心"左侧、保持原状不联动
 *   2) contact-rail 不透明、与下方一体的深色背景
 *   3) 聊天文字/语音输入固定屏幕底部；聊天区填满 rail 与 composer 之间
 * ========================================================== */

/* 1-a 设置卡永远显示在 rail 最左（flex order，无论 JS 怎么重排都生效） */
.contact-rail .contact-card.system-settings,
.contact-rail .contact-card[data-role="digital-human"] {
  order: -100;
}

/* 1-b [UI修订 v8 2026-06-27] 撤回 v3 的"锁死"规则。
 *   原因：v3 给设置卡加了 scroll-snap-align: none + scroll-snap-stop: normal +
 *   transform: none + transition: none，导致横滑过不去、无法进入 active 状态。
 *   现在让它跟其他卡一样响应滑动吸附和选中动画；仅保留 1-a 的 order: -100
 *   维持视觉在最左。
 */

/* 2  rail 整体不透明、与下方页面同调（不透出 body 渐变变化感） */
.contact-rail,
.contact-rail.is-sticky {
  background:
    radial-gradient(ellipse 520px 220px at 18% 0%, rgba(27, 111, 98, 0.50), transparent 70%),
    radial-gradient(ellipse 460px 200px at 84% 0%, rgba(190, 116, 18, 0.42), transparent 60%),
    linear-gradient(180deg, #061522 0%, #0a1428 60%, #0d1626 100%) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 3  composer 已是 .app-frame 的兄弟 + fixed bottom:0；
 *    .app-frame padding-bottom 和 chat-area 强制高度规则已撤回，
 *    不要再改 .app-frame 自身布局（避免破坏原始 composer 锁底）。
 *    chat-area 高度由原始 max-height: calc(100vh-136-132-safe-area) 控制。 */

/* ============================================================
 * UI 修订 v4 (2026-06-27 15:55) — 进一步修正两条
 *   1) rail 背景与 body 完全同款复合渐变 + background-attachment:fixed
 *      rail 等同"开窗"，透出 body 同位置真实背景片段，无缝一体
 *   2) composer-area 强制固定屏幕底部、不随滚动
 * ============================================================ */

/* 1 contact-rail 用 body 完全相同的复合背景，并锁定到视口 */
.contact-rail,
.contact-rail.is-sticky {
  background:
    radial-gradient(circle at 18% 20%, rgba(27, 111, 98, 0.84), transparent 28rem),
    radial-gradient(circle at 84% 24%, rgba(190, 116, 18, 0.92), transparent 22rem),
    radial-gradient(circle at 52% 58%, rgba(34, 59, 168, 0.9), transparent 26rem),
    linear-gradient(145deg, #061522 0%, #0d1428 58%, #2c1905 100%) !important;
  background-attachment: fixed !important;
  background-size: 100vw 100vh, 100vw 100vh, 100vw 100vh, 100vw 100vh !important;
  background-position: 0 0 !important;
  background-repeat: no-repeat !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 2 composer-area 强制锁屏幕底部，挡 JS 注入 transform/top */
.composer-area {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  z-index: 1000 !important;
  width: min(100%, 430px) !important;
}
.composer-area[style*="translateY"],
.composer-area[style*="top:"],
.composer-area[style*="bottom:"] {
  transform: translateX(-50%) !important;
  top: auto !important;
  bottom: 0 !important;
}

/* ============================================================
 * UI 修订 v5 (2026-06-27 16:00) — 两条再修
 *   1) rail 改半透明叠层 + 下边缘渐隐，软化与下方的衔接
 *      （之前 background-attachment:fixed 被 .app-frame 的
 *       will-change:transform 劫持失效，必须改打法）
 *   2) composer 加可见底蒙 + 强制 inset + 拦截 inline style 注入
 * ============================================================ */

/* 1 rail 半透明叠层，让 body 真实背景透出 + 下沿渐隐过渡 */
.contact-rail,
.contact-rail.is-sticky {
  background: linear-gradient(
    180deg,
    rgba(6, 21, 34, 0.42) 0%,
    rgba(6, 21, 34, 0.32) 55%,
    rgba(6, 21, 34, 0.14) 88%,
    rgba(6, 21, 34, 0) 100%
  ) !important;
  background-attachment: scroll !important;
  backdrop-filter: blur(10px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(115%) !important;
  border: 0 !important;
  box-shadow: none !important;
  /* 让 rail 自身也有遮罩渐隐效果，下沿完全透到下方背景 */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, rgba(0,0,0,0.85) 92%, rgba(0,0,0,0.55) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 78%, rgba(0,0,0,0.85) 92%, rgba(0,0,0,0.55) 100%);
}

/* 2 composer 强制固定 + 可见底蒙 + 防 inline style 注入 */
.composer-area {
  position: fixed !important;
  inset: auto 0 0 0 !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 0 !important;
  transform: translate3d(-50%, 0, 0) !important;
  z-index: 9999 !important;
  width: min(100%, 430px) !important;
  contain: layout style;
}
/* composer 底部加一层可见的深色渐变蒙层，让用户看清楚它确实固定在底部 */
.composer-area::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(6, 21, 34, 0) 0%,
    rgba(6, 21, 34, 0.42) 40%,
    rgba(6, 21, 34, 0.72) 70%,
    rgba(6, 21, 34, 0.88) 100%
  );
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}
/* 拦截 app.js 任何对 composer-area 的 inline style 注入 */
.composer-area[style] {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 0 !important;
  transform: translate3d(-50%, 0, 0) !important;
  z-index: 9999 !important;
}

/* ============================================================
 * UI 修订 v6 (2026-06-27 16:04) — rail 上下都软衔接
 *   把 mask 改成上下对称渐隐，背景叠层同步两头淡
 * ============================================================ */
.contact-rail,
.contact-rail.is-sticky {
  background: linear-gradient(
    180deg,
    rgba(6, 21, 34, 0) 0%,
    rgba(6, 21, 34, 0.20) 12%,
    rgba(6, 21, 34, 0.34) 48%,
    rgba(6, 21, 34, 0.20) 86%,
    rgba(6, 21, 34, 0) 100%
  ) !important;
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0,0,0,0.40) 0%,
    rgba(0,0,0,0.80) 12%,
    #000 26%,
    #000 74%,
    rgba(0,0,0,0.80) 88%,
    rgba(0,0,0,0.40) 100%
  ) !important;
  mask-image: linear-gradient(
    180deg,
    rgba(0,0,0,0.40) 0%,
    rgba(0,0,0,0.80) 12%,
    #000 26%,
    #000 74%,
    rgba(0,0,0,0.80) 88%,
    rgba(0,0,0,0.40) 100%
  ) !important;
}

/* 公开资料页的屏蔽与永久删除收进头像旁的小红菜单。 */
.profile-public-card.is-readonly .partner-actions {
  position: relative;
  z-index: 18;
  flex: 0 0 auto;
}
.profile-public-card.is-readonly .partner-action-menu-trigger {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0 0 6px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(220, 56, 63, .94);
  box-shadow: 0 7px 18px rgba(151, 14, 27, .28), inset 0 1px rgba(255, 255, 255, .2);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  line-height: 1;
}
.profile-public-card.is-readonly .partner-action-menu-trigger:active {
  transform: scale(0.96);
}
.profile-public-card.is-readonly .partner-action-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  left: 0;
  width: 152px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(17, 23, 29, .96);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.profile-public-card.is-readonly .partner-action-popover[hidden] { display: none; }
.profile-public-card.is-readonly .partner-action-btn {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  color: rgba(248, 252, 255, .92);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.profile-public-card.is-readonly .partner-action-btn:active { background: rgba(255, 255, 255, .08); }
.profile-public-card.is-readonly .partner-action-btn:disabled {
  color: rgba(248, 252, 255, .46);
  cursor: default;
}
.profile-public-card.is-readonly .partner-action-btn.is-active { color: #9dc1ff; }
.profile-public-card.is-readonly .partner-action-btn.danger {
  color: #ff8087;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ============================================================
   v15 全局滚动统一规范（2026-06-28）
   背景：旧版 .app-frame { touch-action: none } 禁用所有原生
   触摸滚动，导致每个新加内容区都得单独 pan-y。
   修复：把 app-frame 改为 pan-y 作为"整体遮罩"——内部任何
   区域默认允许纵向触摸滑动（systemInlinePage / profile-public-
   card / profile-section-body / dynamic-area / inline-system-
   card 等一次性全部生效）。
   横向手势组件（.contact-row 左滑、消息泡内手势）通过自身
   touch-action 覆盖，不受影响。
   ============================================================ */
.app-frame {
  touch-action: pan-y;
}

/* 长主页会在语音转写、灯火状态同步时局部重绘；关闭浏览器滚动锚定，
   避免内容高度变化替用户改动纵向位置。 */
body.profile-page .app-frame,
body.heartlink-native-mode .app-frame {
  overflow-anchor: none;
}


/* ============================================================
   v16 联系人页面优化（2026-06-28）
   1) 联系人列表保持在聊天消息区之后的正常布局流中，系统消息增高时
      列表自然下移，避免导入完成提示覆盖联系人。
   2) 联系人列表苹果二级页面磨砂半透明：移除 contact-row 几乎透明的
      hit-test 底色，改为统一磨砂卡片背景，与搜索结果列表样式一致。
   ============================================================ */
body.phone-directory-page .chat-area {
  min-height: 96px;
  padding: 8px 18px 10px;
  margin-bottom: 8px;
  align-content: end;
}
body.phone-directory-page .contacts-page {
  transform: none;
}
body.phone-directory-page .contacts-list {
  padding-bottom: calc(116px + env(safe-area-inset-bottom));
  gap: 10px;
}
body.phone-directory-page .contact-row {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: 14px;
  padding: 12px 14px;
}
body.phone-directory-page .contact-row:active {
  background: rgba(255, 255, 255, 0.18);
}
body.phone-directory-page .contact-row-wrap {
  border-radius: 14px;
}


.profile-private-hint {
  margin: -2px 0 4px;
  color: rgba(63, 74, 86, 0.68);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}


.system-avatar-dialog {
  width: min(92vw, 380px);
  border: 0;
  padding: 0;
  border-radius: 22px;
  background: transparent;
}
.system-avatar-dialog::backdrop {
  background: rgba(4, 9, 16, 0.48);
  backdrop-filter: blur(12px);
}
.system-avatar-dialog[open] {
  animation: dialog-fade-in 220ms ease both;
}
.system-avatar-panel {
  position: relative;
  display: grid;
  gap: 16px;
  max-height: min(74vh, 620px);
  padding: 22px 18px 18px;
  overflow: hidden;
  color: #fff;
  background: rgba(9, 18, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}
.system-avatar-panel strong {
  font-size: 18px;
  font-weight: 880;
}
.system-avatar-content {
  display: grid;
  gap: 16px;
  overflow-y: auto;
  padding-right: 2px;
}
.system-avatar-section {
  display: grid;
  gap: 10px;
}
.system-avatar-section h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 820;
}
.system-avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.system-avatar-option {
  aspect-ratio: 1;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.system-avatar-option img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.system-avatar-option.is-selected {
  border-color: rgba(98, 216, 160, 0.96);
  background: rgba(98, 216, 160, 0.18);
}
.system-avatar-option:active {
  transform: scale(0.94);
}

/* ════════════════════════════════════════════════════════════════
   [v18 combo1] 智能体卡片：方形头像 + 右下角 AI 角标
   markAiEntryCards() 在 JS 中给智能体 .contact-card 加 .ai-entry class
   ════════════════════════════════════════════════════════════════ */
.contact-card.ai-entry { position: relative; }
.contact-card.ai-entry .contact-row-avatar,
.contact-card.ai-entry img.contact-row-avatar,
.contact-card.ai-entry > img,
.contact-card.ai-entry .group-avatar-grid {
  border-radius: 12px !important;
}
.contact-card.ai-entry::after {
  content: "AI";
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #18a058, #0d2a24);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  line-height: 1.15;
  letter-spacing: 0.4px;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* ════════════════════════════════════════════════════════════════
   [v18 combo1] 创建话题 / 添加成员 picker：半透明磨砂风格
   与通讯录联系人列表视觉统一
   ════════════════════════════════════════════════════════════════ */
.create-topic-page,
dialog.create-topic-page {
  background: rgba(16, 32, 48, 0.68) !important;
  backdrop-filter: blur(28px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(170%) !important;
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  border-radius: 22px !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 24px 60px rgba(0, 0, 0, 0.38);
}
.create-topic-page::backdrop,
dialog.create-topic-page::backdrop {
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* 输入区：去掉容器边框/背景，只保留内容间距，避免"盒中盒"双框感 */
.create-topic-page .create-topic-input {
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  margin: 6px 14px 14px;
  padding: 12px 16px;
}
.create-topic-page input[type="text"],
.create-topic-page input:not([type]) {
  background: transparent;
  border: none;
  color: #fff;
}
.create-topic-page .contact-row-avatar {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
/* 行 active 与通讯录行一致 */
.create-topic-page .topic-contact-row:active {
  background: rgba(255, 255, 255, 0.10);
}
/* 标签页按钮和通讯录标签视觉统一 */
.create-topic-page .contacts-tab {
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.70);
}
.create-topic-page .contacts-tab.is-active {
  background: rgba(255, 255, 255, 0.90);
  color: #07131d;
  border-color: transparent;
}
/* iOS Safari：用 svh（小视口高度）解决地址栏遮挡列表问题 */
@supports (-webkit-touch-callout: none) {
  .create-topic-page {
    height: clamp(500px, calc(100svh - 64px), 640px);
    max-height: min(640px, calc(100svh - 64px));
  }
}

/* ════════════════════════════════════════════════════════════════
   [v18 combo1] 头像本地上传入口样式
   ════════════════════════════════════════════════════════════════ */
.system-avatar-option.upload-avatar-option {
  aspect-ratio: 1 / 1;
  min-height: 64px;
  transition: background 160ms ease, border-color 160ms ease;
}
.system-avatar-option.upload-avatar-option:hover,
.system-avatar-option.upload-avatar-option:focus-visible {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  outline: none;
}

.chat-message.outgoing .chat-bubble-wrap {
  flex: 0 1 auto;
  max-width: 82%;
}

.chat-text-block,
.voice-text-block {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  backdrop-filter: blur(20px) saturate(140%);
}

.chat-message.incoming .chat-text-block,
.chat-message.incoming .voice-text-block {
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
  backdrop-filter: none;
}

.chat-message.outgoing .chat-text-block,
.chat-message.outgoing .voice-text-block {
  background: rgba(255, 255, 255, 0.34);
}

.chat-text-block .chat-bubble-text,
.voice-text-block .voice-bubble-text {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.94);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.chat-text-block .chat-bubble-text {
  font-size: 15px;
  font-weight: 680;
  line-height: 1.36;
}

.chat-text-block.is-collapsible:not(.is-expanded) .chat-bubble-text,
.voice-text-block.is-collapsible:not(.is-expanded) .voice-bubble-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-text-block.is-expanded .chat-bubble-text,
.voice-text-block.is-expanded .voice-bubble-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* chatfold4: 单层宽气泡。外层是真气泡，内层 p 只承载文字和内联折叠符号。 */
.chat-bubble-wrap.chat-text-block,
.voice-message-wrap .voice-text-block {
  position: relative;
  display: block;
  width: auto;
  max-width: calc(100% - 18px);
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: none;
}

.chat-message.incoming .chat-bubble-wrap.chat-text-block,
.chat-message.incoming .voice-message-wrap .voice-text-block {
  max-width: calc(100% - 43px);
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
  backdrop-filter: none;
}

.chat-message.outgoing .chat-bubble-wrap.chat-text-block,
.chat-message.outgoing .voice-message-wrap .voice-text-block {
  max-width: 94%;
  background: rgba(255, 255, 255, 0.34);
}

.chat-text-block .chat-bubble-text,
.voice-text-block .voice-bubble-text,
.chat-text-block.is-collapsible .chat-bubble-text,
.voice-text-block.is-collapsible .voice-bubble-text,
.chat-text-block.is-collapsible:not(.is-expanded) .chat-bubble-text,
.voice-text-block.is-collapsible:not(.is-expanded) .voice-bubble-text,
.chat-text-block.is-expanded .chat-bubble-text,
.voice-text-block.is-expanded .voice-bubble-text {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  backdrop-filter: none;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}

.chat-text-block .chat-bubble-text {
  font-size: 15px;
  font-weight: 680;
  line-height: 1.36;
}

.voice-text-block .voice-bubble-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.bubble-collapse-toggle {
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0 0 0 2px;
  padding: 0 1px;
  border: 0;
  border-radius: 0;
  color: #009dff;
  background: transparent;
  display: inline-grid;
  vertical-align: -1px;
  place-items: center;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  box-shadow: none;
  backdrop-filter: none;
}

.bubble-collapse-toggle span {
  display: inline-block;
  transform: rotate(90deg);
  transform-origin: center;
}

.bubble-collapse-toggle.is-expanded span {
  transform: rotate(-90deg);
}


/* summaryflow1: two-step chat summary message and save-to-moments card */
.summary-text-message .chat-bubble-wrap {
  max-width: min(86%, 360px);
}

.summary-save-card-message {
  justify-content: flex-start;
}

.summary-save-card {
  width: min(86%, 340px);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #12202c;
  box-shadow: 0 8px 22px rgba(10, 24, 38, 0.16);
  backdrop-filter: blur(14px);
}

.summary-save-card-title {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 780;
}

.summary-save-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.summary-save-actions button {
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 760;
  color: #fff;
  background: #1976d2;
}

.summary-save-actions button[data-summary-save-action="no"] {
  color: #22313f;
  background: rgba(34, 49, 63, 0.1);
}

.summary-save-status {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(18, 32, 44, 0.62);
}

.add-dynamic-panel textarea.is-summary-locked {
  min-height: 220px;
  max-height: none;
  overflow: hidden;
  resize: none;
  background: rgba(255, 255, 255, 0.82);
  color: #172536;
}

/* ��─ 二维码分享模块 ──────────────────────────────────────────────── */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 20px;
}
.qr-poster {
  background: linear-gradient(168deg, #0f2535 0%, #07131d 100%);
  border-radius: 28px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.qr-poster-title {
  font-size: 17px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.3;
}
.qr-code-wrapper {
  width: 220px;
  height: 220px;
  background: #ffffff;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.qr-code-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.qr-code-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #888;
}
.qr-poster-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin-bottom: 6px;
}
.qr-poster-branding {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.qr-poster-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}
.qr-poster-actions button {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
  transition: background 0.18s;
}
.qr-poster-actions button:active { background: rgba(255,255,255,0.2); }
.qr-poster-actions button:first-child { background: rgba(255,255,255,0.9); color: #07131d; }
.qr-poster-actions button:first-child:active { background: rgba(255,255,255,0.75); }
.qr-close-btn { background: transparent !important; color: rgba(255,255,255,0.5) !important; flex: 0 0 auto !important; width: 42px; padding: 0 !important; }
nt { margin: 2px 0 0; font-size: 13px; line-height: 1.4; }
.account-email-hint[data-kind="error"] { color: #dc2626; }
.account-email-hint[data-kind="success"] { color: #16a34a; }
.account-email-hint[data-kind="info"] { color: #6b7280; }
.account-email-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ��─ 二维码分享模块 ──────────────────────────────────────────────── */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 20px;
}
.qr-poster {
  background: linear-gradient(168deg, #0f2535 0%, #07131d 100%);
  border-radius: 28px;
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.qr-poster-title {
  font-size: 17px;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.3;
}
.qr-code-wrapper {
  width: 220px;
  height: 220px;
  background: #ffffff;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.qr-code-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.qr-code-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #888;
}
.qr-poster-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  margin-bottom: 6px;
}
.qr-poster-branding {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.qr-poster-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}
.qr-poster-actions button {
  flex: 1;
  height: 42px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
  transition: background 0.18s;
}
.qr-poster-actions button:active { background: rgba(255,255,255,0.2); }
.qr-poster-actions button:first-child { background: rgba(255,255,255,0.9); color: #07131d; }
.qr-poster-actions button:first-child:active { background: rgba(255,255,255,0.75); }
.qr-close-btn { background: transparent !important; color: rgba(255,255,255,0.5) !important; flex: 0 0 auto !important; width: 42px; padding: 0 !important; }


/* ════ 页面模板底部安全空白：避免固定语音输入按钮遮挡最后内容 ════ */
:root {
  --page-bottom-safe-space: calc(132px + env(safe-area-inset-bottom));
}

/* 所有无页脚页面及以后新增页面自动继承；滑到底时按钮只会覆盖这段空白。 */
body:not(.has-app-footer) .app-frame::after {
  content: "";
  display: block;
  width: 100%;
  height: var(--page-bottom-safe-space);
  min-height: var(--page-bottom-safe-space);
  pointer-events: none;
}

/* 小心主页保留公司页脚，由页脚自身承担同等安全距离。 */
.app-frame .app-footer {
  padding-bottom: calc(130px + env(safe-area-inset-bottom)) !important;
}


/* 后台系统公告弹窗 */
.admin-announcement-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-announcement-card {
  width: min(360px, 92vw);
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: rgba(8, 24, 36, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.admin-announcement-card strong {
  font-size: 20px;
  font-weight: 900;
}

.admin-announcement-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.admin-announcement-card button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe27a, #f59e0b);
  color: #301900;
  font-size: 15px;
  font-weight: 900;
}

/* ============================================================
 * 官网主页 · Kling 风格黑绿视觉系统（2026-07-17）
 * 保留原有布局与交互，仅统一背景、容器、按钮、图标和边界亮度。
 * ============================================================ */
html,
body {
  background-color: var(--page);
}

body,
body::before,
.app-frame {
  background:
    radial-gradient(circle at 48% 13%, rgba(116, 255, 82, 0.075), transparent 29rem),
    radial-gradient(circle at 6% 68%, rgba(68, 199, 156, 0.055), transparent 26rem),
    linear-gradient(180deg, #0b0d0c 0%, #060807 56%, #030403 100%) !important;
  background-size: 100vw 100dvh, 100vw 100dvh, 100vw 100dvh !important;
  background-repeat: no-repeat !important;
}

body,
body::before {
  background-attachment: fixed !important;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(116, 255, 82, 0.9);
  outline-offset: 3px;
}

.contact-rail,
.contact-rail.is-sticky {
  border: 0 !important;
  border-bottom: 1px solid rgba(236, 255, 239, 0.08) !important;
  background: linear-gradient(180deg, rgba(4, 6, 5, 0.99), rgba(7, 10, 8, 0.94) 78%, rgba(5, 7, 6, 0.16)) !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.contact-card {
  color: var(--xin-text-faint);
}

.contact-card img,
.contact-card .group-avatar-grid,
.contact-card .contact-row-avatar {
  border: 1px solid rgba(236, 255, 239, 0.12);
  box-shadow:
    var(--xin-highlight),
    0 12px 28px rgba(0, 0, 0, 0.38);
}

.contact-card.is-active {
  color: var(--xin-accent);
}

.contact-card.is-active img,
.contact-card.is-active .group-avatar-grid,
.contact-card.is-active .contact-row-avatar {
  border-color: rgba(190, 255, 170, 0.68);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.5),
    0 0 22px rgba(116, 255, 82, 0.18),
    0 14px 30px rgba(0, 0, 0, 0.4);
}

.contact-card.ai-entry::after {
  border-color: rgba(236, 255, 239, 0.18);
  background: rgba(5, 8, 6, 0.88);
  color: var(--xin-text-soft);
}

.contact-card.is-active.ai-entry::after {
  border-color: rgba(116, 255, 82, 0.46);
  color: var(--xin-accent);
}

.contact-card.system-shortcut img {
  border-color: rgba(236, 255, 239, 0.12);
  background: var(--xin-surface-soft);
}

.clear-all-button,
.toolbar-scroll-btn,
.add-member-button,
.end-topic-toolbar-button,
.bottom-icon-button,
.dialog-close {
  border-color: rgba(116, 255, 82, 0.25);
  background: var(--xin-surface-soft);
  color: var(--xin-accent);
  box-shadow: var(--xin-highlight), 0 10px 24px rgba(0, 0, 0, 0.32);
}

.home-login-button,
.home-login-button.is-logged-in {
  border-color: rgba(190, 255, 170, 0.7);
  background: linear-gradient(135deg, #a9ff88, #74ff52 56%, #4cda35);
  box-shadow: 0 10px 26px rgba(81, 220, 58, 0.22), inset 0 1px rgba(255, 255, 255, 0.48);
  color: #071006;
}

.message-card,
.inline-system-card,
.account-status-card,
.app-shortcut-item,
.home-shorts-root,
.home-shorts-card {
  border-color: rgba(236, 255, 239, 0.1);
  background: var(--xin-surface-soft);
  box-shadow: var(--xin-highlight), 0 18px 46px rgba(0, 0, 0, 0.34);
}

.dynamic-area h2,
.square-module h2 {
  color: #f5f8f5;
  text-shadow: none;
}

.add-dynamic-button,
.add-square-button {
  border-color: rgba(116, 255, 82, 0.38);
  background: rgba(116, 255, 82, 0.075);
  box-shadow: var(--xin-highlight), 0 0 18px rgba(116, 255, 82, 0.1);
  color: var(--xin-accent);
}

.dynamic-card,
.square-card {
  border-color: rgba(236, 255, 239, 0.12);
  background: var(--xin-surface);
  box-shadow: var(--xin-highlight), 0 18px 46px rgba(0, 0, 0, 0.4);
}

.dynamic-card.is-placeholder {
  background:
    radial-gradient(circle at 50% 42%, rgba(116, 255, 82, 0.08), transparent 28%),
    var(--xin-surface);
}

.dynamic-card.is-placeholder::before,
.dynamic-card.has-deferred-video::before,
.dynamic-slide.has-deferred-video::before,
.home-shorts-play span,
.dynamic-actions span {
  border-color: rgba(116, 255, 82, 0.36);
  background: rgba(5, 8, 6, 0.7);
  color: var(--xin-accent);
  box-shadow: 0 0 20px rgba(116, 255, 82, 0.12), 0 12px 28px rgba(0, 0, 0, 0.36);
}

.composer-area::before {
  background: linear-gradient(180deg, rgba(5, 7, 6, 0) 0%, rgba(5, 7, 6, 0.54) 42%, rgba(5, 7, 6, 0.9) 76%, #050706 100%);
}

.bottom-icon-button {
  border-width: 1px;
}

.voice-home-button {
  border: 1px solid rgba(190, 255, 170, 0.68);
  background: transparent;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.5),
    0 0 18px rgba(116, 255, 82, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.2);
  color: var(--xin-accent);
}

.composer-area.is-recording .voice-home-button {
  border-color: #d2ffc5;
  background: linear-gradient(135deg, #c8ffb8, #74ff52 58%, #42cf2d);
  color: #071006;
  box-shadow: 0 0 0 10px rgba(116, 255, 82, 0.12), 0 0 34px rgba(116, 255, 82, 0.46), inset 0 1px rgba(255, 255, 255, 0.55);
}

.record-glow {
  background: radial-gradient(ellipse at 50% 62%, rgba(116, 255, 82, 0.62) 0%, rgba(116, 255, 82, 0.24) 42%, transparent 74%);
}

.text-composer,
.search-toolbar-input-wrap,
.inline-search-box {
  border-color: rgba(116, 255, 82, 0.24);
  background: var(--xin-surface-soft);
  box-shadow: var(--xin-highlight), 0 18px 46px rgba(0, 0, 0, 0.36);
}

#sendTextButton,
.respond-button,
.add-dynamic-panel > button:last-child,
.admin-announcement-card button {
  border: 1px solid rgba(190, 255, 170, 0.68);
  background: linear-gradient(135deg, #a9ff88, #74ff52 56%, #4cda35);
  color: #071006;
}

.add-dynamic-panel,
.admin-announcement-card {
  border-color: rgba(236, 255, 239, 0.12);
  background: var(--xin-surface-soft);
  box-shadow: var(--xin-highlight), 0 28px 80px rgba(0, 0, 0, 0.52);
}

.add-dynamic-panel textarea,
.local-media-actions button {
  border-color: rgba(116, 255, 82, 0.2);
  background: rgba(255, 255, 255, 0.025);
  color: var(--xin-text-soft);
}

.app-footer {
  color: var(--xin-text-faint);
}

/* 设置页紧凑资料区：头像、昵称、新爱号与保存按钮常驻。 */
body.profile-page .system-inline-page {
  padding: 8px 18px 4px;
}

.profile-quick-editor {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(236, 255, 239, 0.1);
  border-radius: 22px;
  background: rgba(8, 12, 9, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 18px 42px rgba(0, 0, 0, 0.3);
}

.profile-avatar-editor {
  position: relative;
  width: 68px;
  height: 68px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(116, 255, 82, 0.34);
  border-radius: 50%;
  background: #080b09;
  box-shadow: 0 0 20px rgba(116, 255, 82, 0.08);
}

.profile-avatar-editor img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-editor span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 4px 2px 5px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 0, 0, 0.72);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.profile-quick-fields {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.profile-quick-field {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(236, 255, 239, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-quick-field > span {
  color: rgba(236, 255, 239, 0.5);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.profile-quick-field input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: #f6fff3;
  background: transparent;
  font-size: 13px;
  font-weight: 760;
}

.profile-quick-field input::placeholder {
  color: rgba(236, 255, 239, 0.26);
}

.profile-identity-rules {
  color: rgba(236, 255, 239, 0.4);
  font-size: 9px;
  line-height: 1.4;
}

.profile-save-button {
  min-width: 0;
  height: 44px;
  padding: 0 7px;
  border: 1px solid rgba(190, 255, 170, 0.48);
  border-radius: 14px;
  color: #071006;
  background: linear-gradient(135deg, #baff9f, #74ff52 58%, #4cda35);
  box-shadow: 0 0 18px rgba(116, 255, 82, 0.12), inset 0 1px rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.profile-save-button:active,
.profile-add-plugin-button:active {
  transform: scale(0.97);
}

.profile-save-button:disabled {
  opacity: 0.72;
}

.profile-primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.profile-primary-actions .profile-section-toggle,
.profile-add-plugin-button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(116, 255, 82, 0.24);
  border-radius: 15px;
  color: rgba(246, 255, 243, 0.94);
  background: linear-gradient(145deg, rgba(24, 31, 26, 0.96), rgba(7, 10, 8, 0.98));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.26);
  font-size: 14px;
  font-weight: 850;
}

.profile-add-plugin-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  background-size: 180% 180%;
  animation: profileAddPluginGlow 2600ms ease-in-out infinite;
}

.profile-add-plugin-button > span {
  position: relative;
  z-index: 1;
}

.profile-add-plugin-button::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -45% auto -45% -34%;
  width: 30%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(195, 255, 180, 0.28), transparent);
  pointer-events: none;
  animation: profileAddPluginShimmer 3200ms ease-in-out infinite;
}

@keyframes profileAddPluginGlow {
  0%, 100% {
    border-color: rgba(116, 255, 82, 0.24);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.26), 0 0 0 rgba(116, 255, 82, 0);
    background-position: 0% 50%;
  }
  50% {
    border-color: rgba(142, 255, 112, 0.58);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.22), 0 0 20px rgba(116, 255, 82, 0.16);
    background-position: 100% 50%;
  }
}

@keyframes profileAddPluginShimmer {
  0%, 30% { left: -34%; opacity: 0; }
  42% { opacity: 0.9; }
  68%, 100% { left: 112%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-add-plugin-button {
    animation: none;
  }

  .profile-add-plugin-button::before {
    display: none;
  }

  .profile-push-orbit {
    animation: none;
  }
}

.profile-primary-actions .profile-section-toggle[aria-expanded="true"] {
  border-color: rgba(116, 255, 82, 0.48);
  background: rgba(116, 255, 82, 0.11);
}

body.profile-page .profile-section-body {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(236, 255, 239, 0.09);
  border-radius: 20px;
  background: rgba(8, 12, 9, 0.76);
}

.profile-push-card {
  --push-accent: 116, 255, 82;
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 11px;
  min-height: 132px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(var(--push-accent), 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 20%, rgba(var(--push-accent), 0.13), transparent 40%),
    linear-gradient(145deg, rgba(18, 28, 20, 0.94), rgba(5, 8, 6, 0.98));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.profile-push-card[data-tone="ready"] {
  --push-accent: 116, 255, 82;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 0 26px rgba(116, 255, 82, 0.08);
}

.profile-push-card[data-tone="warning"] {
  --push-accent: 255, 190, 92;
}

.profile-push-heading {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.profile-push-heart {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--push-accent), 0.38);
  border-radius: 50%;
  color: rgb(var(--push-accent));
  background: rgba(var(--push-accent), 0.1);
  box-shadow: 0 0 18px rgba(var(--push-accent), 0.13);
  font-size: 15px;
}

.profile-push-heading > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-push-heading strong {
  color: rgba(246, 255, 243, 0.97);
  font-size: 14px;
  font-weight: 900;
}

.profile-push-heading span:not(.profile-push-heart) {
  overflow: hidden;
  color: rgba(var(--push-accent), 0.84);
  font-size: 10px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-push-heading button,
.profile-push-options > button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(var(--push-accent), 0.42);
  border-radius: 11px;
  color: #071006;
  background: rgb(var(--push-accent));
  font: inherit;
  font-size: 10px;
  font-weight: 880;
}

.profile-push-heading button:disabled,
.profile-push-options > button:disabled {
  cursor: default;
  opacity: 0.46;
}

.profile-push-card > p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(236, 255, 239, 0.58);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.48;
}

.profile-push-options {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(236, 255, 239, 0.08);
}

.profile-push-options label {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 6px;
  color: rgba(246, 255, 243, 0.86);
  font-size: 10px;
  font-weight: 780;
}

.profile-push-options input {
  grid-row: 1 / span 2;
  accent-color: rgb(var(--push-accent));
}

.profile-push-options small {
  color: rgba(236, 255, 239, 0.42);
  font-size: 9px;
  font-weight: 620;
}

.profile-push-options > button {
  color: rgba(246, 255, 243, 0.86);
  background: rgba(var(--push-accent), 0.09);
}

.profile-push-orbit {
  position: absolute;
  z-index: 0;
  top: -58px;
  right: -50px;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(var(--push-accent), 0.12);
  border-radius: 50%;
  pointer-events: none;
  animation: pushGuardianOrbit 14s linear infinite;
}

.profile-push-orbit i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgb(var(--push-accent));
  box-shadow: 0 0 10px rgba(var(--push-accent), 0.6);
}

.profile-push-orbit i:nth-child(1) { top: 15px; left: 25px; }
.profile-push-orbit i:nth-child(2) { right: -2px; top: 70px; }
.profile-push-orbit i:nth-child(3) { bottom: 8px; left: 43px; }

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

.profile-phone-binding {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(116, 255, 82, 0.16);
  border-radius: 16px;
  background: rgba(116, 255, 82, 0.045);
}

.profile-phone-binding-head,
.profile-phone-binding-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-phone-binding-head strong {
  flex: 1;
  color: rgba(246, 255, 243, 0.94);
  font-size: 13px;
}

.profile-phone-binding-head span,
.profile-phone-binding p {
  color: rgba(236, 255, 239, 0.55);
  font-size: 11px;
}

.profile-phone-binding-controls input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(236, 255, 239, 0.15);
  border-radius: 12px;
  outline: 0;
  color: #f6fff3;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 12px;
}

.profile-phone-binding-controls input:focus {
  border-color: rgba(116, 255, 82, 0.5);
}

.profile-phone-binding-controls button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(190, 255, 170, 0.48);
  border-radius: 12px;
  color: #071006;
  background: linear-gradient(135deg, #baff9f, #74ff52 58%, #4cda35);
  font-size: 11px;
  font-weight: 850;
}

.profile-phone-binding-controls button:disabled { opacity: .58; }
.profile-phone-binding p { margin: 0; line-height: 1.45; }
.profile-phone-binding p[data-kind="error"] { color: #ff98a4; }
.profile-phone-binding p[data-kind="success"] { color: #86f6ae; }

body.profile-page .dynamic-area {
  padding-top: 14px;
}

/* 每个真人主页底部的宝莲灯。透明图片融入页面，彩色光晕由连接数驱动。 */
@property --lotus-hue {
  syntax: "<number>";
  inherits: true;
  initial-value: 38;
}

@property --lotus-hue-second {
  syntax: "<number>";
  inherits: true;
  initial-value: 90;
}

.lotus-lamp-section {
  --lotus-hue: 38;
  --lotus-hue-second: 90;
  padding: 20px 18px 10px;
  color: #f8fff6;
  transition: --lotus-hue 2.6s ease, --lotus-hue-second 2.6s ease;
}

.lotus-lamp-heading {
  margin-bottom: 10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.lotus-lamp-heading > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.lotus-lamp-heading span,
.lotus-lamp-status {
  color: rgba(236, 255, 239, 0.46);
  font-size: 10px;
  font-weight: 720;
}

.lotus-lamp-heading strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lotus-wish-button {
  flex: 0 0 auto;
  min-width: 88px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid hsla(var(--lotus-hue), 92%, 70%, 0.62);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, hsla(var(--lotus-hue), 88%, 55%, 0.28), hsla(var(--lotus-hue-second), 84%, 52%, 0.2));
  box-shadow: 0 0 22px hsla(var(--lotus-hue), 90%, 58%, 0.18);
  font-size: 12px;
  font-weight: 850;
}

.lotus-wish-button:disabled {
  opacity: 0.7;
}

.lotus-wish-button:active {
  transform: scale(0.96);
}

.lotus-lamp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: visible;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lotus-lamp-stage::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 8% 3% 5%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, transparent 0 31%, hsla(var(--lotus-hue), 96%, 63%, 0.2) 43%, transparent 67%),
    radial-gradient(ellipse at 50% 56%, hsla(var(--lotus-hue-second), 92%, 62%, 0.13), transparent 64%);
  filter: blur(15px);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}

.lotus-lamp-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.9);
}

.lotus-lamp-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: normal;
  user-select: none;
  -webkit-user-drag: none;
}

.lotus-lamp-aura {
  position: absolute;
  z-index: 2;
  width: 92%;
  height: 72%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 54%, hsla(var(--lotus-hue), 100%, 70%, 0.24), transparent 42%),
    conic-gradient(from 20deg, transparent, hsla(var(--lotus-hue-second), 95%, 67%, 0.22), transparent 36%, hsla(var(--lotus-hue), 100%, 68%, 0.18), transparent 72%);
  filter: blur(21px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.lotus-light-touch {
  position: relative;
  z-index: 5;
  width: min(210px, 68%);
  min-height: 154px;
  padding: 18px 16px 15px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid hsla(var(--lotus-hue), 92%, 74%, 0.28);
  border-radius: 32px;
  color: #f9fff4;
  background:
    radial-gradient(circle at 50% 22%, hsla(var(--lotus-hue), 96%, 68%, 0.18), transparent 48%),
    rgba(6, 11, 8, 0.78);
  box-shadow:
    0 0 34px hsla(var(--lotus-hue), 94%, 60%, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lotus-light-touch::before {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  top: 15px;
  left: 50%;
  border: 1px solid hsla(var(--lotus-hue-second), 96%, 72%, 0.42);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: lotusTouchRing 1.7s ease-out infinite;
  pointer-events: none;
}

.lotus-light-touch-icon {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 43px;
  line-height: 1;
  filter: drop-shadow(0 0 12px hsla(var(--lotus-hue), 96%, 70%, 0.48));
  animation: lotusFingerTap 1.35s ease-in-out infinite;
  transform-origin: 50% 88%;
}

.lotus-light-touch strong {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 880;
  letter-spacing: 0.02em;
}

.lotus-light-touch small {
  color: rgba(236, 255, 239, 0.54);
  font-size: 10px;
  font-weight: 680;
}

.lotus-light-touch:active,
.lotus-light-touch.is-pressed {
  transform: scale(0.96);
  opacity: 0.72;
}

.lotus-lamp-section.is-lit .lotus-lamp-stage::after {
  opacity: 1;
  animation: lotusAuraPulse 6.4s 2.3s ease-in-out infinite;
}

.lotus-lamp-section.is-revealing .lotus-lamp-visual {
  animation: lotusLampReveal 2.8s cubic-bezier(0.2, 0.72, 0.18, 1) both;
}

.lotus-lamp-section.is-lit .lotus-lamp-image,
.lotus-lamp-section.is-lit .lotus-lamp-aura {
  animation: lotusLampBreath 5.6s 2.8s ease-in-out infinite;
}

.lotus-lamp-empty {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.lotus-lamp-empty[hidden] {
  display: none;
}

.lotus-lamp-empty p {
  margin: 0;
  color: rgba(236, 255, 239, 0.28);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.7;
  text-align: center;
}

.lotus-preview-button {
  height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(236, 255, 239, 0.16);
  border-radius: 999px;
  color: rgba(236, 255, 239, 0.72);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 760;
}

.lotus-preview-button:active {
  transform: scale(0.96);
}

.lotus-lamp-status {
  margin: 9px 2px 0;
  text-align: center;
}

@keyframes lotusLampReveal {
  0% { opacity: 0; transform: scale(0.86); filter: blur(15px) brightness(0.2); }
  38% { opacity: 0.42; transform: scale(0.94); filter: blur(6px) brightness(0.7); }
  76% { opacity: 0.9; transform: scale(1.018); filter: blur(0) brightness(1.12); }
  100% { opacity: 1; transform: scale(1); filter: blur(0) brightness(1); }
}

@keyframes lotusLampBreath {
  0%, 100% { transform: scale(0.988); filter: brightness(0.97) saturate(1); }
  50% { transform: scale(1.018); filter: brightness(1.1) saturate(1.16); }
}

@keyframes lotusAuraPulse {
  0%, 100% { opacity: 0.64; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.045); }
}

@keyframes lotusFingerTap {
  0%, 100% { transform: translateY(0) scale(1) rotate(-2deg); }
  45% { transform: translateY(-7px) scale(1.055) rotate(2deg); }
  68% { transform: translateY(2px) scale(0.97) rotate(0); }
}

@keyframes lotusTouchRing {
  0% { opacity: 0; transform: translateX(-50%) scale(0.64); }
  24% { opacity: 0.72; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.34); }
}

@media (max-width: 360px) {
  .profile-quick-editor {
    grid-template-columns: 60px minmax(0, 1fr) 62px;
    gap: 7px;
    padding: 10px;
  }
  .profile-avatar-editor { width: 60px; height: 60px; }
  .profile-quick-field { padding: 0 7px; gap: 5px; }
  .profile-save-button { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .lotus-lamp-section.is-revealing .lotus-lamp-visual {
    animation-duration: 600ms;
  }
  .lotus-lamp-section.is-lit .lotus-lamp-image,
  .lotus-lamp-section.is-lit .lotus-lamp-aura,
  .lotus-lamp-section.is-lit .lotus-lamp-stage::after {
    animation-iteration-count: 1;
  }
  .lotus-light-touch-icon,
  .lotus-light-touch::before {
    animation-iteration-count: 1;
  }
}

/* 心链三段式公开页：完整圈（成员可见）／AI 共同记忆／双人灯火。 */
.heartlink-native-page.is-three-part {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
  gap: 18px;
  padding-bottom: 26px;
  overflow-x: hidden;
  overflow-x: clip;
}

.heartlink-native-page.is-three-part .heartlink-native-header {
  padding-bottom: 2px;
}

.heartlink-full-circle,
.heartlink-pair-record {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(205, 255, 192, .14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 12%, rgba(116, 255, 82, .055), transparent 17rem),
    rgba(255, 255, 255, .022);
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 20px 48px rgba(0, 0, 0, .2);
}

/* 圆环不再放在卡片中：12 个吉祥图标直接落在心链的纯黑页面上。 */
.heartlink-full-circle {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* 熟人圈共同记忆复用页面唯一的书本组件，不再保留第二套卡片容器。 */
.heartlink-native-page > .dynamic-area {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-x: clip;
}

.heartlink-native-page > .dynamic-area .memory-book-shell,
.heartlink-native-page > .dynamic-area .dynamic-card.memory-page {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.dynamic-area.is-heartlink-common-memory .dynamic-heading {
  padding-inline: 3px;
}

.heartlink-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.heartlink-section-title > div {
  min-width: 0;
}

.heartlink-section-title span {
  display: block;
  color: rgba(196, 255, 173, .64);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}

.heartlink-section-title h2 {
  margin: 4px 0 0;
  color: #f6fff2;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .025em;
}

.heartlink-section-title > small {
  flex: 0 0 auto;
  color: rgba(238, 255, 231, .54) !important;
  font-size: 10px !important;
  font-weight: 760;
}

.heartlink-full-circle .heartlink-native-pool {
  padding-top: 0;
}

/* 与 xinlian-home-v2 参考页一致的图标尺寸、光晕与明灭节奏。 */
.heartlink-full-circle .heartlink-native-member-slot {
  width: clamp(48px, 8.2vw, 66px);
  height: clamp(48px, 8.2vw, 66px);
}

.heartlink-full-circle .heartlink-native-member-slot.is-unlit {
  opacity: .5;
}

.heartlink-full-circle .heartlink-native-member-slot:hover {
  filter: brightness(1.12);
}

.heartlink-full-circle .heartlink-native-member-slot:focus-visible {
  outline-color: rgba(255, 229, 193, .82);
}

.heartlink-echo-stage {
  position: absolute;
  z-index: 4;
  inset: 16%;
  display: block;
  pointer-events: auto;
}

.heartlink-echo-star {
  position: absolute;
  z-index: var(--echo-z, 3);
  left: var(--echo-x);
  top: var(--echo-y);
  width: var(--echo-size);
  height: var(--echo-size);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--echo-color, #c9ffa9);
  background: radial-gradient(circle, rgba(184, 255, 145, .15), transparent 66%);
  filter: drop-shadow(0 0 8px rgba(147, 255, 111, .52));
  opacity: var(--echo-opacity, 1);
  transform: translate(-50%, -50%);
  animation: heartlinkEchoStarDrift var(--echo-drift-duration, 18s) ease-in-out var(--echo-delay, 0s) infinite;
  will-change: transform;
}

.heartlink-echo-star > span {
  display: block;
  font-size: calc(var(--echo-size) * .64);
  line-height: 1;
  animation: heartlinkEchoStarPulse var(--echo-pulse-duration, 9s) ease-in-out var(--echo-delay, 0s) infinite, heartlinkEchoStarGlow 3.8s ease-in-out var(--echo-delay, 0s) infinite;
  will-change: transform, opacity;
}
.heartlink-echo-star.is-unanswered {
  background: radial-gradient(circle, color-mix(in srgb, var(--echo-color, #d7ffbd) 30%, transparent), transparent 68%);
  filter: drop-shadow(0 0 16px var(--echo-color, rgba(147, 255, 111, .72)));
}
.heartlink-echo-star.is-low-response { filter: drop-shadow(0 0 9px var(--echo-color, rgba(147, 255, 111, .54))); }
.heartlink-echo-star.is-settled { filter: drop-shadow(0 0 5px var(--echo-color, rgba(147, 255, 111, .3))); }
.heartlink-echo-star.is-mine { color: #ffde88; filter: drop-shadow(0 0 9px rgba(255, 211, 110, .56)); }
.heartlink-echo-star.is-responded { color: #f4ffe9; }
.heartlink-echo-star:focus-visible { outline: 2px solid rgba(220, 255, 206, .9); outline-offset: 3px; }

.heartlink-circle-thought-button {
  width: 92px;
  height: 52px;
  min-height: 52px;
  display: grid;
  place-items: center;
  margin: 10px auto 0;
  padding: 0;
  border: 2px solid #caff72;
  border-radius: 12px;
  color: #f5fff0;
  background: linear-gradient(145deg, rgba(116, 255, 82, .11), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px rgba(255, 255, 255, .16), 0 10px 28px rgba(0, 0, 0, .22), 0 0 12px #caff72, 0 0 28px rgba(116, 255, 82, .68);
}
.heartlink-circle-thought-button > span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(184, 255, 145, .04);
  font-size: 25px;
  line-height: 1;
}
.heartlink-circle-thought-button:active { transform: scale(.985); }

.heartlink-echo-responses {
  display: grid;
  gap: 8px;
  margin: 12px 0 15px;
}

.heartlink-echo-responses article {
  padding: 11px 12px;
  border: 1px solid rgba(184, 255, 145, .13);
  border-radius: 15px;
  background: rgba(184, 255, 145, .035);
}

.heartlink-echo-responses header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.heartlink-echo-responses strong {
  color: rgba(226, 255, 213, .8);
  font-size: 11px;
  font-weight: 850;
}

.heartlink-echo-responses small {
  color: rgba(225, 255, 214, .36);
  font-size: 8px;
}

.heartlink-echo-responses p {
  margin: 6px 0 0;
  color: rgba(249, 255, 246, .88);
  font-size: 12px;
  line-height: 1.55;
}

.heartlink-echo-response-evaluation {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}

.heartlink-echo-response-evaluation button {
  width: 38px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(220, 255, 210, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  filter: grayscale(.38);
  opacity: .68;
  font-size: 17px;
  transition: transform 150ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.heartlink-echo-response-evaluation button:active { transform: scale(.92); }
.heartlink-echo-response-evaluation button[aria-pressed="true"] {
  border-color: rgba(184, 255, 145, .62);
  background: rgba(184, 255, 145, .12);
  filter: none;
  opacity: 1;
}
.heartlink-echo-response-evaluation button[data-heartlink-response-evaluation="down"][aria-pressed="true"] {
  border-color: rgba(255, 140, 140, .55);
  background: rgba(255, 92, 92, .1);
}
.heartlink-echo-response-evaluation button:disabled { opacity: .38; }

.heartlink-echo-anonymous-control {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(184, 255, 145, .17);
  border-radius: 15px;
  background: rgba(184, 255, 145, .04);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.heartlink-echo-anonymous-control > span {
  min-width: 0;
  flex: 1 1 auto;
}

.heartlink-echo-anonymous-control strong,
.heartlink-echo-anonymous-control small {
  display: block;
}

.heartlink-echo-anonymous-control strong {
  color: rgba(248, 255, 245, .92);
  font-size: 12px;
  font-weight: 880;
}

.heartlink-echo-anonymous-control small {
  margin-top: 3px;
  color: rgba(230, 255, 220, .48);
  font-size: 9px;
  line-height: 1.35;
}

.heartlink-echo-anonymous-control > i {
  position: relative;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(211, 255, 198, .48);
  border-radius: 5px;
  background: rgba(255, 255, 255, .035);
  font-style: normal;
}

.heartlink-echo-anonymous-control[aria-checked="true"] > i {
  border-color: #b8ff91;
  color: #081006;
  background: #b8ff91;
}

.heartlink-echo-anonymous-control[aria-checked="true"] > i::after {
  content: "✓";
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.heartlink-echo-anonymous-control:focus-visible {
  outline: 2px solid rgba(220, 255, 206, .92);
  outline-offset: 3px;
}

.heartlink-echo-compose-status {
  min-height: 20px;
  margin: 2px 2px 8px;
  color: rgba(255, 226, 164, .88);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.55;
}

@keyframes heartlinkEchoStarDrift {
  0%, 100% { transform: translate(-50%, -50%) translate3d(var(--echo-drift-x1, -5px), var(--echo-drift-y1, 4px), 0); }
  34% { transform: translate(-50%, -50%) translate3d(var(--echo-drift-x2, 7px), var(--echo-drift-y2, -6px), 0); }
  68% { transform: translate(-50%, -50%) translate3d(var(--echo-drift-x3, -3px), var(--echo-drift-y3, 8px), 0); }
}

@keyframes heartlinkEchoStarPulse {
  0%, 100% { transform: scale(var(--echo-min-scale, .76)) rotate(-7deg); }
  50% { transform: scale(var(--echo-max-scale, 1.18)) rotate(7deg); }
}

@keyframes heartlinkEchoStarGlow {
  0%, 100% { opacity: .48; filter: brightness(.9); }
  50% { opacity: 1; filter: brightness(1.28); }
}

@media (prefers-reduced-motion: reduce) {
  .heartlink-echo-star,
  .heartlink-echo-star > span {
    animation: none;
  }
}

.heartlink-pair-record {
  position: relative;
  overflow: hidden;
  padding-bottom: 18px;
}

.heartlink-pair-stage {
  position: relative;
  min-height: 318px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 56%, rgba(116, 255, 82, .08), transparent 54%);
}

.heartlink-oil-station {
  position: absolute;
  z-index: 8;
  top: 4px;
  right: 3px;
  width: 88px;
  display: grid;
  justify-items: center;
  gap: 5px;
}

.heartlink-refuel-button {
  width: 76px;
  min-height: 70px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  padding: 2px 4px 4px;
  border: 1px solid rgba(255, 220, 139, .18);
  border-radius: 18px;
  color: rgba(255, 240, 198, .86);
  background: linear-gradient(160deg, rgba(255, 214, 115, .09), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 10px 26px rgba(0, 0, 0, .25);
}

.heartlink-refuel-button img {
  width: 66px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, .42));
  transform: rotate(-8deg);
}

.heartlink-refuel-button:active { transform: scale(.94); }
.heartlink-refuel-button:disabled { opacity: .55; }

.heartlink-oil-bottle {
  position: relative;
  width: 25px;
  height: 84px;
  overflow: hidden;
  border: 1px solid rgba(231, 248, 235, .48);
  border-radius: 7px 7px 11px 11px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .16) 28%, rgba(255, 255, 255, .025) 66%, rgba(255, 255, 255, .09));
  box-shadow: inset 0 0 8px rgba(255, 255, 255, .08), 0 8px 18px rgba(0, 0, 0, .28);
}

.heartlink-oil-bottle::before {
  position: absolute;
  z-index: 3;
  top: -1px;
  left: 6px;
  width: 11px;
  height: 8px;
  border: 1px solid rgba(231, 248, 235, .45);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: rgba(6, 13, 8, .88);
  content: "";
}

.heartlink-oil-bottle > i {
  position: absolute;
  z-index: 1;
  inset: auto 2px 2px;
  height: calc((100% - 4px) * var(--oil-ratio));
  border-radius: 4px 4px 8px 8px;
  background: linear-gradient(180deg, rgba(255, 226, 132, .82), rgba(196, 120, 28, .92));
  box-shadow: 0 0 12px rgba(255, 188, 64, .28), inset 3px 0 rgba(255, 255, 255, .18);
  transition: height 900ms ease;
}

.heartlink-oil-bottle > span {
  position: absolute;
  z-index: 4;
  inset: 4px auto 4px 5px;
  width: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .28);
}

.heartlink-pair-lotus {
  --pair-lotus-opacity: 1;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: var(--pair-lotus-opacity);
  transform: scale(.98);
  filter: saturate(1.04) brightness(1.02);
}

.heartlink-pair-record.is-unlit .heartlink-pair-lotus {
  --pair-lotus-opacity: .035;
  filter: grayscale(.7) brightness(.48);
}

.heartlink-pair-lotus > span {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(133, 255, 101, .18), transparent 64%);
  filter: blur(19px);
  opacity: .74;
  transform: scale(var(--heartlink-lotus-growth, .3));
  transition: transform 2.4s cubic-bezier(.18, .72, .18, 1);
}

.heartlink-pair-lotus img {
  position: relative;
  z-index: 1;
  width: min(310px, 92%);
  height: auto;
  object-fit: contain;
  transform: scale(var(--heartlink-lotus-growth, .3));
  transition: transform 2.4s cubic-bezier(.18, .72, .18, 1), filter 1.8s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.heartlink-pair-record[data-lotus-growth-stage="ignited"].is-growth-arrival .heartlink-pair-lotus img {
  animation: heartlinkLotusIgniteGrowth 3.2s cubic-bezier(.18, .76, .16, 1) both;
}

.heartlink-pair-record[data-lotus-growth-stage="growing"].is-growth-arrival .heartlink-pair-lotus img {
  animation: heartlinkLotusMiddleGrowth 3.8s cubic-bezier(.18, .76, .16, 1) both;
}

.heartlink-pair-record[data-lotus-growth-stage="mature"].is-growth-arrival .heartlink-pair-lotus img {
  animation: heartlinkLotusMatureGrowth 4.6s cubic-bezier(.18, .76, .16, 1) both;
}

.heartlink-pair-record.is-lit .heartlink-pair-lotus {
  animation: heartlinkPairLotusBreathe 4.6s ease-in-out infinite;
}

.heartlink-pair-record.is-lighting .heartlink-pair-lotus {
  animation: heartlinkPairLotusReveal 6.8s cubic-bezier(.16, .7, .2, 1) both;
}

.heartlink-pair-record.is-lighting::before {
  position: absolute;
  z-index: 0;
  inset: 19% 8% 18%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 223, 145, .18), transparent 38%),
    radial-gradient(circle, rgba(126, 255, 95, .13), transparent 68%);
  filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  content: "";
  animation: heartlinkCeremonyGlow 6.8s ease-in-out both;
}

.heartlink-match-button {
  position: relative;
  z-index: 4;
  width: min(210px, 66%);
  min-height: 230px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  padding: 8px 18px 16px;
  border: 0;
  color: #f9fff5;
  background: transparent;
}

.heartlink-match-button::before {
  position: absolute;
  inset: 17% 4% 4%;
  z-index: -1;
  border: 1px solid rgba(255, 228, 164, .15);
  border-radius: 42%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 188, 77, .1), transparent 65%);
  filter: blur(1px);
  content: "";
}

.heartlink-match-button > img {
  width: 142px;
  height: 142px;
  object-fit: contain;
  transform: rotate(-8deg);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .48));
  transition: transform 350ms ease, opacity 420ms ease, filter 350ms ease;
}

.heartlink-match-button > strong {
  margin-top: -3px;
  font-size: 15px;
  font-weight: 900;
}

.heartlink-match-button > small {
  color: rgba(240, 255, 234, .56) !important;
  font-size: 10px !important;
}

.heartlink-match-button.is-struck > img {
  animation: heartlinkMatchStrike 1.65s cubic-bezier(.2, .76, .18, 1) both;
}

.heartlink-match-button.is-struck > strong,
.heartlink-match-button.is-struck > small,
.heartlink-match-button.is-struck::before {
  opacity: 0;
  transition: opacity 1.1s ease;
}

.heartlink-interaction-records {
  position: relative;
  z-index: 4;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid rgba(190, 255, 170, .11);
  border-radius: 20px;
  background: rgba(255, 255, 255, .025);
}

.heartlink-interaction-records-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 0;
  color: rgba(245, 255, 241, .9);
  background: transparent;
  text-align: left;
}

.heartlink-interaction-records-toggle > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.heartlink-interaction-records-toggle strong {
  color: rgba(248, 255, 245, .92);
  font-size: 13px;
  font-weight: 880;
}

.heartlink-interaction-records-toggle small {
  color: rgba(220, 255, 207, .44);
  font-size: 9px;
}

.heartlink-interaction-records-toggle > i {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(190, 255, 170, .14);
  border-radius: 50%;
  color: #c8ffad;
  background: rgba(116, 255, 82, .05);
  font-size: 18px;
  font-style: normal;
  transition: transform 220ms ease, background 220ms ease;
}

.heartlink-interaction-records-toggle[aria-expanded="true"] > i {
  background: rgba(116, 255, 82, .1);
  transform: rotate(180deg);
}

.heartlink-interaction-records-panel {
  padding: 11px;
  border-top: 1px solid rgba(190, 255, 170, .08);
}

.heartlink-interaction-records-panel[hidden] {
  display: none !important;
}

.heartlink-interaction-records-empty {
  display: grid;
  gap: 5px;
  padding: 12px 8px;
  text-align: center;
}

.heartlink-interaction-records-empty strong {
  color: rgba(245, 255, 241, .8);
  font-size: 11px;
}

.heartlink-interaction-records-empty small {
  color: rgba(220, 255, 207, .42);
  font-size: 9px;
  line-height: 1.55;
}

.heartlink-pair-memory-list {
  max-height: 330px;
  display: grid;
  gap: 7px;
  overflow: auto;
  overscroll-behavior: contain;
}

.heartlink-pair-memory {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(191, 255, 168, .08);
  border-radius: 15px;
  background: rgba(0, 0, 0, .2);
}

.heartlink-pair-memory > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #baff91;
  background: rgba(116, 255, 82, .08);
  font-size: 11px;
}

.heartlink-pair-memory strong,
.heartlink-pair-memory p,
.heartlink-pair-memory small {
  display: block;
}

.heartlink-pair-memory strong {
  color: rgba(247, 255, 244, .9);
  font-size: 10px;
  font-weight: 830;
}

.heartlink-pair-memory p {
  margin: 4px 0 0;
  color: rgba(236, 255, 229, .6);
  font-size: 10px;
  line-height: 1.55;
}

.heartlink-pair-memory small {
  margin-top: 5px;
  color: rgba(216, 255, 199, .34);
  font-size: 8px;
}

.heartlink-system-voice-bubble {
  position: fixed;
  z-index: 240;
  left: 50%;
  top: calc(24px + env(safe-area-inset-top));
  bottom: auto;
  width: min(360px, calc(100vw - 28px));
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid rgba(195, 255, 174, .42);
  border-radius: 22px 22px 22px 7px;
  color: #f8fff5;
  background: rgba(5, 12, 7, .97);
  box-shadow: 0 22px 58px rgba(0, 0, 0, .62), 0 0 28px rgba(119, 255, 80, .09);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -22px) scale(.96);
  transition: opacity 260ms ease, transform 340ms cubic-bezier(.2, .82, .2, 1);
}

.heartlink-system-voice-bubble.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.system-transient-voice-bubble {
  z-index: 2147483600;
}

.account-system-voice-host:empty {
  display: none;
}

.account-system-voice-host .heartlink-system-voice-bubble.is-dialog-hosted {
  position: relative;
  left: auto;
  bottom: auto;
  width: 100%;
  min-height: 64px;
  border-radius: 18px 18px 18px 6px;
  transform: translateY(12px) scale(.97);
}

.account-system-voice-host .heartlink-system-voice-bubble.is-dialog-hosted.is-visible {
  transform: translateY(0) scale(1);
}

.heartlink-system-voice-bubble > span {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 255, 104, .18), rgba(116, 255, 82, .05));
}

.heartlink-system-voice-bubble > span i {
  width: 3px;
  height: 11px;
  border-radius: 99px;
  background: #bbff94;
  animation: heartlinkVoicePulse 780ms ease-in-out infinite alternate;
}

.heartlink-system-voice-bubble > span i:nth-child(2) {
  height: 20px;
  animation-delay: 130ms;
}

.heartlink-system-voice-bubble > span i:nth-child(3) {
  height: 14px;
  animation-delay: 260ms;
}

.heartlink-system-voice-bubble p {
  margin: 0;
  color: rgba(249, 255, 246, .94);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.62;
}

@keyframes heartlinkVoicePulse {
  from { transform: scaleY(.55); opacity: .58; }
  to { transform: scaleY(1.18); opacity: 1; }
}

/* 个人设置中的莲花与本人心链熟人圈共用同一份当前点灯状态。 */
.lotus-lamp-section.system-lotus-status {
  margin: 8px 18px 22px;
  padding: 17px;
  border: 1px solid rgba(205, 255, 192, .12);
  border-radius: 25px;
  background:
    radial-gradient(circle at 50% 42%, hsla(var(--lotus-hue), 92%, 60%, .08), transparent 52%),
    rgba(255, 255, 255, .025);
  box-shadow: inset 0 1px rgba(255, 255, 255, .045), 0 20px 50px rgba(0, 0, 0, .2);
}

.system-lotus-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.system-lotus-heading > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.system-lotus-heading span {
  color: rgba(205, 255, 187, .55);
  font-size: 10px;
  font-weight: 840;
  letter-spacing: .12em;
}

.system-lotus-heading strong {
  color: #f7fff3;
  font-size: 17px;
  font-weight: 900;
}

.system-lotus-heading em {
  color: hsla(var(--lotus-hue), 100%, 78%, .9);
  font-size: 12px;
  font-style: normal;
  font-weight: 880;
}

.system-lotus-stage {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
}

.system-lotus-stage .lotus-lamp-aura {
  width: 85%;
  height: 74%;
}

.system-lotus-stage .lotus-lamp-image {
  position: relative;
  inset: auto;
  width: min(310px, 94%);
  height: auto;
  transform: scale(var(--heartlink-lotus-growth, .3));
  filter: saturate(calc(.8 + var(--lotus-hue) / 360)) brightness(1.02);
  transition: opacity 500ms ease, transform 1.2s ease, filter 500ms ease;
}

.system-lotus-status.is-unlit {
  border-color: rgba(205, 255, 192, .055);
  background: rgba(255, 255, 255, .012);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.system-lotus-status.is-unlit .system-lotus-stage .lotus-lamp-aura {
  opacity: 0;
}

.system-lotus-status.is-unlit .system-lotus-stage .lotus-lamp-image {
  opacity: .055;
  filter: grayscale(1) brightness(.35);
  animation: none;
}

.system-lotus-status.is-unlit .system-lotus-heading strong,
.system-lotus-status.is-unlit .system-lotus-heading em {
  color: rgba(232, 244, 228, .46);
}

.system-lotus-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.system-lotus-metrics > span {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 10px 4px;
  border: 1px solid rgba(230, 255, 222, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .022);
}

.system-lotus-metrics b {
  color: #eaffdf;
  font-size: 18px;
  font-weight: 900;
}

.system-lotus-metrics small {
  color: rgba(235, 255, 228, .48) !important;
  font-size: 9px !important;
  text-align: center;
}

.system-lotus-status > p {
  margin: 12px 1px 0;
  color: rgba(237, 255, 231, .47);
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}

@keyframes heartlinkPairLotusReveal {
  0% { opacity: .015; transform: scale(.8); filter: grayscale(.9) brightness(.3); }
  18% { opacity: .07; transform: scale(.85); filter: grayscale(.74) brightness(.44); }
  38% { opacity: .24; transform: scale(.9); filter: grayscale(.5) brightness(.63); }
  66% { opacity: .62; transform: scale(.965); filter: grayscale(.18) brightness(.88); }
  86% { opacity: .9; transform: scale(1.018); filter: grayscale(.04) brightness(1.1); }
  100% { opacity: 1; transform: scale(1); filter: grayscale(0) brightness(1); }
}

@keyframes heartlinkLotusIgniteGrowth {
  0% { transform: scale(.12); filter: grayscale(.55) brightness(.52); }
  62% { transform: scale(.33); filter: grayscale(.08) brightness(1.14); }
  100% { transform: scale(.3); filter: grayscale(0) brightness(1); }
}

@keyframes heartlinkLotusMiddleGrowth {
  0% { transform: scale(.3); filter: brightness(.94); }
  68% { transform: scale(.55); filter: brightness(1.15) saturate(1.12); }
  100% { transform: scale(.5); filter: brightness(1) saturate(1); }
}

@keyframes heartlinkLotusMatureGrowth {
  0% { transform: scale(.5); filter: brightness(.92); }
  72% { transform: scale(1.06); filter: brightness(1.18) saturate(1.16); }
  100% { transform: scale(1); filter: brightness(1) saturate(1); }
}

@keyframes heartlinkCeremonyGlow {
  0%, 12% { opacity: 0; transform: scale(.52); }
  34% { opacity: .18; transform: scale(.72); }
  70% { opacity: .72; transform: scale(1.02); }
  88% { opacity: .95; transform: scale(1.13); }
  100% { opacity: .42; transform: scale(1); }
}

@keyframes heartlinkPairLotusBreathe {
  0%, 100% { transform: scale(.985); filter: brightness(.96) saturate(.95); }
  50% { transform: scale(1.018); filter: brightness(1.08) saturate(1.08); }
}

@keyframes heartlinkMatchStrike {
  0% { opacity: 1; transform: translate(0, 0) rotate(-8deg) scale(1); filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .48)); }
  24% { opacity: 1; transform: translate(24px, -12px) rotate(9deg) scale(1.055); filter: drop-shadow(0 0 13px rgba(255, 199, 86, .22)); }
  48% { opacity: 1; transform: translate(-18px, 7px) rotate(-15deg) scale(1.02); filter: drop-shadow(0 0 24px rgba(255, 190, 70, .72)); }
  70% { opacity: .9; transform: translate(3px, -7px) rotate(-3deg) scale(.98); filter: drop-shadow(0 0 32px rgba(255, 205, 87, .94)); }
  100% { opacity: 0; transform: translate(0, -24px) rotate(2deg) scale(.68); filter: drop-shadow(0 0 42px rgba(255, 220, 110, 1)); }
}

@media (max-width: 360px) {
  .heartlink-full-circle { padding: 0; }
  .heartlink-pair-record { padding: 12px; }
  .heartlink-pair-stage { min-height: 292px; }
  .system-lotus-stage { min-height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  .heartlink-pair-record.is-lighting .heartlink-pair-lotus {
    animation-duration: 900ms;
  }
  .heartlink-match-button.is-struck > img {
    animation-duration: 360ms;
  }
  .heartlink-pair-record.is-lit .heartlink-pair-lotus,
  .heartlink-pair-record.is-growth-arrival .heartlink-pair-lotus img,
  .system-lotus-stage .lotus-lamp-image,
  .heartlink-system-voice-bubble > span i {
    animation: none;
  }
}
