:root {
  --brand: #7365f6;
  --brand-2: #4e9dff;
  --ink: #121326;
  --muted: #747894;
  --line: rgba(115, 101, 246, 0.13);
  --panel: rgba(255, 255, 255, 0.82);
  --white: #fff;
  --bubble: #f1f4ff;
  --shadow: 0 24px 70px rgba(42, 39, 120, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --keyboard-inset: 0px;
  --nav-height: 58px;
  --topbar-height: calc(var(--safe-top) + var(--nav-height));
  --assistant-strip-height: 92px;
  --attachment-push: 104px;
  --app-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@supports (height: 100dvh) {
  :root { --app-height: 100dvh; }
}

* { box-sizing: border-box; }
/* 外层文档不滚动：可视高度只有一份，滚动都发生在应用内部的容器里 */
html {
  height: 100%;
  background: #eef3ff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 9%, rgba(154, 231, 255, 0.54), transparent 25vw),
    radial-gradient(circle at 88% 5%, rgba(115, 101, 246, 0.28), transparent 24vw),
    linear-gradient(145deg, #f8fbff 0%, #eef3ff 46%, #e7e8ff 100%);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell {
  width: min(100vw, 520px);
  height: var(--app-height);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,247,255,0.94));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.55), var(--shadow);
}

.page {
  height: var(--app-height);
  position: relative;
  animation: pageFade 240ms ease both;
  will-change: transform, opacity;
}
.page[data-transition="slide-left"] { animation: pageFromLeft 340ms cubic-bezier(.2,.78,.18,1) both; }
.page[data-transition="slide-right"] { animation: pageFromRight 340ms cubic-bezier(.2,.78,.18,1) both; }
.page[data-transition="fade"] { animation: pageFade 240ms ease both; }
.page[data-transition="none"] { animation: none; }

@keyframes pageFade {
  from { opacity: 0; transform: scale(.992); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pageFromLeft {
  from { opacity: .18; transform: translateX(-42px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pageFromRight {
  from { opacity: .18; transform: translateX(42px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Login */
.login-page {
  display: grid;
  place-items: center;
  padding: max(24px, var(--safe-top)) 28px max(28px, var(--safe-bottom));
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, rgba(115,101,246,.2), transparent 19%),
    radial-gradient(circle at 18% 12%, rgba(125,214,255,.48), transparent 28%),
    linear-gradient(180deg, #f9fbff 0%, #eef4ff 56%, #f7f9ff 100%);
}
.login-orbit {
  position: absolute;
  inset: -19% -36% auto -36%;
  height: 52%;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.88), transparent 18%),
    conic-gradient(from 128deg, rgba(115,101,246,.07), rgba(78,157,255,.26), rgba(163,235,255,.28), rgba(115,101,246,.08));
  border-radius: 0 0 50% 50%;
  box-shadow: 0 28px 90px rgba(91,125,255,.16);
  pointer-events: none;
}
.login-glow {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 260px;
  height: 176px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(20,201,105,.24), transparent 64%);
  filter: blur(16px);
  pointer-events: none;
}
.login-card {
  width: min(100%, 322px);
  min-height: 390px;
  position: relative;
  padding: 46px 30px 32px;
  border: 1px solid rgba(255,255,255,.84);
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.55));
  backdrop-filter: blur(24px);
  border-radius: 34px;
  box-shadow:
    0 30px 90px rgba(61,75,170,.18),
    0 18px 42px rgba(18,201,87,.1),
    inset 0 1px 0 rgba(255,255,255,.92);
}
.logo-plate {
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border-radius: 28px;
  box-shadow: 0 18px 36px rgba(115,101,246,.3);
  overflow: hidden;
}
.logo-mark {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
}
.brand-title {
  margin: 0;
  text-align: center;
  font-size: clamp(52px, 14vw, 70px);
  line-height: .86;
  letter-spacing: -0.095em;
  color: #15162c;
  text-shadow: 0 1px 0 rgba(255,255,255,.82);
}
.slogan {
  text-align: center;
  color: var(--brand);
  font-size: 16px;
  font-weight: 950;
  margin: 16px 0 22px;
  letter-spacing: .035em;
}
.login-agreement {
  min-height: 38px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7d829b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  user-select: none;
}
.login-agreement-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.login-agreement-check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(115,101,246,.26);
  border-radius: 50%;
  color: transparent;
  background: rgba(255,255,255,.7);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.login-agreement-check svg {
  width: 16px;
  height: 16px;
}
.login-agreement-input:checked + .login-agreement-check {
  border-color: rgba(115,101,246,.9);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: scale(1.03);
}
.login-agreement-input:focus-visible + .login-agreement-check {
  outline: 3px solid rgba(115,101,246,.25);
  outline-offset: 2px;
}
.login-agreement-text {
  min-width: 0;
}
.login-agreement-link {
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font-weight: 900;
}
.local-phone-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 24px var(--line);
}
.local-phone-btn:disabled { cursor: wait; opacity: .65; }
.local-phone-preview { display: grid; gap: 6px; margin: 22px 0 18px; color: var(--muted); font-size: 13px; }
.local-phone-preview strong { color: var(--ink); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
.login-cancel-btn { margin-top: 10px; padding: 8px 12px; border: 0; color: var(--brand); background: transparent; }
.login-method-switch { width: 100%; min-height: 44px; margin-top: 16px; padding: 10px; border: 0; color: var(--brand); background: transparent; font-size: 14px; }
#localLoginMethod[hidden], #phoneLoginForm[hidden] { display: none; }
.login-page { overflow-y: auto; place-items: safe center; }
.login-card .login-agreement { margin: 16px 0 0; }
.local-phone-btn:focus-visible, .login-method-switch:focus-visible, .scan-again-btn:focus-visible, .login-cancel-btn:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 3px;
}

.auth-login-form,
.auth-flow-form { display: grid; gap: 12px; }
.login-card .auth-login-form { margin-top: 8px; }
.auth-field { display: grid; gap: 7px; color: #747894; font-size: 12px; font-weight: 900; }
.auth-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.auth-code-row .settings-small-btn { min-width: 92px; white-space: nowrap; }
.settings-small-btn:disabled { cursor: not-allowed; opacity: .58; }
.auth-flow-copy { margin: 0; color: #7d829b; font-size: 12px; font-weight: 750; line-height: 1.55; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #a0a6bb; font-size: 12px; font-weight: 800; }
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; flex: 1; background: rgba(115,101,246,.14); }

/* Feature drawer */
.feature-shell {
  height: var(--app-height);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 4%, rgba(154,231,255,.36), transparent 28%),
    linear-gradient(145deg, #dde4ff 0%, #f4f7ff 100%);
}
.feature-menu {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 272px;
  padding: calc(var(--safe-top) + 24px) 18px calc(var(--safe-bottom) + 18px);
  display: flex;
  flex-direction: column;
  color: #252842;
  opacity: .42;
  transform: translateX(-18px) scale(.98);
  transition: opacity 300ms cubic-bezier(.2,.8,.2,1), transform 300ms cubic-bezier(.2,.8,.2,1);
}
.feature-shell.menu-open .feature-menu {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.feature-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.feature-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: block;
  object-fit: contain;
  box-shadow: 0 16px 30px rgba(78,96,220,.24);
}
.feature-menu-head strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.05em;
}
.feature-menu-list {
  display: grid;
  gap: 10px;
}
.feature-menu-item {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 19px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #2d304a;
  background: transparent;
  text-align: left;
  font-weight: 950;
  opacity: 0;
  transform: translateX(-12px);
  transition: background 180ms ease, box-shadow 180ms ease, transform 260ms cubic-bezier(.2,.8,.2,1), opacity 260ms ease;
}
.feature-shell.menu-open .feature-menu-item {
  opacity: 1;
  transform: translateX(0);
}
.feature-shell.menu-open .feature-menu-item:nth-child(1) { transition-delay: 40ms; }
.feature-shell.menu-open .feature-menu-item:nth-child(2) { transition-delay: 80ms; }
.feature-menu-item.active,
.feature-menu-item:hover {
  background: rgba(255,255,255,.7);
  box-shadow: 0 12px 26px rgba(50,51,100,.08);
}
.feature-menu-item:active {
  transform: scale(.98);
}
.feature-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  font-size: 14px;
  font-weight: 950;
}
.feature-item-icon svg {
  width: 18px;
  height: 18px;
}
.feature-menu-item em {
  margin-left: auto;
  margin-right: 16px;
  color: #9aa1b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.feature-settings-btn {
  width: 52px;
  height: 52px;
  margin: auto auto 0 4px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: rgba(255,255,255,.82);
  box-shadow: 0 18px 46px rgba(42,39,120,.16), inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(16px) scale(.96);
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), opacity 260ms ease, box-shadow 180ms ease;
}
.feature-shell.menu-open .feature-settings-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 150ms;
}
.feature-settings-btn:active {
  transform: translateY(1px) scale(.94);
}
.feature-settings-btn svg {
  width: 21px;
  height: 21px;
}
.main-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,247,255,0.94));
  box-shadow: -18px 0 44px rgba(42,39,120,.12);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), border-radius 320ms cubic-bezier(.2,.8,.2,1), scale 320ms cubic-bezier(.2,.8,.2,1);
  transform-origin: left center;
}
.feature-shell.menu-open .main-stage {
  border-radius: 30px 0 0 30px;
  transform: translateX(236px) scale(.965);
}
.stage-scrim {
  position: absolute;
  inset: 0;
  z-index: 1200;
  border: 0;
  padding: 0;
  background: rgba(18,19,38,.04);
}

/* Shared navigation */
.topbar {
  position: fixed;
  top: var(--safe-top);
  left: 50%;
  right: auto;
  z-index: 1000;
  width: min(100vw, 520px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  align-items: center;
  height: var(--nav-height);
  padding: 0 14px;
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid rgba(115,101,246,.08);
}
.nav-center { text-align: center; min-width: 0; }
.nav-title {
  display: block;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.04em;
}
.nav-subtitle {
  display: block;
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  margin-top: -2px;
}
.nav-left, .nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-left { justify-content: flex-start; }
.nav-actions { justify-content: flex-end; }
.nav-text-btn {
  min-width: 54px;
  height: 38px;
  border: 1px solid rgba(115,101,246,.12);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #343650;
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 22px rgba(50,51,100,.06);
  font-size: 13px;
  font-weight: 900;
}
.nav-text-btn.primary {
  color: var(--brand);
  background: rgba(115,101,246,.1);
}
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(115,101,246,.12);
  background: rgba(255,255,255,.72);
  color: #343650;
  border-radius: 16px;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(50,51,100,.06);
}
.icon-btn.primary { background: rgba(115,101,246,.1); color: var(--brand); }
.chat-list-entry { position: relative; color: var(--brand); }
.chat-list-entry svg { width: 24px; height: 24px; }
.chat-list-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #f43f70;
  box-shadow: 0 3px 8px rgba(244,63,112,.22);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.icon-btn:focus-visible, .nav-text-btn:focus-visible, .guide-entry:focus-visible, .hello-btn:focus-visible, .local-phone-btn:focus-visible, .composer-input:focus-visible, .banner-main:focus-visible, .banner-close:focus-visible {
  outline: 3px solid rgba(115,101,246,.25);
  outline-offset: 2px;
}

.chat-page {
  display: flex;
  flex-direction: column;
  height: var(--app-height);
  overflow: hidden;
  padding-top: calc(var(--topbar-height) + var(--assistant-strip-height));
}
.chat-page.assist-hidden {
  padding-top: var(--topbar-height);
}
.direct-chat-page,
.direct-chat-page.assist-hidden {
  padding-top: var(--topbar-height);
}
.quota-strip {
  width: calc(100% - 18px);
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 22px rgba(50,51,100,.06);
}
.quota-counts {
  display: grid;
  gap: 12px;
  color: #4b4c68;
  font-size: 13px;
  line-height: 1.3;
}
.quota-counts > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  white-space: nowrap;
}
.quota-counts strong {
  margin-left: auto;
  color: var(--brand);
  font-size: 17px;
  font-variant-numeric: tabular-nums lining-nums;
}
.quota-refresh {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.direct-chat-page .chat-feed {
  padding-top: 14px;
}
.direct-chat-page .composer {
  background: linear-gradient(180deg, rgba(247,249,255,0), rgba(247,249,255,.96) 24%, rgba(247,249,255,.99));
}
.assist-strip {
  position: fixed;
  top: var(--topbar-height);
  left: 50%;
  right: auto;
  z-index: 990;
  width: min(100vw, 520px);
  transform: translateX(-50%);
  padding: 12px 16px 6px;
  background: linear-gradient(180deg, rgba(247,249,255,.96), rgba(247,249,255,.76));
}
.banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(115,101,246,1), rgba(78,157,255,0.94)),
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.5), transparent 24%);
  box-shadow: 0 18px 40px rgba(115,101,246,.25);
}
.banner-main {
  min-width: 0;
  flex: 1;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}
.banner-spark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
}
.banner-spark svg { width: 24px; height: 24px; }
.banner-text { min-width: 0; }
.banner-title { display: block; font-weight: 900; font-size: 15px; }
.banner-copy { display: block; opacity: .86; font-size: 12px; margin-top: 2px; }
.banner-chevron { margin-left: auto; opacity: .9; }
.banner-close {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255,255,255,.16);
}
.banner-close svg { width: 17px; height: 17px; }

.chat-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px calc(168px + var(--keyboard-inset));
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
}
.chat-page.attachment-open .chat-feed {
  padding-bottom: calc(168px + var(--attachment-push) + var(--keyboard-inset));
}
.chat-page.attachment-opening .chat-feed {
  animation: feedPushUp 300ms cubic-bezier(.2,.78,.18,1) both;
}
.chat-page.attachment-closing .chat-feed {
  animation: feedPushDown 260ms cubic-bezier(.2,.78,.18,1) both;
}
@keyframes feedPushUp {
  from { padding-bottom: calc(168px + var(--keyboard-inset)); }
  to { padding-bottom: calc(168px + var(--attachment-push) + var(--keyboard-inset)); }
}
@keyframes feedPushDown {
  from { padding-bottom: calc(168px + var(--attachment-push) + var(--keyboard-inset)); }
  to { padding-bottom: calc(168px + var(--keyboard-inset)); }
}
.day-label {
  width: fit-content;
  margin: 10px auto 18px;
  color: #878da8;
  font-size: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
}
.message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 14px 0;
}
.message-row.user { justify-content: flex-end; }
.message-row.direct.them { justify-content: flex-start; }
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #83c8ff);
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(115,101,246,.22);
}
.avatar.has-image {
  color: transparent;
}
.message-row.user .avatar { order: 2; background: #121326; }
.direct-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 13px;
}
.message-row.direct.them .direct-avatar {
  background: linear-gradient(145deg, var(--brand), #85ccff);
}
.message-row.direct.user .direct-avatar {
  background: linear-gradient(145deg, #121326, #4b5563);
}
.bubble-wrap { max-width: min(78%, 350px); }
.sender {
  display: block;
  color: #7d829d;
  font-size: 11px;
  margin: 0 0 5px 2px;
}
.message-row.user .sender { text-align: right; margin-right: 2px; }
.bubble {
  border-radius: 22px;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.75;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(52,54,80,.07);
  border: 1px solid rgba(115,101,246,.08);
  white-space: pre-wrap;
}
.message-row.ai .bubble,
.message-row.them .bubble { border-top-left-radius: 8px; background: #fff; }
.welcome-typing-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.18em;
  border-radius: 999px;
  background: var(--brand);
  animation: welcomeCaretBlink .82s steps(2, start) infinite;
}
.message-row.user .bubble {
  border-top-right-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #5c87ff);
  border: 0;
}
.quick-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 6px 46px;
  margin-top: -2px;
}
.chip {
  flex: 0 0 auto;
  border: 1px solid rgba(115,101,246,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  color: #535778;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}

.online-message {
  align-items: flex-end;
}
.online-bubble-wrap {
  max-width: min(86%, 410px);
}
.online-bubble {
  width: 100%;
  padding: 14px;
  white-space: normal;
  line-height: 1.4;
}
.online-card-title {
  color: #191a33;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.online-card-subtitle {
  margin-top: 4px;
  color: #7d829d;
  font-size: 12px;
  line-height: 1.5;
}
.online-user-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}
.online-user-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(128px, auto);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8faff, #fff);
  box-shadow: 0 8px 20px rgba(52,54,98,.045);
  cursor: pointer;
}
.online-user-card:focus-visible {
  outline: 3px solid rgba(115,101,246,.25);
  outline-offset: 2px;
}
.online-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #7ecaff);
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
}
.online-user-avatar.has-image {
  color: transparent;
}
.online-user-main {
  min-width: 0;
}
.online-user-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.online-user-name {
  min-width: 0;
  overflow: hidden;
  color: #20223e;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #171733, var(--brand), #4e9dff);
  box-shadow: 0 4px 10px rgba(115,101,246,.18);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .08em;
}
.online-user-tags {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  overflow: hidden;
}
.online-user-tags span {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 64px;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 999px;
  color: #7365f6;
  background: rgba(115,101,246,.08);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.online-user-card .online-user-tags { flex-wrap: wrap; overflow: visible; }
.online-user-card .online-user-tags span { max-width: 100%; }
.online-user-card .physical-tags { gap: 3px; }
.online-user-card .physical-tags span { padding: 0; color: var(--muted); background: transparent; font-weight: 500; line-height: 1.5; overflow: visible; }
.online-user-card .physical-tags span + span::before { content: "/"; padding-right: 3px; color: var(--muted); }
.online-user-card .personal-tags span { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.profile-id-main h1, .dating-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bubble .member-badge, .precise-photo-caption .member-badge { margin-left: 5px; vertical-align: middle; }
.online-card-lock-stage {
  position: relative;
  margin-top: 12px;
}
.online-card-lock-stage .online-user-grid {
  margin-top: 0;
}
.online-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.complete-profile-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(115,101,246,.14);
  border-radius: 999px;
  background: #fff;
  color: #6b7190;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(52,54,98,.06);
}
.complete-profile-hint::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-left: 6px solid #fff;
  transform: translateY(-50%);
  filter: drop-shadow(1px 0 0 rgba(115,101,246,.14));
}
.complete-profile-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #5c87ff);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(115,101,246,.22);
}
.complete-profile-btn svg {
  flex: 0 0 auto;
}
.refresh-card-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(115,101,246,.1);
}
.refresh-card-btn svg {
  flex: 0 0 auto;
}
.plus-locked-bubble .online-user-grid {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}
.plus-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.52);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
  backdrop-filter: blur(12px) saturate(1.08);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: inset 0 0 0 1px rgba(115,101,246,.08);
  text-align: center;
}
.plus-lock-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #171733, var(--brand));
}
.plus-lock-title {
  color: #171733;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.03em;
}
.plus-lock-copy {
  color: #656a88;
  font-size: 12px;
  line-height: 1.45;
}
.plus-lock-btn {
  min-width: 82px;
  min-height: 34px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #4e9dff);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(115,101,246,.22);
}
.online-card-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.hello-btn,
.appointment-btn {
  min-width: 58px;
  min-height: 32px;
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
}
.hello-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #4e9dff);
}
.appointment-btn {
  color: var(--brand);
  background: rgba(115,101,246,.1);
  box-shadow: inset 0 0 0 1px rgba(115,101,246,.12);
}
.hello-btn.locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 76px;
  background: linear-gradient(135deg, #171733, #7365f6);
}
.lock-icon {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
}
.lock-icon svg {
  width: 14px;
  height: 14px;
}

.ai-progress {
  animation: aiProgressIn 220ms ease both;
}
.ai-status-bubble {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #505579;
  background:
    radial-gradient(circle at 12% 20%, rgba(154,231,255,.32), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(244,246,255,.96));
}
.ai-status-bubble strong {
  color: var(--brand);
  letter-spacing: .01em;
}
.status-pulse {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand), #4e9dff);
  box-shadow: 0 0 0 0 rgba(115,101,246,.28);
  animation: statusPulse 1.08s ease-in-out infinite;
}
.ai-progress.typing .status-pulse {
  background: linear-gradient(145deg, #4e9dff, #69cfff);
}
.typing-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--brand);
  margin-right: 5px;
  animation: blink 1s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; margin-right: 0; }
.typing-reply {
  min-width: 44px;
}
.typing-caret {
  width: 2px;
  height: 1.2em;
  display: inline-block;
  margin-left: 2px;
  vertical-align: -0.2em;
  border-radius: 999px;
  background: var(--brand);
  animation: caretBlink .72s steps(1) infinite;
}
@keyframes aiProgressIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes statusPulse { 0%, 100% { transform: scale(.86); box-shadow: 0 0 0 0 rgba(115,101,246,.28); } 50% { transform: scale(1); box-shadow: 0 0 0 7px rgba(115,101,246,0); } }
@keyframes caretBlink { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes welcomeCaretBlink { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

.composer {
  position: fixed;
  left: 50%;
  bottom: var(--keyboard-inset);
  z-index: 1000;
  width: min(100vw, 520px);
  transform: translateX(-50%);
  padding: 12px 14px calc(14px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(247,249,255,0), rgba(247,249,255,.94) 24%, rgba(247,249,255,.98));
  transition: bottom .2s ease;
}
.chat-page.attachment-opening .composer {
  animation: composerPushUp 300ms cubic-bezier(.2,.78,.18,1) both;
}
.chat-page.attachment-closing .composer {
  animation: composerPushDown 260ms cubic-bezier(.2,.78,.18,1) both;
}
@keyframes composerPushUp {
  from { transform: translate(-50%, var(--attachment-push)); }
  to { transform: translate(-50%, 0); }
}
@keyframes composerPushDown {
  from { transform: translate(-50%, calc(-1 * var(--attachment-push))); }
  to { transform: translate(-50%, 0); }
}
html.keyboard-open .composer {
  padding-bottom: 12px;
}


.guide-entries {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  overflow-y: visible;
  margin: -10px 2px 8px;
  padding: 10px 0 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.guide-entries::-webkit-scrollbar { display: none; }
.guide-entry {
  width: auto;
  min-width: max-content;
  min-height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(115,101,246,.12);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  color: #343650;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 30px rgba(52,54,98,.11);
  font-size: 14px;
  font-weight: 900;
}
.guide-entry.icon-only {
  width: 42px;
  min-width: 42px;
  padding: 0;
}
.guide-icon {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  color: var(--brand);
}
.guide-icon svg {
  width: 18px;
  height: 18px;
}
.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.composer-box {
  overflow: hidden;
  border-radius: 27px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(115,101,246,.14);
  box-shadow: 0 18px 52px rgba(52,54,98,.16);
  backdrop-filter: blur(18px);
}
.selected-photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px 0;
}
.selected-photo {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 17px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.selected-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(18,19,38,.82);
  box-shadow: 0 6px 16px rgba(18,19,38,.2);
}
.selected-photo-remove svg {
  width: 13px;
  height: 13px;
}
.composer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 8px 9px 8px 16px;
}
.composer-box.multiline .composer-inner {
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: stretch;
  padding: 10px 9px 9px 16px;
}
.composer-input {
  width: 100%;
  max-height: 112px;
  border: 0;
  outline: 0;
  resize: none;
  overflow-y: auto;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  line-height: 1.35;
}
.composer-box.multiline .composer-input {
  min-height: 42px;
  padding-top: 2px;
}
.composer-input::placeholder { color: #9aa0bd; }
.composer-input:focus,
.composer-input:focus-visible {
  outline: 0;
  outline-offset: 0;
}
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.composer-box.multiline .composer-actions {
  width: 100%;
}
.round-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 17px;
  display: inline-grid;
  place-items: center;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  transition: background .18s ease;
}
.round-btn.add svg {
  transition: transform .18s ease;
}
.round-btn.add.open {
  background: rgba(115,101,246,.16);
}
.round-btn.add.open svg {
  transform: rotate(45deg);
}
.round-btn.send {
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #4e9dff);
  box-shadow: 0 12px 28px rgba(115,101,246,.25);
}
.round-btn.voice { color: #fff; background: linear-gradient(145deg, var(--brand), #75bcff); }
.round-btn.voice.listening {
  background: linear-gradient(145deg, #ff5f8f, #7365f6);
  box-shadow: 0 0 0 6px rgba(255,95,143,.13), 0 12px 28px rgba(115,101,246,.25);
  animation: listenPulse 1.1s ease-in-out infinite;
}
@keyframes listenPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.attachment-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(115,101,246,.12);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 44px rgba(52,54,98,.12);
}
.photo-picker-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.photo-picker-action,
.recent-photo {
  position: relative;
  width: 72px;
  aspect-ratio: 1;
  flex: 0 0 72px;
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
}
.photo-picker-action {
  border: 1px solid rgba(115,101,246,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), 0 8px 18px rgba(52,54,98,.08);
}
.photo-picker-action {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #343650;
  background: linear-gradient(180deg, #fff, #f8faff);
  font-size: 12px;
  font-weight: 900;
}
.photo-picker-icon {
  font-size: 22px;
  line-height: 1;
}
.recent-photo {
  min-width: 72px;
  border: 0;
  box-shadow: none;
}
.recent-photo.selected {
  box-shadow: inset 0 0 0 2px var(--brand);
}
.photo-check {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(18,19,38,.35);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
}
.recent-photo.selected .photo-check {
  background: var(--brand);
  opacity: 1;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: end center;
  padding: 16px;
  background:
    radial-gradient(circle at 82% 18%, rgba(154,231,255,.36), transparent 32%),
    radial-gradient(circle at 12% 78%, rgba(115,101,246,.34), transparent 34%),
    linear-gradient(145deg, rgba(18,19,38,.42), rgba(55,50,139,.42));
  backdrop-filter: blur(12px);
  animation: modalGradientIn 220ms ease both;
}
@keyframes modalGradientIn {
  from { opacity: 0; filter: saturate(.85); }
  to { opacity: 1; filter: saturate(1); }
}
.modal-card {
  width: min(100%, 470px);
  padding: 20px;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 34px;
  background:
    radial-gradient(circle at 14% 0%, rgba(154,231,255,.36), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(115,101,246,.18), transparent 36%),
    linear-gradient(160deg, rgba(255,255,255,.98), rgba(245,247,255,.94));
  box-shadow: 0 32px 90px rgba(18,19,38,.28);
  animation: sheet 300ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes sheet { from { transform: translateY(30px) scale(.98); opacity: .25; } to { transform: translateY(0) scale(1); opacity: 1; } }

.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: end center;
  padding: 0 10px 10px;
  background: linear-gradient(180deg, rgba(18,19,38,.02), rgba(18,19,38,.3));
  backdrop-filter: blur(5px);
  animation: modalGradientIn 180ms ease both;
}
.bottom-sheet {
  width: min(100%, 500px);
  max-height: min(86dvh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 34px 34px 28px 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(154,231,255,.3), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,248,255,.98));
  box-shadow: 0 -18px 70px rgba(18,19,38,.28);
  animation: plusSheetUp 300ms cubic-bezier(.2,.8,.2,1) both;
}
.bottom-sheet-grabber {
  width: 44px;
  height: 5px;
  margin: 10px auto 8px;
  border-radius: 999px;
  background: rgba(115,101,246,.18);
}
.bottom-sheet-head {
  height: 48px;
  padding: 0 12px 8px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 6px;
}
.bottom-sheet-head h2 {
  margin: 0;
  color: #1b1d33;
  font-size: 20px;
  text-align: center;
  letter-spacing: -0.045em;
}
.bottom-sheet-back {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #4d526d;
  background: rgba(115,101,246,.08);
}
.settings-sheet .bottom-sheet-back,
.profile-sheet:not(.editing) .bottom-sheet-back {
  opacity: 0;
  pointer-events: none;
}
.bottom-sheet-close {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(115,101,246,.08);
  color: #4d526d;
  box-shadow: none;
}
.bottom-sheet-body {
  max-height: calc(min(86dvh, 760px) - 71px);
  overflow-y: auto;
  padding: 0 12px calc(16px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}
.profile-sheet-hero {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  border-radius: 28px;
  padding: 92px 16px 16px;
  display: grid;
  align-content: end;
  gap: 14px;
  color: #fff;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 18px 42px rgba(42,39,120,.18);
}
.profile-sheet-stack {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}
.profile-sheet-stack .profile-info-card,
.profile-sheet-stack .profile-photo-section {
  box-shadow: none;
}
.profile-edit-sheet-btn,
.profile-photo-sheet-add {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #4e9dff);
  box-shadow: 0 14px 30px rgba(78,96,220,.22);
  font-weight: 950;
}
.profile-edit-sheet-btn svg {
  width: 18px;
  height: 18px;
}
.profile-photo-sheet-add {
  color: var(--brand);
  background: rgba(115,101,246,.1);
  box-shadow: none;
}
.profile-sheet-edit-form {
  padding-bottom: 0;
}
.profile-sheet-edit-form .edit-card {
  grid-template-columns: 1fr;
}
.settings-sheet {
  max-height: min(68dvh, 520px);
}
.settings-sheet .bottom-sheet-body {
  max-height: calc(min(68dvh, 520px) - 71px);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-kicker { color: var(--brand); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.modal-title { margin: 4px 0 4px; font-size: 28px; letter-spacing: -0.05em; }
.modal-subtitle { max-width: 330px; margin: 0; color: #5f6384; line-height: 1.7; }
.qr-panel {
  margin: 22px 0 18px;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 28px;
  background: linear-gradient(180deg, #f8faff, #fff);
}
.qr-code {
  width: 148px;
  height: 148px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, #121326 10px, transparent 10px) 0 0/26px 26px,
    linear-gradient(#121326 10px, transparent 10px) 0 0/26px 26px,
    radial-gradient(circle at 19px 19px, #121326 0 17px, transparent 18px),
    radial-gradient(circle at 129px 19px, #121326 0 17px, transparent 18px),
    radial-gradient(circle at 19px 129px, #121326 0 17px, transparent 18px),
    #fff;
  border: 12px solid #f2f4ff;
  box-shadow: inset 0 0 0 1px rgba(115,101,246,.12), 0 16px 34px rgba(52,54,98,.11);
}
.qr-meta {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #656a88;
  font-size: 13px;
  line-height: 1.4;
}
.qr-meta-label { color: #8b91aa; font-weight: 800; }
.wx-id {
  display: inline-flex;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  font-weight: 900;
  letter-spacing: .02em;
}
.dating-backdrop {
  place-items: end center;
  padding: 0 10px;
}
.dating-sheet {
  position: relative;
  width: min(100%, 520px);
  height: min(67dvh, 620px);
  overflow: hidden;
  padding: 18px 18px calc(88px + var(--safe-bottom));
  border: 1px solid rgba(255,255,255,.7);
  border-bottom: 0;
  border-radius: 32px 32px 0 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(154,231,255,.42), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(115,101,246,.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(245,247,255,.98));
  box-shadow: 0 -18px 70px rgba(18,19,38,.28);
  animation: plusSheetUp 300ms cubic-bezier(.2,.8,.2,1) both;
  transition: height 320ms cubic-bezier(.2,.8,.2,1), border-radius 320ms cubic-bezier(.2,.8,.2,1);
}
.dating-sheet.expanded {
  height: 100dvh;
  border-radius: 0;
}
.dating-grabber {
  width: 46px;
  height: 22px;
  margin: -6px auto 6px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
}
.dating-grabber::before {
  content: "";
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: rgba(115,101,246,.18);
}
.dating-sheet-body {
  height: 100%;
  overflow-y: auto;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.dating-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
}
.dating-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 48px;
}
.dating-intro {
  margin: 14px 0 0;
  color: #30334f;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.55;
}
.dating-avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #85ccff);
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(115,101,246,.22);
  font-size: 24px;
  font-weight: 950;
}
.dating-avatar.has-image {
  color: transparent;
}
.dating-kicker {
  color: var(--brand);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .16em;
}
.dating-title {
  margin: 5px 0 8px;
  color: #151626;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.055em;
}
.dating-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.dating-tags span {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(115,101,246,.08);
  font-size: 10px;
  font-weight: 850;
}
.dating-photo-wall {
  display: grid;
  grid-template-columns: 1.28fr 1fr 1fr;
  grid-auto-rows: 76px;
  gap: 8px;
  margin-top: 18px;
}
.dating-photo {
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 8px 18px rgba(52,54,98,.08);
}
.dating-photo.large {
  grid-row: span 2;
  border-radius: 22px;
}
.dating-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.dating-info {
  padding: 12px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
}
.dating-info.wide { grid-column: 1 / -1; }
.dating-info span {
  display: block;
  color: #8b91aa;
  font-size: 11px;
  font-weight: 800;
}
.dating-info strong {
  display: block;
  margin-top: 5px;
  color: #252742;
  font-size: 14px;
  line-height: 1.25;
}
.dating-interest-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
}
.dating-interest-card > span {
  color: #8b91aa;
  font-size: 11px;
  font-weight: 900;
}
.dating-action-row {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(16px + var(--safe-bottom));
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 10px;
  margin-top: 0;
  padding-top: 14px;
  background: linear-gradient(180deg, rgba(246,248,255,0), rgba(246,248,255,.98) 34%);
}
.dating-hello-btn,
.dating-appointment-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 950;
}
.dating-hello-btn {
  color: var(--brand);
  background: rgba(115,101,246,.1);
  box-shadow: inset 0 0 0 1px rgba(115,101,246,.12);
}
.dating-appointment-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #4e9dff);
  box-shadow: 0 18px 40px rgba(115,101,246,.25);
}

.appointment-bubble-wrap {
  max-width: min(88%, 430px);
}
.appointment-combined-bubble {
  width: 100%;
  display: grid;
  gap: 14px;
  padding: 15px 16px 16px;
  white-space: normal;
}
.appointment-section + .appointment-section {
  padding-top: 14px;
  border-top: 1px solid rgba(115,101,246,.08);
}
.appointment-title {
  margin: 0 0 5px;
  color: #191a33;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.appointment-subtitle {
  max-width: none;
  margin: 0;
  color: #656a88;
  font-size: 13px;
}
.appointment-match-section {
  display: grid;
  gap: 10px;
  line-height: 1.6;
}
.appointment-match-section p {
  margin: 0;
  color: #535778;
}
.appointment-qr-section {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.appointment-avatars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 7px;
  border-radius: 999px;
  background: rgba(245,247,255,.9);
  box-shadow: inset 0 0 0 1px rgba(115,101,246,.1);
}
.appointment-avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #85ccff);
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(115,101,246,.16);
}
.appointment-avatar.has-image {
  color: transparent;
}
.appointment-heart {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin: 0 -4px;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff7aae, #7365f6);
  box-shadow: 0 8px 18px rgba(255,122,174,.22);
  font-size: 13px;
  font-weight: 950;
  z-index: 1;
}
.appointment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.plus-backdrop {
  place-items: end center;
  padding: 0 10px;
}
.plus-sheet {
  position: relative;
  width: min(100%, 520px);
  max-height: 80dvh;
  overflow-y: auto;
  padding: 22px 18px calc(14px + var(--safe-bottom));
  border: 1px solid rgba(255,255,255,.7);
  border-bottom: 0;
  border-radius: 32px 32px 0 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(154,231,255,.46), transparent 30%),
    radial-gradient(circle at 92% 6%, rgba(115,101,246,.2), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(245,247,255,.98));
  box-shadow: 0 -18px 70px rgba(18,19,38,.28);
  animation: plusSheetUp 300ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes plusSheetUp {
  from { transform: translateY(38px); opacity: .35; }
  to { transform: translateY(0); opacity: 1; }
}
.plus-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
}
.plus-head {
  padding: 8px 48px 18px 2px;
}
.plus-kicker {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}
.plus-title {
  margin: 14px 0 8px;
  color: #151626;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.055em;
}
.plus-brand-word {
  display: inline-block;
  color: var(--brand);
  font-weight: 950;
  letter-spacing: -0.08em;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.plus-subtitle {
  margin: 0;
  color: #626783;
  font-size: 14px;
  line-height: 1.7;
}
.plus-table-wrap {
  overflow: hidden;
  border: 1px solid rgba(115,101,246,.12);
  border-radius: 24px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 14px 36px rgba(52,54,98,.08);
}
.plus-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.plus-table th,
.plus-table td {
  padding: 13px 10px;
  border-bottom: 1px solid rgba(18,19,38,.06);
  text-align: center;
}
.plus-table th:first-child,
.plus-table td:first-child {
  text-align: left;
  font-weight: 900;
}
.plus-table th {
  color: #565b78;
  background: rgba(115,101,246,.07);
  font-weight: 900;
}
.plus-table th:last-child,
.plus-table td:last-child {
  color: var(--brand);
  font-weight: 900;
  background: rgba(115,101,246,.045);
}
.plus-table tr:last-child td { border-bottom: 0; }
.plus-table-icon {
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
}
.plus-table-icon svg {
  width: 18px;
  height: 18px;
}
.plus-table-icon.check {
  color: var(--brand);
}
.plus-table-icon.minus {
  color: #a0a6bb;
}
.plus-upgrade-btn {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, #171733, var(--brand) 52%, #4e9dff);
  box-shadow: 0 18px 40px rgba(115,101,246,.28);
  font-weight: 900;
}
.plus-note {
  margin: 10px 0 0;
  color: #8b91aa;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.copy-btn,
.save-qr-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  font-weight: 900;
}
.copy-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #4e9dff);
  box-shadow: 0 16px 34px rgba(115,101,246,.25);
}
.save-qr-btn {
  border: 1px solid rgba(115,101,246,.14);
  color: var(--brand);
  background: rgba(115,101,246,.08);
}

/* Lists and profile */
.content-page {
  display: flex;
  flex-direction: column;
  padding-top: var(--topbar-height);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(246,248,255,.96));
}
.page-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 34px;
  -webkit-overflow-scrolling: touch;
}
.section-title { margin: 8px 0 14px; font-size: 26px; letter-spacing: -0.055em; }
.chat-list { display: grid; gap: 0; }
.conversation-card {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(18, 19, 38, 0.06);
  background: transparent;
  border-radius: 0;
  padding: 12px 2px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
  text-align: left;
  box-shadow: none;
}
.conversation-card:last-child { border-bottom: 0; }
.conversation-card.unread {
  background: linear-gradient(90deg, rgba(115,101,246,.085), rgba(255,255,255,0) 76%);
}
.conversation-card > span:nth-child(2) { min-width: 0; }
.conv-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  grid-row: 1 / span 2;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(145deg, var(--brand), #85ccff);
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
}
.conv-avatar.has-image {
  color: transparent;
}
.conversation-card.unread .conv-avatar::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff3b6b;
  box-shadow: 0 4px 10px rgba(255,59,107,.34);
}
.conv-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.conv-name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #151626;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conv-msg {
  margin: 6px 0 0;
  color: #9aa0ad;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-card.unread .conv-name {
  color: #111225;
  font-weight: 900;
}
.conversation-card.unread .conv-msg {
  color: #3d4261;
  font-weight: 850;
}
.conv-time {
  align-self: start;
  color: #9aa0ad;
  font-size: 13px;
  line-height: 1.25;
  padding-top: 1px;
}
.conversation-card.unread .conv-time {
  color: var(--brand);
  font-weight: 900;
}
.chat-list-body {
  padding-top: 10px;
}
.profile-page-body {
  display: grid;
  gap: 14px;
  padding-top: 14px;
}
.profile-banner-wrap,
.profile-plus-wrap {
  margin: 0;
}
.profile-hero {
  overflow: hidden;
  border: 1px solid rgba(115,101,246,.12);
  border-radius: 32px;
  padding: 18px;
  background:
    radial-gradient(circle at 85% 10%, rgba(154,231,255,.55), transparent 28%),
    linear-gradient(145deg, rgba(115,101,246,.95), rgba(87,139,255,.95));
  color: #fff;
  box-shadow: 0 18px 48px rgba(115,101,246,.22);
}
.profile-top { display: flex; gap: 14px; align-items: center; }
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.2);
  font-size: 31px;
  font-weight: 900;
}
.profile-name { margin: 0; font-size: 24px; letter-spacing: -0.04em; }
.profile-desc { margin: 5px 0 0; opacity: .85; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.profile-tags span { padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.18); font-size: 12px; font-weight: 800; }
.profile-plus-banner {
  width: 100%;
  min-height: 78px;
  border: 0;
  border-radius: 26px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  color: #fff;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.32), transparent 22%),
    linear-gradient(135deg, #181831, var(--brand), #4e9dff);
  box-shadow: 0 16px 40px rgba(82,92,210,.24);
}
.plus-banner-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.plus-banner-kicker {
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}
.plus-banner-title {
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.035em;
}
.plus-banner-action {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #272846;
  background: #fff;
  font-size: 13px;
  font-weight: 950;
}
.profile-menu {
  overflow: hidden;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 34px rgba(47,56,132,.08);
}
.profile-menu-item {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid rgba(18,19,38,.06);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #252842;
  background: transparent;
  font-weight: 850;
  text-align: left;
}
.profile-menu-item:last-child {
  border-bottom: 0;
}
.profile-menu-item .menu-caret {
  color: #b0b5c6;
  font-size: 22px;
  line-height: 1;
}
.profile-menu-item .menu-value {
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-remark-input {
  width: 65%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
  text-align: right;
  text-overflow: ellipsis;
}
.contact-remark-input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  color: var(--ink);
}
.profile-menu-item.logout {
  color: #ff4f77;
}
.account-cancel-empty {
  text-align: center;
}
.account-cancel-warning {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255,79,119,.16);
  border-radius: 18px;
  padding: 14px;
  color: #b03c60;
  background: rgba(255,79,119,.08);
}
.account-cancel-warning strong {
  color: #d83361;
  font-size: 15px;
  font-weight: 950;
}
.account-cancel-warning p {
  margin: 0;
  color: #a24a68;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
}
.profile-save-btn.danger {
  background: linear-gradient(135deg, #ff4f77, #e23860);
  box-shadow: 0 16px 34px rgba(255,79,119,.24);
}
.logout-btn {
  width: 100%;
  margin-top: 18px;
  min-height: 52px;
  border: 1px solid rgba(115,101,246,.14);
  border-radius: 18px;
  background: rgba(115,101,246,.08);
  color: var(--brand);
  font-weight: 900;
}
.profile-page {
  height: var(--app-height);
  overflow: hidden;
  background: linear-gradient(180deg, #f6f8ff 0%, #eef3ff 100%);
}
.profile-shell {
  height: 100%;
  overflow-y: auto;
  background: linear-gradient(180deg, #f6f8ff 0%, #eef3ff 100%);
}
.profile-immersive-hero {
  position: relative;
  min-height: 284px;
  padding: calc(var(--safe-top) + 54px) 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  overflow: hidden;
  color: #fff;
  background-size: cover !important;
  background-position: center !important;
  border-radius: 0 0 34px 34px;
  box-shadow: 0 22px 58px rgba(42,39,120,.2);
}
.profile-cover-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(255,255,255,.28), transparent 24%),
    linear-gradient(180deg, rgba(13,15,34,.24), rgba(11,13,31,.74));
  pointer-events: none;
}
.profile-hero-actions,
.profile-identity,
.profile-stats,
.profile-back-btn {
  position: relative;
  z-index: 1;
}
.profile-back-btn {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  left: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(14,17,38,.28);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
.profile-hero-actions {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-edit-pill,
.profile-settings-btn {
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  background: rgba(14,17,38,.28);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 26px rgba(0,0,0,.16);
}
.profile-edit-pill {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
}
.profile-settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.profile-avatar-large,
.edit-avatar-preview {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255,255,255,.22);
  background-size: cover !important;
  background-position: center !important;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.25);
}
.profile-avatar-large {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  font-size: 34px;
}
.profile-avatar-large.has-image,
.edit-avatar-preview.has-image {
  color: transparent;
}
.profile-id-main { min-width: 0; padding-bottom: 3px; }
.profile-id-main h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.05em;
}
.profile-id-main p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  font-weight: 800;
}
.profile-id-main span {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  color: rgba(255,255,255,.94);
  background: rgba(255,255,255,.18);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-stats div {
  min-height: 74px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(16px);
}
.profile-stats strong {
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.profile-stats span {
  color: rgba(255,255,255,.76);
  font-size: 12px;
  font-weight: 900;
}
.profile-main-stack {
  display: grid;
  gap: 14px;
  padding: 16px 16px calc(32px + var(--safe-bottom));
}
.profile-photo-section,
.profile-info-card {
  padding: 16px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 28px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 34px rgba(47,56,132,.08);
}
.profile-info-card {
  display: grid;
  gap: 14px;
}
.profile-intro {
  margin: 0;
  color: #252842;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.55;
}
.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-info-item {
  min-width: 0;
  padding: 11px 12px;
  border-radius: 18px;
  background: rgba(246,248,255,.9);
}
.profile-info-item span {
  display: block;
  margin-bottom: 5px;
  color: #858ba4;
  font-size: 11px;
  font-weight: 900;
}
.profile-info-item strong {
  display: block;
  overflow: hidden;
  color: #252842;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-tag-list span {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  font-size: 12px;
  font-weight: 950;
}
.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.profile-section-head p {
  margin: 0;
  color: #6f7590;
  font-size: 13px;
  font-weight: 800;
}
.profile-photo-wall-wrap { position: relative; }
.profile-photo-wall {
  display: grid;
  grid-template-columns: 1.28fr 1fr 1fr;
  grid-auto-rows: 78px;
  gap: 8px;
}
.profile-photo {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background-size: cover !important;
  background-position: center !important;
}
.profile-photo.large {
  grid-row: span 2;
}
.profile-photo-add {
  position: fixed;
  right: max(18px, calc((100vw - 520px) / 2 + 18px));
  bottom: calc(22px + var(--safe-bottom));
  z-index: 35;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 30px rgba(78,96,220,.34);
}
.profile-edit-body,
.settings-body { padding-top: 16px; }
.profile-edit-form {
  display: grid;
  gap: 14px;
  padding-bottom: calc(20px + var(--safe-bottom));
}
.edit-media-card,
.edit-card {
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 28px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 14px 34px rgba(47,56,132,.08);
}
.edit-media-card { padding: 16px; display: grid; gap: 14px; }
.edit-media-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.edit-media-label,
.edit-field > span {
  display: block;
  margin-bottom: 8px;
  color: #858ba4;
  font-size: 12px;
  font-weight: 900;
}
.edit-label-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.edit-label-row span {
  margin: 0;
}
.ai-write-btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  font-size: 12px;
  font-weight: 950;
}
.edit-avatar-wrap {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
}
.edit-avatar-preview {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  font-size: 28px;
  background-color: var(--brand);
}
.avatar-camera-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border: 3px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 16px rgba(78,96,220,.25);
}
.avatar-camera-badge svg {
  width: 14px;
  height: 14px;
}
.edit-upload-btn,
.edit-cover-btn,
.profile-save-btn {
  border: 0;
  border-radius: 999px;
  font-weight: 950;
}
.edit-upload-btn {
  min-height: 38px;
  padding: 0 14px;
  color: var(--brand);
  background: rgba(115,101,246,.1);
}
.edit-cover-preview {
  min-height: 128px;
  border-radius: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  background-size: cover !important;
  background-position: center !important;
}
.edit-cover-btn {
  min-height: 36px;
  padding: 0 14px;
  color: #fff;
  background: rgba(18,19,38,.38);
  backdrop-filter: blur(12px);
}
.edit-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}
.edit-field.wide { grid-column: 1 / -1; }
.edit-input {
  width: 100%;
  border: 1px solid rgba(115,101,246,.12);
  border-radius: 16px;
  outline: 0;
  padding: 12px;
  color: #252842;
  background: rgba(246,248,255,.86);
  font-weight: 800;
}
.edit-input:focus,
.edit-input:focus-visible {
  border-color: rgba(115,101,246,.38);
  box-shadow: 0 0 0 3px rgba(115,101,246,.09);
}
.edit-textarea { resize: vertical; min-height: 84px; }
.profile-save-btn {
  min-height: 54px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 34px rgba(78,96,220,.26);
}
.settings-menu { margin-top: 4px; }
.settings-detail-card,
.settings-form,
.settings-user-list,
.about-card {
  display: grid;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 34px rgba(47,56,132,.08);
  overflow: hidden;
}
.settings-form {
  gap: 14px;
  padding: 16px;
  overflow: visible;
}
.settings-info-row {
  min-height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(18,19,38,.06);
}
.settings-info-row:last-child { border-bottom: 0; }
.settings-info-row span {
  color: #6f748e;
  font-size: 14px;
  font-weight: 850;
}
.settings-info-row strong {
  color: #252842;
  font-size: 14px;
  font-weight: 950;
  text-align: right;
}
.settings-user-row {
  min-height: 68px;
  padding: 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(18,19,38,.06);
}
.settings-user-row:last-child { border-bottom: 0; }
.settings-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #85ccff);
  background-size: cover !important;
  background-position: center !important;
  font-weight: 950;
  overflow: hidden;
}
.settings-user-avatar.has-image { color: transparent; }
.settings-user-main { min-width: 0; }
.settings-user-main strong,
.settings-user-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-user-main strong {
  color: #252842;
  font-size: 15px;
  font-weight: 950;
}
.settings-user-main span {
  margin-top: 4px;
  color: #8b91aa;
  font-size: 12px;
  font-weight: 800;
}
.settings-small-btn {
  min-height: 34px;
  border: 0;
  border-radius: 14px;
  padding: 0 12px;
  color: var(--brand);
  background: rgba(115,101,246,.1);
  font-size: 13px;
  font-weight: 900;
}
.about-card {
  justify-items: center;
  gap: 8px;
  padding: 24px 16px;
}
.about-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 34px rgba(115,101,246,.24);
  overflow: hidden;
}
.about-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.about-card h1 {
  margin: 6px 0 0;
  color: #151626;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.06em;
}
.about-card p {
  margin: 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 950;
}
.empty-state {
  padding: 28px 16px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 24px;
  color: #8b91aa;
  background: rgba(255,255,255,.72);
  text-align: center;
  font-size: 14px;
  font-weight: 850;
}
.direct-more-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(115,101,246,.1);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 34px rgba(47,56,132,.08);
}
.direct-more-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #85ccff);
  background-size: cover !important;
  background-position: center !important;
  font-weight: 950;
  overflow: hidden;
}
.direct-more-avatar.has-image { color: transparent; }
.direct-more-card strong {
  display: block;
  overflow: hidden;
  color: #151626;
  font-size: 17px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.direct-more-card span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #8b91aa;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.setting-switch {
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  position: relative;
  border-radius: 999px;
  background: #d9deea;
  transition: background 180ms ease;
}
.setting-switch i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(18,19,38,.18);
  transition: transform 180ms ease;
}
.setting-switch.on {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.setting-switch.on i {
  transform: translateX(20px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  z-index: 140;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(18,19,38,.9);
  color: #fff;
  font-size: 13px;
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.hidden { display: none !important; }

@media (min-width: 760px) {
  :root { --app-height: min(920px, calc(100vh - 48px)); --assistant-strip-height: 104px; }
  body { display: grid; place-items: center; padding: 24px; }
  .app-shell { height: var(--app-height); max-height: 920px; border-radius: 38px; }
  .topbar { top: calc(24px + var(--safe-top)); }
  .assist-strip { top: calc(24px + var(--topbar-height)); }
  .composer { position: fixed; left: 50%; bottom: calc(24px + var(--keyboard-inset)); width: min(100vw, 520px); border-radius: 0 0 38px 38px; }
}

@media (max-width: 360px) {
  :root { --assistant-strip-height: 108px; }
  .login-page { padding-inline: 16px; overflow-y: auto; }
  .login-card { min-height: 0; padding: 30px 22px 24px; }
  .logo-plate { width: 76px; height: 76px; margin-bottom: 18px; }
  .brand-title { font-size: 52px; }
  .slogan { margin: 12px 0 16px; }
  .auth-code-row .settings-small-btn { min-width: 82px; padding-inline: 8px; }
  .online-bubble { padding: 12px; }
  .online-user-card { grid-template-columns: 34px minmax(0, 1fr); }
  .online-user-avatar { width: 34px; height: 34px; }
  .online-card-ctas { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .hello-btn, .appointment-btn { width: 100%; }
  .topbar { grid-template-columns: 68px 1fr 68px; padding-inline: 10px; }
  .nav-text-btn { min-width: 48px; height: 36px; border-radius: 14px; }
  .icon-btn { width: 38px; height: 38px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}


/* Single-person recommendations are separate text and photo messages. */
.precise-photo-wrap { width: min(260px, 76%); }
.precise-photo-button { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: var(--bubble); text-align: left; color: var(--ink); }
.precise-photo-button img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.precise-photo-button img[hidden] { display: none; }
.precise-photo-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; font-size: 14px; line-height: 1.4; }
.precise-photo-caption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 28px 14px 14px; color: var(--white); background: linear-gradient(transparent, rgba(18,19,38,.78)); font-size: 14px; line-height: 1.4; }
.precise-photo-button:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; }

/* Discovery pages */
.discovery-body { padding-bottom: calc(32px + var(--safe-bottom)); font-kerning: normal; text-rendering: optimizeLegibility; }
.nearby-radar-panel { padding: 12px 0 22px; text-align: center; }
.nearby-radar { position: relative; width: min(248px, 75vw); aspect-ratio: 1; margin: 0 auto 22px; overflow: hidden; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 29px, var(--line) 30px 31px); }
.nearby-radar::before, .nearby-radar::after { content: ""; position: absolute; background: var(--line); }
.nearby-radar::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.nearby-radar::after { top: 50%; left: 0; right: 0; height: 1px; }
.radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg 270deg, var(--line) 315deg, var(--brand) 359deg, transparent 360deg); opacity: .6; animation: radarScan 1.8s linear infinite; }
.scan-complete .radar-sweep { display: none; }
.radar-center { position: absolute; z-index: 1; width: 58px; height: 58px; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 4px solid var(--white); border-radius: 50%; box-shadow: 0 0 0 8px var(--line); }
.radar-person { position: absolute; z-index: 1; width: 38px; height: 38px; border: 3px solid var(--white); border-radius: 50%; background-size: cover; background-position: center; }
.radar-person-0 { top: 14%; left: 25%; }
.radar-person-1 { top: 39%; right: 9%; }
.radar-person-2 { bottom: 12%; left: 21%; }
.radar-status h1, .visitors-intro h1 { margin: 0 0 9px; font-size: 22px; font-weight: 750; line-height: 1.3; }
.radar-status p, .visitors-intro p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.discovery-demo-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.discovery-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.discovery-section-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.scan-again-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 13px; background: var(--bubble); color: var(--brand); font-size: 13px; font-weight: 650; }
.discovery-hint { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.discovery-user-list { display: grid; gap: 12px; }
.discovery-user-list .online-user-card { padding: 14px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; grid-template-columns: 42px minmax(0, 1fr); }
.discovery-user-list .online-user-avatar { width: 42px; height: 42px; }
.discovery-user-list .online-card-ctas { grid-column: 2; justify-self: start; }
.discovery-user-list .online-user-tags { flex-wrap: wrap; overflow: visible; }
.discovery-user-list .online-user-tags span { max-width: none; font-size: 11px; line-height: 1.2; }
.discovery-user-list .hello-btn, .discovery-user-list .appointment-btn { min-height: 36px; padding: 6px 16px; }
.discovery-user-list .online-user-card:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
.discovery-loading, .discovery-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.45; }
.discovery-empty h2 { font-size: 18px; color: var(--ink); }
.visitors-intro { margin: 10px 0 28px; }
.visitor-time { margin: 0 0 6px 6px; color: var(--muted); font-size: 12px; }
.visitors-locked { position: relative; overflow: hidden; min-height: 420px; border-radius: 24px; }
.visitor-preview-list { display: grid; gap: 16px; filter: blur(5px); opacity: .65; user-select: none; pointer-events: none; }
.visitor-preview-record { display: grid; gap: 8px; }
.visitor-preview-time { width: 70px; height: 8px; margin-left: 8px; border-radius: 8px; background: var(--line); }
.visitor-preview-card { display: flex; align-items: center; gap: 12px; min-height: 100px; padding: 16px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.visitor-preview-avatar { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--brand); opacity: .22; }
.visitor-preview-info { flex: 1; min-width: 0; display: grid; gap: 9px; }
.visitor-preview-name { width: 60%; height: 12px; border-radius: 8px; background: var(--line); }
.visitor-preview-tags { display: flex; gap: 5px; }
.visitor-preview-tags i { width: 36px; height: 17px; border-radius: 12px; background: var(--line); }
.visitor-preview-action { width: 64px; height: 34px; border-radius: 12px; background: var(--brand); opacity: .3; }
.visitors-cover { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px; background: rgba(246,248,255,.6); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); text-align: center; }
.visitors-cover strong { margin-top: 14px; color: var(--ink); font-size: 18px; line-height: 1.3; }
.visitors-cover p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.visitors-unlock-footer { flex: 0 0 auto; padding: 14px 16px calc(14px + var(--safe-bottom)); background: var(--white); box-shadow: 0 -4px 18px var(--line); }
.visitors-unlock-btn { width: 100%; min-height: 50px; border: 0; border-radius: 18px; color: var(--white); background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-size: 16px; font-weight: 700; line-height: 1.3; }
.visitors-unlock-btn:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; }
.online-user-card.greet-only { grid-template-columns: 36px minmax(0, 1fr) 76px; }
.online-card-ctas.single-action { grid-template-columns: 1fr; }
@media (max-width: 360px) {
  .online-user-card.greet-only { grid-template-columns: 34px minmax(0, 1fr) 66px; }
  .greet-only .online-card-ctas { grid-column: auto; }
}
.discovery-user-list .physical-user-card { grid-template-columns: 42px minmax(0, 1fr) 76px; gap: 10px; }
.discovery-user-list .physical-user-card .online-card-ctas { grid-column: 3; grid-row: 1; justify-self: stretch; align-self: center; }
.discovery-user-list .physical-user-card .hello-btn { width: 100%; min-width: 0; padding: 8px 5px; }
.discovery-user-list .physical-user-card .physical-tags { gap: 4px; }
.discovery-user-list .physical-user-card .physical-tags span { color: var(--muted); background: transparent; }
@keyframes radarScan { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .radar-sweep { animation: none; opacity: .15; }
}

/* Prototype-only state controls, kept outside route content. */
.prototype-controller {
  position: fixed;
  z-index: 1100;
  width: 52px;
  height: 52px;
}
.prototype-trigger {
  width: 52px;
  height: 52px;
  padding: 5px 0 4px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #fff;
  background: #292e38;
  box-shadow: 0 5px 14px rgba(18,19,38,.2);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.prototype-trigger svg { width: 23px; height: 23px; pointer-events: none; }
.prototype-trigger:active { cursor: grabbing; }
.prototype-trigger:focus-visible, .prototype-option:focus-visible, .prototype-close:focus-visible {
  outline: 3px solid #4e9dff;
  outline-offset: 3px;
}
.prototype-panel {
  position: fixed;
  z-index: 1101;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid rgba(115,101,246,.2);
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 16px 48px rgba(25,29,89,.26);
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}
.prototype-panel[hidden] { display: none; }
.prototype-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 18px; }
.prototype-close { width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: var(--bubble); font-size: 24px; line-height: 1; }
.prototype-note { margin: 6px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.prototype-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 60px; padding: 9px 2px; border: 0; border-top: 1px solid var(--line); text-align: left; color: var(--ink); background: transparent; }
.prototype-option > span:first-child { display: grid; gap: 3px; min-width: 0; }
.prototype-option strong { font-size: 15px; }
.prototype-option small { color: var(--muted); font-size: 12px; }
.prototype-switch { flex: 0 0 42px; height: 25px; padding: 3px; border-radius: 99px; background: #d9deea; transition: background .16s ease; }
.prototype-switch i { display: block; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(18,19,38,.16); transition: transform .16s ease; }
.prototype-option[aria-pressed="true"] .prototype-switch { background: var(--brand); }
.prototype-option[aria-pressed="true"] .prototype-switch i { transform: translateX(17px); }
.profile-plus-banner.is-active { cursor: default; }
@media (prefers-reduced-motion: reduce) { .prototype-switch, .prototype-switch i { transition: none; } }

/* Message-level provenance and safety flows share the existing form palette. */
:root { --safety-danger: #b4233c; --safety-muted: #565d78; }
.prototype-option[hidden] { display: none; }
.ai-message-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; color: var(--safety-muted); font-size: 12px; line-height: 1.4; }
.ai-message-footer button, .message-failure button, .dating-report-btn { min-height: 36px; padding: 5px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--brand); font: inherit; cursor: pointer; }
.ai-message-footer button:hover, .dating-report-btn:hover { background: var(--bubble); }
.ai-stream-label { display: block; margin-top: 8px; color: var(--safety-muted); font-size: 12px; }
.message-row.user .ai-message-footer { color: var(--safety-muted); }
.failed-bubble { position: relative; }
.message-failure-icon { position: absolute; top: 50%; left: -28px; transform: translateY(-50%); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--safety-danger); color: var(--white); font-weight: 700; }
.message-failure { margin: 7px 0 0; max-width: 100%; color: var(--safety-danger); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.message-failure button { display: block; margin-left: auto; color: var(--safety-danger); }
.dating-report-btn { display: block; margin: 0 0 12px auto; color: var(--safety-muted); font-size: 13px; }
.safety-body { padding-bottom: calc(32px + var(--safe-bottom)); font-feature-settings: "kern" 1; text-rendering: optimizeLegibility; }
.safety-context { padding: 16px; margin-bottom: 20px; border-radius: 16px; background: var(--bubble); }
.safety-context > span { color: var(--safety-muted); font-size: 13px; }
.safety-context p { max-height: 160px; overflow: auto; margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.safety-reasons { min-width: 0; padding: 0; margin: 0 0 16px; border: 0; }
.safety-reasons legend { margin-bottom: 10px; font-size: 16px; font-weight: 600; }
.safety-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 12px 0; color: var(--ink); font-size: 15px; line-height: 1.45; cursor: pointer; }
.safety-choice input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); }
.safety-choice span { min-width: 0; overflow-wrap: anywhere; }
.safety-evidence { max-height: 140px; overflow: auto; border-top: 1px solid var(--line); }
.safety-note, .safety-result p { margin: 8px 0 16px; color: var(--safety-muted); font-size: 14px; line-height: 1.45; }
.safety-error { margin: 0; color: var(--safety-danger); font-size: 14px; line-height: 1.45; }
.safety-error:empty { display: none; }
.safety-result { margin: 24px 0; }
.safety-result-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; color: var(--brand); border-radius: 16px; background: var(--bubble); }
.safety-result-mark svg { width: 28px; height: 28px; }
.safety-result h1 { margin: 12px 0 8px; font-size: 22px; line-height: 1.25; }
.safety-details { margin-bottom: 24px; }
.safety-details p { margin: 0 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.safety-details p:last-child { margin-bottom: 0; }
.safety-details strong { display: block; margin-bottom: 5px; font-size: 13px; color: var(--safety-muted); }
.ai-message-footer button:focus-visible, .message-failure button:focus-visible, .dating-report-btn:focus-visible, .safety-choice input:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }
@media (max-width: 360px) { .ai-message-footer { gap: 2px 5px; } .safety-body { padding-left: 16px; padding-right: 16px; } }

/* Product dialogs must always take precedence over prototype controls. */
body:has(.modal-backdrop) .prototype-controller { visibility: hidden; }

/* 资料编辑公共组件。 */
.profile-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 6px 4px 0; }
.profile-section-heading h2 { margin: 0; color: var(--ink); font-size: 16px; }
.profile-section-heading > span { color: var(--muted); font-size: 11px; }
.profile-upload-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.profile-derived-age { grid-column: 1 / -1; margin: -2px 0 0; color: var(--muted); font-size: 12px; }
.profile-form-error { margin: 0; color: #b52d4c; font-size: 13px; line-height: 1.6; }
.profile-form-error:empty { display: none; }
.profile-edit-form button:disabled { opacity: .55; cursor: wait; }

/* 七页资料完善：无标题栏、步骤提示或装饰卡片。 */
.profile-completion-page { padding-top: var(--safe-top); background: #fff; }
.profile-completion-page .page-body { padding: 28px 28px 24px; }
.profile-completion-intro { padding: 22px 0 30px; }
.profile-completion-intro h1 { margin: 0 0 12px; color: #20212a; font-size: 25px; line-height: 1.4; font-weight: 650; letter-spacing: -.025em; }
.profile-completion-intro h1:focus { outline: none; }
.profile-completion-intro p { margin: 0; color: #85868f; font-size: 13px; line-height: 1.75; }
.completion-footer { flex: 0 0 auto; display: grid; gap: 12px; padding: 16px 28px calc(24px + var(--safe-bottom)); background: #fff; }
.profile-completion-page .edit-media-card, .profile-completion-page .edit-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.profile-completion-page .completion-fields { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 28px; }
.profile-completion-page .edit-field > span, .completion-field-label { color: #50515b; font-size: 13px; font-weight: 500; }
.profile-completion-page .edit-input { min-height: 52px; border: 1px solid #eaeaf0; border-radius: 12px; background: #fafafb; color: #252630; font-weight: 450; padding: 13px 14px; }
.profile-completion-page .edit-input:focus { border-color: #a8a0f0; box-shadow: none; }
.profile-completion-page .edit-input::placeholder { color: #aaaab3; font-weight: 400; }
.profile-completion-page .completion-avatar-card { justify-items: center; text-align: center; padding: 4px 0 18px; gap: 14px; }
.completion-avatar-card .profile-upload-hint { max-width: 260px; }
.profile-completion-page .edit-avatar-preview { width: 100px; height: 100px; font-size: 40px; color: #a3a0b4; background-color: #f3f2f7; font-weight: 400; box-shadow: none; }
.profile-completion-page .avatar-camera-badge { box-shadow: none; background: #8275e8; }
.profile-completion-page .edit-upload-btn { min-height: 36px; padding: 4px 12px; background: transparent; color: #7566d8; font-size: 13px; font-weight: 500; }
.profile-completion-page .profile-upload-hint, .profile-completion-page .profile-derived-age { color: #92929d; font-weight: 400; }
.profile-completion-page .profile-save-btn { width: 100%; padding: 14px 12px; min-height: 50px; border-radius: 12px; background: #7a6be6; box-shadow: none; font-weight: 500; font-size: 15px; }
.completion-city-group { display: grid; gap: 12px; }
.completion-interest-picker { display: grid; gap: 18px; }
.completion-tag-categories, .completion-tags, .completion-selected-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.completion-tag-categories { gap: 8px; padding-bottom: 18px; border-bottom: 1px solid #f0f0f3; }
.completion-tag-categories button, .completion-tag { border: 1px solid #ededf2; border-radius: 999px; background: #fafafb; color: #777781; font-size: 13px; min-height: 36px; padding: 7px 12px; }
.completion-tag-categories button { border-color: transparent; background: transparent; padding: 5px 9px; font-size: 12px; min-height: 34px; }
.completion-tag-categories button[aria-pressed="true"], .completion-tag.selected { background: #f3f0fd; border-color: #e5dff8; color: #7566c8; font-weight: 500; }
.completion-tag-title { margin: 0; color: #55555e; font-size: 15px; font-weight: 500; }
.completion-tag:focus-visible, .completion-tag-categories button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 350px) {
  .profile-completion-page .page-body { padding-left: 22px; padding-right: 22px; }
  .profile-completion-page .completion-footer { padding-left: 22px; padding-right: 22px; }
}

/* 内嵌生日滚轮与角色直选。 */
.completion-birthday-section { display: grid; gap: 14px; }
.birthday-wheels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.birthday-column { position: relative; min-width: 0; }
.birthday-unit { display: block; margin-bottom: 8px; line-height: 20px; color: #96969e; font-size: 12px; text-align: center; }
.birthday-column::after { content: ""; position: absolute; top: 72px; left: 0; right: 0; height: 44px; border-block: 1px solid #eeeeF3; pointer-events: none; }
.birthday-wheel { height: 132px; padding-block: 44px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; scroll-snap-type: y mandatory; scroll-padding-block: 44px; overscroll-behavior: contain; touch-action: pan-y; }
.birthday-wheel::-webkit-scrollbar { display: none; }
.birthday-wheel:focus-visible { outline: 2px solid #b5aceb; outline-offset: 3px; border-radius: 6px; }
.birthday-wheel-option { height: 44px; display: grid; place-items: center; scroll-snap-align: center; color: #b0b0b9; font-size: 17px; font-variant-numeric: tabular-nums; cursor: pointer; user-select: none; }
.birthday-wheel-option.selected { color: #34343f; font-size: 20px; font-weight: 500; }
.birthday-age { margin: 2px 0 0; color: #777481; font-size: 14px; line-height: 22px; text-align: center; }
.completion-choice-field { margin: 12px 0 0; padding: 0; min-width: 0; border: 0; }
.completion-choice-field legend { padding: 0; margin-bottom: 14px; color: #50515b; font-size: 13px; }
.completion-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.completion-choice { position: relative; cursor: pointer; }
.completion-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.completion-choice span { display: grid; place-items: center; min-height: 44px; padding: 8px; border: 1px solid #ededf2; border-radius: 10px; color: #777781; background: #fafafb; font-size: 14px; }
.completion-choice input:checked + span { color: #7566c8; background: #f3f0fd; border-color: #dcd4f4; }
.completion-choice input:focus-visible + span { outline: 2px solid #b5aceb; outline-offset: 3px; }

/* 平铺单选、并排数值滚轮及居住地三级联动。 */
.choice-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.completion-option-button { min-height: 44px; padding: 9px 11px; border: 1px solid #ededf2; border-radius: 10px; color: #777781; background: #fafafb; font-size: 13px; line-height: 1.5; }
.completion-option-button[aria-pressed="true"] { color: #7566c8; background: #f3f0fd; border-color: #dcd4f4; }
.completion-option-button:focus-visible { outline: 2px solid #b5aceb; outline-offset: 3px; }
.physical-wheel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin: 10px 0 16px; }
.profile-wheel-column { position: relative; min-width: 0; }
.profile-wheel-column::after { content: ""; position: absolute; top: 72px; left: 0; right: 0; height: 44px; border-block: 1px solid #eeeef3; pointer-events: none; }
.profile-inline-wheel .birthday-wheel-option { display: block; padding-inline: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; line-height: 44px; }
.physical-wheel-grid .birthday-wheel-option.selected { font-size: 23px; }
.completion-area-section { display: grid; gap: 16px; margin-top: 22px; }
.area-wheel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.area-wheel-grid .birthday-wheel-option { font-size: 12px; }
.area-wheel-grid .birthday-wheel-option.selected { font-size: 14px; }
.completion-occupation-section { display: grid; gap: 14px; }
.occupation-options { height: 176px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; padding: 10px; border: 1px solid #f0f0f4; border-radius: 12px; scrollbar-width: thin; }
.occupation-options .completion-option-button { min-height: 36px; padding: 6px 10px; font-size: 12px; }
.occupation-options:focus-visible { outline: 2px solid #b5aceb; outline-offset: 3px; }
.profile-tag-count { float: right; color: #92929d; font-variant-numeric: tabular-nums; }
.completion-tag[aria-disabled="true"] { opacity: .45; }
@media (max-width: 350px) {
  .completion-choice-grid { gap: 8px; }
  .completion-choice span { padding: 7px 4px; font-size: 13px; }
  .physical-wheel-grid { gap: 20px; }
}

/* 通讯录式标签目录：分组连续滚动，右侧锚点保持可用。 */
.profile-tag-directory { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; height: clamp(310px, calc(var(--app-height) - 330px), 490px); }
.profile-tag-groups { position: relative; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 6px; }
.profile-tag-group { padding: 0 0 26px; }
.profile-tag-group .completion-tag-title { margin-bottom: 14px; }
.profile-tag-index { display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto; align-items: stretch; }
.profile-tag-index button { flex: 0 0 28px; border: 0; border-radius: 7px; background: transparent; color: #9b99a6; font-size: 11px; padding: 3px 1px; }
.profile-tag-index button[aria-current="true"] { color: #7566c8; background: #f3f0fd; }
.profile-tag-index button:focus-visible, .profile-tag-groups:focus-visible { outline: 2px solid #b5aceb; outline-offset: -2px; }
.use-profile-location { justify-self: center; padding: 8px 12px; border: 0; background: transparent; color: #8275c8; font-size: 13px; }
.use-profile-location:disabled { color: #a5a1b4; cursor: wait; }
.use-profile-location:focus-visible { outline: 2px solid #b5aceb; outline-offset: 2px; border-radius: 8px; }

.prototype-profile-states { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.prototype-profile-states > strong { font-size: 13px; }
.prototype-profile-states > small { font-size: 10px; opacity: .6; }
.prototype-profile-states > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.prototype-profile-states button { min-height: 34px; padding: 5px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; background: transparent; color: inherit; font-size: 12px; }
.prototype-profile-states button[aria-pressed="true"] { background: #7566c8; border-color: #a493ec; color: #fff; }
.prototype-profile-states button { border-color: rgba(115,101,246,.18); background: rgba(115,101,246,.04); }
.prototype-profile-states button[aria-pressed="true"] { background: #7566c8; }
.profile-completion-page[data-profile-step="6"] .page-body { display: flex; flex-direction: column; overflow: hidden; }
.profile-completion-page[data-profile-step="6"] .profile-completion-intro { flex: 0 0 auto; }
.profile-completion-page[data-profile-step="6"] .profile-completion-form { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-bottom: 0; }
.profile-completion-page[data-profile-step="6"] .completion-interest-picker { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.profile-completion-page[data-profile-step="6"] .profile-tag-directory { flex: 1; min-height: 120px; height: auto; }
.profile-completion-page[data-profile-step="6"] .completion-selected-tags, .profile-completion-page[data-profile-step="6"] .profile-upload-hint { flex: 0 0 auto; }

/* AI消息降低操作噪声，生成提示集中在主输入框下方。 */
.message-row.ai .sender { display: none; }
.ai-message-footer { justify-content: flex-start; gap: 4px 10px; margin-top: 4px; font-size: 10px; }
.ai-message-actions { display: inline-flex; align-items: center; gap: 2px; }
.ai-message-footer .ai-message-actions button { min-height: 28px; min-width: 34px; padding: 4px 5px; color: #9290a5; font-size: 11px; }
.message-source-note { color: #a29eaf; font-size: 10px; }
.composer-ai-notice { margin: 7px 0 0; color: #aaa6b8; text-align: center; font-size: 10px; line-height: 1.4; }
.chat-page:not(.direct-chat-page) .chat-feed { padding-bottom: calc(190px + var(--keyboard-inset)); }
.chat-page:not(.direct-chat-page).attachment-open .chat-feed { padding-bottom: calc(190px + var(--attachment-push) + var(--keyboard-inset)); }
.refresh-card-btn { min-height: 28px; padding: 5px 9px; font-size: 11px; }
.refresh-card-btn svg { width: 12px; height: 12px; }

.preference-message .bubble-wrap { max-width: min(96%, 430px); width: 100%; }
.preference-question { width: 100%; }
.preference-question > p { margin: 0 0 10px; }
.preference-rule { display: block; margin-bottom: 12px; color: #9993aa; font-size: 11px; }
.preference-options { display: grid; gap: 8px; }
.preference-option { position: relative; width: 100%; border: 1px solid #e7e2f1; border-radius: 12px; padding: 11px 30px 11px 12px; text-align: left; color: #615c73; background: #fcfbfe; font-size: 13px; line-height: 1.6; white-space: normal; }
.preference-option.selected { color: #7566c8; border-color: #b7a9ed; background: #f3effd; }
.preference-option:disabled { cursor: default; opacity: .65; }
.preference-option:disabled.selected { opacity: 1; }
.preference-check { position: absolute; right: 10px; top: 11px; color: #8271cc; }
.preference-submit { width: 100%; margin-top: 12px; padding: 10px; border: 0; border-radius: 10px; color: #fff; background: #8271d9; font-size: 13px; }
.preference-edit { margin-top: 8px; padding: 4px 0; border: 0; background: transparent; color: #9993aa; font-size: 11px; }
.preference-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.preference-photo { padding: 0; overflow: hidden; text-align: center; }
.preference-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.preference-photo > span:not(.preference-check) { display: block; padding: 4px; font-size: 11px; }
.preference-photo-note { color: #aaa3b4; font-size: 10px; line-height: 1.5; }
.preference-reuse-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preference-reuse-actions button { flex: 1; min-width: 100px; padding: 10px; border: 1px solid #dcd3ef; border-radius: 10px; background: #faf7ff; color: #8271c4; font-size: 12px; }
.preference-reuse-actions button:disabled { opacity: .5; cursor: default; }
.preference-question button:focus-visible, .preference-reuse-actions button:focus-visible { outline: 2px solid #b5aceb; outline-offset: 2px; }
.precise-photo-button img { aspect-ratio: 1; object-fit: cover; }
.direct-avatar-message { display: block; width: min(190px, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.direct-profile-card { min-width: 180px; line-height: 1.8; font-size: 13px; }
.direct-card-title { display: block; margin-bottom: 7px; padding-bottom: 7px; border-bottom: 1px solid rgba(255,255,255,.2); font-size: 13px; }
.quick-contact-btn { min-height: 34px; padding: 6px 8px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: inherit; font-size: 11px; white-space: nowrap; }

.profile-editor-tags { display: grid; gap: 10px; }
.profile-editor-selected { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-editor-tag-actions { display: flex; gap: 12px; }
.profile-editor-tag-actions button { border: 0; background: transparent; color: #8a7fc0; padding: 5px 0; font-size: 12px; }
.profile-tag-editor-dialog { width: min(460px, calc(100vw - 32px)); height: min(640px, calc(var(--app-height) - 64px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: #fff; padding: 20px; }
.profile-tag-editor-dialog > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.profile-tag-editor-dialog h2 { margin: 0; font-size: 18px; font-weight: 600; }
.profile-tag-editor-dialog header > span { font-size: 12px; color: #a09aaf; }
.editor-tag-directory { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; flex: 1; min-height: 0; }
.editor-tag-groups { overflow-y: auto; overscroll-behavior: contain; padding-right: 5px; }
.editor-tag-groups section { margin-bottom: 24px; }
.editor-tag-groups h3 { margin: 0 0 12px; font-size: 13px; color: #777280; font-weight: 500; }
.editor-tag-directory nav { display: flex; flex-direction: column; overflow-y: auto; }
.editor-tag-directory nav button { border: 0; background: transparent; color: #9c96aa; font-size: 10px; min-height: 30px; }
.profile-tag-editor-dialog > footer { display: flex; justify-content: flex-end; gap: 12px; padding-top: 16px; }
.profile-tag-editor-dialog > footer button { min-width: 76px; padding: 10px; border: 1px solid #ebe5f4; border-radius: 10px; background: #faf7ff; color: #8b7bb9; font-size: 13px; }
.profile-tag-editor-dialog > footer button:last-child { background: #8a76c9; color: white; border-color: #8a76c9; }

/* 选项标题与解释分层，已答题的修改入口固定在题目旁。 */
.preference-question-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.preference-question-header > p { margin: 0; flex: 1; }
.preference-question-header .preference-edit { flex: 0 0 auto; min-height: 30px; margin: -3px 0 0; padding: 5px 9px; border: 1px solid #ddd3ef; border-radius: 8px; color: #8b7bb6; background: #faf7ff; font-size: 11px; }
.preference-question-header .preference-edit:disabled { opacity: .5; cursor: default; }
.preference-option-copy { display: grid; gap: 4px; }
.preference-option-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.5; }
.preference-option-letter { color: #a39bb4; font-weight: 400; font-size: 12px; }
.preference-option-detail { display: block; color: #a19aac; font-size: 11px; font-weight: 400; line-height: 1.6; }
.preference-option.selected .preference-option-detail { color: #a096b3; }
.preference-option:disabled { opacity: 1; }
.preference-option-detail { color: #786f84; font-size: 12px; }
.preference-option.selected .preference-option-detail { color: #786b88; }

.prototype-replay-actions { display: grid; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid rgba(115,101,246,.12); }
.prototype-replay-actions > strong { font-size: 12px; }
.prototype-replay-actions button { display: grid; gap: 4px; width: 100%; border: 1px solid rgba(115,101,246,.15); border-radius: 10px; padding: 10px; background: rgba(115,101,246,.04); color: inherit; text-align: left; }
.prototype-replay-actions button span { font-size: 12px; font-weight: 600; }
.prototype-replay-actions button small { font-size: 10px; opacity: .65; line-height: 1.5; }
.prototype-replay-actions button:focus-visible { outline: 2px solid #b5aceb; outline-offset: 2px; }
.preference-saved-summary { margin: 12px 0; padding: 12px 0; border-block: 1px solid #eee8f5; }
.preference-saved-summary > span { display: block; margin-bottom: 7px; color: #a29aae; font-size: 11px; }
.preference-saved-summary > p { margin: 0; color: #81778f; font-size: 12px; line-height: 1.85; white-space: pre-wrap; }

/* AI消息按内容收缩，长文本与问答卡使用完整可用宽度；不影响私聊头像留位。 */
.main-stage > .chat-feed { padding-left: 12px; padding-right: 12px; }
.main-stage > .chat-feed > .message-row { width: 100%; }
.main-stage > .chat-feed > .message-row > .bubble-wrap { width: fit-content; min-width: 0; max-width: 100%; }
.main-stage > .chat-feed > .message-row > .bubble-wrap > .bubble { max-width: 100%; overflow-wrap: anywhere; }
.main-stage > .chat-feed > .preference-message > .bubble-wrap,
.main-stage > .chat-feed > .online-message > .bubble-wrap,
.main-stage > .chat-feed > .appointment-message > .bubble-wrap { width: 100%; }
.main-stage > .chat-feed > .message-row > .precise-photo-wrap { width: min(260px, 100%); }
.direct-chat-page > .topbar { grid-template-columns: 42px minmax(0, 1fr) auto; column-gap: 10px; }
.direct-chat-page .nav-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prototype-contact-scenes { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(115,101,246,.12); }
.prototype-contact-scenes > strong { font-size: 12px; }
.prototype-contact-scenes > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prototype-contact-scenes button { min-height: 36px; border: 1px solid rgba(115,101,246,.15); border-radius: 8px; background: rgba(115,101,246,.04); color: inherit; font-size: 12px; }
.prototype-contact-scenes button:focus-visible { outline: 2px solid #b5aceb; outline-offset: 2px; }

/* 首聊名片使用独立资料卡结构，左右只表示发送方向。 */
.message-row.direct .direct-profile-card { width: min(282px, 100%); min-width: 0; padding: 0; overflow: hidden; border: 1px solid #e9e3f0; border-radius: 18px; color: #51485f; background: #fff; box-shadow: 0 8px 24px rgba(61,43,97,.06); white-space: normal; }
.direct-card-head { display: grid; justify-items: center; gap: 12px; padding: 14px; background: #f8f5fd; }
.direct-card-avatar { width: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background-color: #e8e0f7; background-size: cover !important; background-position: center !important; color: #8c7dac; font-size: 40px; }
.direct-card-avatar.has-image { color: transparent; }
.direct-card-identity { min-width: 0; text-align: center; }
.direct-card-name { color: #4b3f5d; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.direct-card-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px 8px; border-bottom: 1px solid #f0ebf4; }
.direct-card-metric { display: grid; gap: 7px; text-align: center; }
.direct-card-metric + .direct-card-metric { border-left: 1px solid #f0ebf4; }
.direct-card-metric > span { color: #aca0b7; font-size: 10px; }
.direct-card-metric > div { display: flex; align-items: baseline; justify-content: center; gap: 3px; flex-wrap: wrap; }
.direct-card-metric strong { color: #665672; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.direct-card-metric small { color: #b2a6bd; font-size: 9px; }
.direct-card-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 15px 14px 18px; }
.direct-card-detail { display: grid; gap: 5px; min-width: 0; }
.direct-card-detail > span { color: #aca0b7; font-size: 10px; }
.direct-card-detail > strong { color: #7d6e8b; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.quick-contact-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 7px 11px; border: 1px solid #8c7ce1; border-radius: 999px; color: #fff; background: #8a78d8; box-shadow: 0 4px 12px rgba(123,96,185,.12); font-size: 11px; font-weight: 600; }
.quick-contact-btn svg { width: 14px; height: 14px; flex: 0 0 14px; }
.quick-contact-btn:focus-visible { outline: 2px solid #bbafea; outline-offset: 3px; }
.quick-contact-btn:hover { background: #7d6acb; }
.message-row.direct[data-direct-type="profileCard"] > .bubble-wrap { width: min(282px, calc(100% - 46px)); max-width: calc(100% - 46px); }
.direct-card-head { padding-top: 13px; padding-bottom: 13px; }
.direct-card-metrics { padding-top: 12px; padding-bottom: 12px; }
.direct-card-metric { gap: 6px; }
.direct-card-metric > span, .direct-card-detail > span { color: #8c7d99; font-size: 11px; line-height: 1.4; }
.direct-card-metric strong { font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.direct-card-details { gap: 12px; padding-top: 12px; padding-bottom: 14px; }
.direct-card-detail { gap: 3px; }
.direct-card-detail > strong { font-size: 12px; line-height: 1.5; }

/* 头像独立消息随图片收缩，避免我方图片落在宽容器左侧。 */
.message-row.direct[data-direct-type="avatar"] > .bubble-wrap { width: min(190px, calc(100% - 46px)); max-width: calc(100% - 46px); }
.message-row.direct[data-direct-type="avatar"] .direct-avatar-message { width: 100%; }

/* 十二张方形头像：4列3行，压缩辅助文案，尽量在常见竖屏内展示。 */
.preference-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.preference-photo-grid .preference-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.preference-photo > span:not(.preference-check) { padding: 4px 1px; font-size: 10px; line-height: 1.25; min-height: 21px; }
.preference-photo .preference-check { top: 4px; right: 4px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #9b8dd8; font-size: 11px; }
.preference-photo-question .preference-question-header { margin-bottom: 5px; }
.preference-photo-question .preference-rule { margin-bottom: 8px; }
.preference-photo-question .preference-submit { margin-top: 9px; padding: 8px; }
button.direct-more-card { width: 100%; grid-template-columns: 58px minmax(0, 1fr) 16px; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.direct-more-card .friend-profile-chevron { margin: 0; text-align: right; color: #b1a7c0; font-size: 22px; font-weight: 400; }
button.direct-more-card:focus-visible { outline: 2px solid #bbafea; outline-offset: 3px; }

/* 轻呼吸不改变按钮或标题布局；仅闪电与外圈柔和变化。 */
.quick-contact-btn { position: relative; isolation: isolate; transition: transform .15s ease, background .15s ease; }
.quick-contact-flash { display: inline-block; width: 14px; line-height: 1; font-size: 13px; transform-origin: center; animation: quickContactFlash 5.5s ease-in-out infinite; }
.quick-contact-btn::after { content: ""; position: absolute; z-index: -1; inset: -3px; border-radius: inherit; pointer-events: none; opacity: 0; box-shadow: 0 0 0 3px rgba(157,138,217,.16), 0 0 12px rgba(157,138,217,.18); animation: quickContactGlow 5.5s ease-in-out infinite; }
.quick-contact-btn:active { transform: scale(.97); }
@keyframes quickContactFlash { 0%, 76%, 100% { transform: scale(1); } 87% { transform: scale(1.12); } }
@keyframes quickContactGlow { 0%, 76%, 100% { opacity: 0; } 87% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .quick-contact-flash, .quick-contact-btn::after { animation: none; }
  .quick-contact-btn { transition: none; }
  .quick-contact-btn:active { transform: none; }
}
.ai-message-footer .message-refresh { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 4px 0 4px 8px; margin-left: auto; border: 0; border-radius: 0; box-shadow: none; color: #9290a5; background: transparent; font-size: 11px; }
.ai-message-footer .message-refresh:hover { background: transparent; color: #7c6aa8; }
.ai-message-footer .message-refresh svg { width: 12px; height: 12px; }
.ai-message-footer .message-submit { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 72px; min-height: 34px; padding: 7px 16px; margin-left: auto; border: 0; border-radius: 999px; color: #fff; background: var(--brand); box-shadow: 0 4px 12px rgba(115,101,246,.16); font-size: 12px; font-weight: 600; }
.ai-message-footer .message-submit:hover:not(:disabled) { background: #6657e5; }
.ai-message-footer .message-submit:active:not(:disabled) { background: #5b4cd4; }
.ai-message-footer .message-submit:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.ai-message-footer .message-submit svg { width: 14px; height: 14px; }
.preference-photo-grid { max-width: 392px; margin-inline: auto; }

.ai-message-footer .message-submit:disabled { opacity: .5; cursor: default; }
.preference-question-header .preference-rule { flex: 0 0 auto; margin: 0; padding-top: 2px; color: #a299ae; font-size: 10px; line-height: 1.5; white-space: nowrap; }
.preference-question-header { gap: 10px; }
.preference-confirm-footer { justify-content: flex-end; }
.profile-editor-city-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-editor-city-fields .edit-input { min-width: 0; padding-inline: 8px; font-size: 12px; }

/* 同一弹窗内完成真人头像选择、预览和更换。 */
.avatar-upload-backdrop { place-items: center; }
.avatar-upload-sheet { position: relative; width: min(100%, 370px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 32px 24px 24px; border: 1px solid rgba(255,255,255,.85); border-radius: 28px; background: #fff; box-shadow: 0 24px 80px rgba(35,25,80,.24); text-align: center; }
.avatar-upload-close { position: absolute; top: 10px; right: 10px; font-size: 24px; }
.avatar-upload-portrait { position: relative; width: 108px; height: 108px; margin: 0 auto 24px; }
.avatar-upload-pick { display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; border: 3px solid #efba35; border-radius: 50%; background: #f0ebfc; color: #7566b9; }
.avatar-upload-warning { position: absolute; bottom: -1px; right: -3px; display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid #fff; border-radius: 50%; background: #f6bc28; color: #49360b; font-size: 19px; font-weight: 800; pointer-events: none; }
.avatar-upload-portrait.has-selection .avatar-upload-pick { border-color: #e6e0fa; }
.avatar-upload-sheet h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -.04em; }
.avatar-upload-sheet > p { max-width: 270px; margin: 0 auto; font-size: 13px; line-height: 1.8; color: #77738b; }
.avatar-upload-current { display: block; width: 100%; height: 100%; }
.avatar-upload-placeholder { display: grid; height: 100%; place-content: center; gap: 2px; font-size: 11px; }
.avatar-upload-placeholder b { font-size: 27px; font-weight: 400; }
.avatar-upload-pick canvas { display: block; width: 100%; height: 100%; }
.avatar-upload-sheet [hidden] { display: none !important; }
.avatar-upload-requirements { margin: 22px 0; padding: 13px 15px; border-radius: 14px; background: #f7f5fc; text-align: left; }
.avatar-upload-requirements strong { display: block; margin-bottom: 5px; color: #625976; font-size: 12px; font-weight: 600; }
.avatar-upload-requirements p { margin: 0; color: #898297; font-size: 12px; line-height: 1.8; }
.avatar-upload-sheet .avatar-upload-error { max-width: none; margin: -6px 0 16px; color: #b64161; font-size: 12px; }
.avatar-upload-submit { width: 100%; min-height: 48px; border: 0; border-radius: 15px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; }
.avatar-upload-submit:disabled { opacity: .45; cursor: default; }
.avatar-upload-sheet button:focus-visible, .avatar-upload-sheet input:focus-visible { outline: 3px solid #a99eea; outline-offset: 3px; }
@media (max-height: 700px) {
  .avatar-upload-sheet { padding: 24px 20px 20px; }
  .avatar-upload-portrait { width: 92px; height: 92px; margin-bottom: 20px; }
  .avatar-upload-requirements { margin: 18px 0; }
}

.preference-selected-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.preference-selected-photos img { width: 72px; max-width: 28vw; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.preference-summary-text { white-space: pre-line; }
