:root {
  --pink: #ff3f8f;
  --pink-soft: #ffe6f1;
  --rose: #ff79b8;
  --violet: #8e70ff;
  --violet-soft: #efe8ff;
  --orange: #ff9d32;
  --ink: #151321;
  --muted: #77728a;
  --line: #f1edf7;
  --green: #27d27d;
  --blue: #6691ff;
  --shadow: 0 16px 40px rgba(100, 63, 119, 0.11);
  --shadow-strong: 0 22px 56px rgba(109, 70, 118, 0.17);
  --card: rgba(255, 255, 255, 0.9);
  --chat-input-safe-space: max(30px, calc(18px + env(safe-area-inset-bottom)));
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(
      circle at 12% 3%,
      rgba(255, 222, 238, 0.95) 0 170px,
      transparent 290px
    ),
    radial-gradient(
      circle at 88% 2%,
      rgba(232, 224, 255, 0.92) 0 180px,
      transparent 300px
    ),
    linear-gradient(180deg, #fff8fc 0%, #ffffff 38%, #fff9fd 100%);
  overflow-x: hidden;
}
button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}
.phone-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 12px 104px;
  position: relative;
}
.page-view {
  display: none;
}
.page-view.active {
  display: block;
}
body[data-tab="mine"] .profile-card {
  display: none;
}
body.in-chat .tabs {
  display: none;
}
body.needs-setup {
  overflow: hidden;
}
body.booting .phone-shell,
body.booting .tabs,
body.booting .startup-page {
  visibility: hidden;
}
body:not(.booting) .app-loading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.needs-setup .phone-shell,
body.needs-setup .tabs {
  display: none;
}
.app-loading {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(
      circle at 18% 12%,
      rgba(255, 214, 236, 0.95),
      transparent 34%
    ),
    radial-gradient(
      circle at 82% 8%,
      rgba(232, 224, 255, 0.92),
      transparent 32%
    ),
    linear-gradient(180deg, #fff8fc 0%, #fff 100%);
  transition:
    opacity 0.28s ease,
    visibility 0.28s ease;
}
.loading-card {
  width: min(300px, 86vw);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 70px rgba(109, 70, 118, 0.14);
  backdrop-filter: blur(18px);
  text-align: center;
}
.loading-card strong {
  font-size: 16px;
  font-weight: 950;
}
.loading-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.loading-mark {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
}
.loading-mark span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--violet));
  animation: loading-dot 0.78s ease-in-out infinite;
}
.loading-mark span:nth-child(2) {
  animation-delay: 0.12s;
}
.loading-mark span:nth-child(3) {
  animation-delay: 0.24s;
}
@keyframes loading-dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-8px);
    opacity: 1;
  }
}
.startup-page {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  width: min(430px, 100vw);
  margin: 0 auto;
  overflow-y: auto;
  color: #171323;
  background: #fff3fa;
}
body.needs-setup .startup-page {
  display: block;
}
.startup-scroll {
  min-height: 100%;
  padding-bottom: 0;
  background:
    linear-gradient(
      180deg,
      rgba(37, 16, 49, 0.05),
      rgba(255, 246, 251, 0.98) 33%
    ),
    #fff7fc;
}
.startup-banner {
  width: 100%;
  height: 246px;
  display: block;
  object-fit: cover;
  object-position: center top;
}
.startup-card {
  position: relative;
  z-index: 2;
  margin: -32px 12px 0;
  border-radius: 22px;
  padding: 16px 13px 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-strong);
}
.startup-title {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 86px;
  gap: 8px;
  align-items: center;
}
.startup-title > span {
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #ff8cc2);
}
.startup-title h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
  text-align: center;
}
.startup-title p {
  margin: 8px 0 0;
  color: #817992;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.random-btn {
  height: 34px;
  border-radius: 999px;
  color: #ff3f8f;
  background: #fff0f7;
  box-shadow: inset 0 0 0 1px rgba(255, 63, 143, 0.18);
  font-size: 12px;
  font-weight: 900;
}
.contact-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(255, 240, 247, 0.86),
    rgba(246, 243, 255, 0.78)
  );
}
.contact-avatar-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.contact-avatar-btn {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: #ff3f8f;
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 63, 143, 0.16);
  font-size: 26px;
  font-weight: 900;
}
.contact-avatar-btn span {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  line-height: 1;
}
.contact-avatar-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}
.contact-avatar-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}
.contact-avatar-row p {
  min-width: 0;
  margin: 6px 0 0;
  color: #817992;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.form-grid label,
.desc-field {
  display: grid;
  gap: 6px;
  color: #7a748a;
  font-size: 12px;
  font-weight: 900;
}
.form-grid input,
.form-grid select,
.desc-field textarea {
  width: 100%;
  border: 1px solid rgba(238, 229, 240, 0.96);
  border-radius: 13px;
  outline: 0;
  color: #24202d;
  background: #fff;
  font: inherit;
}
.form-grid input,
.form-grid select {
  height: 38px;
  padding: 0 10px;
}
.desc-field textarea {
  min-height: 58px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.5;
}
.emotion-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.emotion-picker button,
.emotion-tag {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ff3f8f;
  background: #ffeaf3;
  font-size: 12px;
  font-weight: 900;
}
.emotion-picker button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #ff75b0, #ff3f8f);
}
.add-contact-btn,
.enter-game-btn {
  height: 44px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff75b0, #ff3f8f);
  box-shadow: 0 12px 28px rgba(255, 63, 143, 0.26);
  font-size: 15px;
  font-weight: 950;
}
.starter-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-bottom: 12px;
  margin-bottom: 144px;
}
.starter-card {
  min-width: 0;
  border-radius: 18px;
  padding: 11px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 38px;
  gap: 11px;
  align-items: center;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 63, 143, 0.12),
    0 8px 20px rgba(115, 77, 123, 0.08);
}
.starter-avatar {
  width: 66px;
  height: 66px;
  min-width: 66px;
  min-height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  color: #fff;
  background:
    radial-gradient(
      circle at 50% 32%,
      rgba(255, 255, 255, 0.55) 0 16px,
      transparent 17px
    ),
    linear-gradient(135deg, var(--avatar-a), var(--avatar-b));
  font-size: 22px;
  font-weight: 950;
  overflow: hidden;
  flex: none;
}
.starter-avatar img,
.avatar img,
.mini-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}
.starter-main {
  min-width: 0;
}
.starter-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
}
.starter-name small {
  color: #ff3f8f;
  font-size: 15px;
}
.starter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.starter-meta span {
  min-height: 24px;
  border-radius: 8px;
  padding: 4px 8px;
  color: #6d6680;
  background: #f2f0f7;
  font-size: 12px;
  font-weight: 800;
}
.starter-desc {
  margin: 8px 0 0;
  color: #6f697d;
  font-size: 12px;
  line-height: 1.55;
}
.starter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.starter-check {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: transparent;
  box-shadow: inset 0 0 0 2px #c9c2d4;
  font-size: 20px;
  font-weight: 950;
}
.starter-card.is-selected .starter-check {
  color: #fff;
  background: #ff4f98;
  box-shadow: none;
}
.startup-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 8px 20px;
  border-radius: 0 0 22px 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 28px rgba(105, 72, 119, 0.09);
  backdrop-filter: blur(16px);
}
.startup-foot {
  margin: 0 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #5d7191;
  font-size: 12px;
}
.startup-foot small {
  max-width: 138px;
  color: #9a93a8;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.enter-game-btn {
  width: 100%;
  height: 48px;
  font-size: 17px;
}
.enter-game-btn:disabled {
  opacity: 0.48;
  box-shadow: none;
}
.profile-card {
  min-height: 56px;
  border-radius: 28px;
  padding: 8px 9px 8px 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto minmax(102px, 1fr) auto;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(18px);
  position: sticky;
  top: 8px;
  z-index: 20;
}
.agent {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
}
.agent-photo,
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9);
  background: #f7f8fc;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 10px 20px rgba(81, 52, 88, 0.12);
}
.agent-photo img,
.avatar img,
.mini-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.avatar-fallback {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #ff3f8f;
  background: linear-gradient(135deg, #fff0f7, #eee8ff);
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}
.agent-photo img + .avatar-fallback,
.avatar img + .avatar-fallback,
.mini-avatar img + .avatar-fallback {
  display: none;
}
.agent .level {
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 2px 8px 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff77b7, #f03b92);
  box-shadow: 0 6px 14px rgba(238, 49, 132, 0.28);
}
.identity {
  min-width: 0;
}
.identity strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
  margin-bottom: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.secret-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  max-width: 100%;
  padding: 0 8px;
  border-radius: 7px;
  color: #fa347d;
  background: #ffeaf3;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    color 0.3s,
    background 0.3s;
}

/* 隐藏状态样式 */
.secret-tag.secret-safe {
  color: #27d27d;
  background: #e9fbef;
}
.secret-tag.secret-low {
  color: #6a91ff;
  background: #eef1ff;
}
.secret-tag.secret-warn {
  color: #ff9d32;
  background: #fff8ef;
}
.secret-tag.secret-danger {
  color: #ff4b94;
  background: #ffeaf3;
  animation: pulse-danger 1.5s ease-in-out infinite;
}
.secret-tag.secret-critical {
  color: #fff;
  background: #ff2f74;
  animation: pulse-critical 0.8s ease-in-out infinite;
}

@keyframes pulse-danger {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

@keyframes pulse-critical {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 47, 116, 0.4);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 0 8px 4px rgba(255, 47, 116, 0.2);
  }
}
.stats {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}
.stat {
  width: 55px;
  display: grid;
  grid-template-columns: 23px 1fr;
  grid-template-rows: auto auto;
  column-gap: 4px;
  align-items: center;
}
.stat-icon {
  grid-row: 1 / 3;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  background: var(--bubble);
  color: var(--accent);
}
.stat b {
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
}
.stat span {
  font-size: 8px;
  color: #1d1927;
  white-space: nowrap;
}
.stat:nth-child(1) {
  --bubble: #ffe3ef;
  --accent: #f64091;
}
.stat:nth-child(2) {
  --bubble: #eee8ff;
  --accent: #8762ff;
}
.stat:nth-child(3) {
  --bubble: #fff0d9;
  --accent: #fb9636;
}
.hero-card {
  margin-top: 12px;
  min-height: 180px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background:
    linear-gradient(
      90deg,
      rgba(255, 235, 247, 0.95) 0 36%,
      rgba(235, 241, 255, 0.62) 64%,
      rgba(237, 230, 255, 0.8) 100%
    ),
    radial-gradient(
      circle at 40% 20%,
      rgba(255, 255, 255, 0.95) 0 55px,
      transparent 120px
    ),
    linear-gradient(135deg, #fee9f8, #e7f2ff 48%, #efe4ff);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, #ff78aa 0 2px, transparent 3px),
    radial-gradient(circle at 38% 12%, #fff 0 4px, transparent 5px),
    radial-gradient(circle at 88% 10%, #fb5e9b 0 3px, transparent 4px),
    radial-gradient(
      circle at 74% 30%,
      rgba(255, 255, 255, 0.9) 0 2px,
      transparent 3px
    );
  opacity: 0.9;
  pointer-events: none;
}
.hero-art {
  position: absolute;
  right: -8px;
  bottom: -3px;
  width: 52%;
  height: 83%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  opacity: 0.86;
}
.idol-back {
  width: 28px;
  height: 88px;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, var(--suit1), var(--suit2));
  position: relative;
  filter: drop-shadow(0 8px 12px rgba(81, 76, 131, 0.15));
}
.idol-back::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -19px;
  width: 24px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 50% 50% 44% 44%;
  background: var(--hair);
}
.idol-back:nth-child(1),
.idol-back:nth-child(5) {
  height: 61px;
  width: 22px;
  opacity: 0.55;
}
.idol-back:nth-child(2),
.idol-back:nth-child(4) {
  height: 78px;
  width: 25px;
  opacity: 0.75;
}
.idol-back:nth-child(3) {
  height: 102px;
  width: 32px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 24px 18px;
  width: 58%;
}
.hero-copy h1 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 1px;
  color: #e64595;
  white-space: nowrap;
  text-shadow:
    1px 1px 0 #fff,
    8px 9px 20px rgba(153, 68, 196, 0.2);
}
.hero-copy h1 span {
  color: #b059e8;
}
.hero-copy p {
  margin: 14px 0 0;
  font-family: "STKaiti", "KaiTi", "FangSong", serif;
  font-size: 15px;
  line-height: 1.4;
  color: #1b1725;
  white-space: nowrap;
}
.continue-btn {
  margin-top: 22px;
  min-width: 86px;
  height: 43px;
  border-radius: 22px;
  padding: 0 23px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff6ead, #f63d88);
  box-shadow: 0 14px 22px rgba(245, 58, 136, 0.28);
}
.goal-note {
  position: absolute;
  top: 11px;
  right: 8px;
  width: 150px;
  min-height: 122px;
  padding: 20px 14px 12px;
  border-radius: 4px;
  background: linear-gradient(145deg, #fffdf9, #fff6e8);
  box-shadow: 0 10px 26px rgba(153, 111, 92, 0.17);
  transform: rotate(1deg);
  z-index: 3;
}
.goal-note::before {
  content: "";
  position: absolute;
  right: 45%;
  top: -9px;
  width: 14px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(#ff75a8, #f54689);
  transform: rotate(-24deg);
  box-shadow: 0 3px 6px rgba(232, 59, 124, 0.25);
}
.goal-note h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
}
.goal-note ul {
  margin: 0;
  padding-left: 15px;
  font-size: 12px;
  line-height: 1.68;
  font-weight: 700;
}
.goal-note small {
  display: block;
  margin-top: 8px;
  color: #59647d;
  font-size: 12px;
}
.men-row {
  display: flex;
  gap: 17px;
  margin: 11px -12px 14px 0;
  padding: 8px 0 4px 0;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.men-row::-webkit-scrollbar {
  display: none;
}
.man {
  width: 68px;
  flex: 0 0 68px;
  text-align: center;
  scroll-snap-align: start;
  position: relative;
}
.man button {
  width: 100%;
  display: block;
  position: relative;
  overflow: visible;
}
.avatar {
  width: 62px;
  height: 62px;
  margin: 0 auto 8px;
  border: 3px solid #f2f5ff;
  transition: 0.18s ease;
}
.man .avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}
.man.is-active .avatar {
  border-color: #ff9bc4;
  box-shadow:
    0 0 0 3px #ffe6f0,
    0 12px 20px rgba(244, 68, 137, 0.18);
}
.badge {
  position: absolute;
  right: 2px;
  top: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #ff438b;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 4px 8px rgba(243, 52, 127, 0.24);
}
.man > button > .badge {
  right: 2px;
  top: -3px;
  z-index: 6;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  box-shadow: 0 5px 10px rgba(243, 52, 127, 0.28);
}
.online {
  position: absolute;
  right: 2px;
  top: 2px;
  padding: 1px 5px 2px;
  border-radius: 999px;
  color: #17ba67;
  background: #dffced;
  font-size: 10px;
  font-weight: 900;
}
.man strong {
  display: block;
  font-size: 14px;
  line-height: 1.15;
  margin-bottom: 5px;
  white-space: nowrap;
}
.man span {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #77738a;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel {
  border-radius: 18px;
  padding: 15px 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  margin-top: 12px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 10px;
  color: #ff347e;
  background: #ffeaf3;
  font-size: 12px;
  font-weight: 800;
}
.more {
  color: #807b91;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.more::after {
  content: "›";
  font-size: 20px;
  line-height: 10px;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 37px;
  right: 21px;
  top: 17px;
  height: 1px;
  background: linear-gradient(
    90deg,
    #b9f0c8 0 26%,
    #f0e8ec 26% 54%,
    #e8e8f6 54% 76%,
    #f0edf5 76%
  );
}
.slot {
  position: relative;
  z-index: 2;
  text-align: center;
}
.slot time {
  display: block;
  font-size: 13px;
  margin-bottom: 17px;
  color: #151321;
}
.slot time::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: 9px auto -16px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}
.event-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--icon);
  background: var(--icon-bg);
  font-size: 19px;
  font-weight: 900;
}
.slot strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  min-height: 34px;
}
.slot .state {
  display: inline-flex;
  margin-top: 4px;
  border-radius: 7px;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  background: var(--state-bg);
  color: var(--state-color);
  font-size: 11px;
  font-weight: 900;
}
.crisis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.crisis-card {
  min-height: 120px;
  border-radius: 16px;
  padding: 14px 12px 12px;
  text-align: left;
  background: linear-gradient(160deg, #fff5f9 0%, #fff 60%, #fef0f6 100%);
  border: 1px solid rgba(255, 143, 178, 0.18);
  box-shadow:
    0 4px 16px rgba(97, 70, 112, 0.08),
    0 1px 3px rgba(97, 70, 112, 0.06);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.crisis-card::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 63, 143, 0.08),
    transparent 70%
  );
  pointer-events: none;
}
.crisis-card:active {
  transform: scale(0.98);
}
.crisis-card.crisis-empty {
  grid-column: 1 / -1;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96),
    rgba(246, 243, 255, 0.92)
  );
}
.crisis-card .top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
  color: #3d2b44;
}
.crisis-card .emoji {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 63, 143, 0.08);
}
.timer {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 6px 0;
  color: #ff2f74;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.timer::before {
  content: "⏱";
  font-size: 11px;
}
.crisis-level {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3px;
}
/* 等级颜色区分 */
.crisis-level[data-level="S"],
.crisis-card:has(.crisis-level) .crisis-level {
  color: #fff;
  background: linear-gradient(135deg, #ff4f8f, #e91e63);
  box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}
.crisis-level.level-A {
  color: #fff;
  background: linear-gradient(135deg, #ff8a5c, #ff5722);
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.25);
}
.crisis-level.level-B {
  color: #7c5e8a;
  background: linear-gradient(135deg, #f3e5f5, #ede7f6);
}
.crisis-level.level-C {
  color: #6a91ff;
  background: linear-gradient(135deg, #e8eaf6, #e3f2fd);
}
.handle {
  display: block;
  width: 100%;
  height: 32px;
  border: none;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #ff72ae, #ff3f8f);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(255, 63, 143, 0.3);
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
.handle:active {
  transform: scale(0.96);
  box-shadow: 0 1px 6px rgba(255, 63, 143, 0.2);
}
.messages {
  display: grid;
  gap: 0;
}
.message {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.message:last-child {
  border-bottom: 0;
}
.mini-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: #f7f8fc;
}
.message-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
.message strong {
  flex: none;
  font-size: 15px;
  line-height: 1.35;
}
.message-tag {
  flex: none;
  min-height: 21px;
  padding: 2px 6px;
  border-radius: 5px;
  color: #ff3f8f;
  background: #ffeaf3;
  font-size: 11px;
  font-weight: 900;
}
.message p {
  min-width: 0;
  margin: 0;
  color: #78748b;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #716d84;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.msg-meta .badge {
  position: static;
  width: auto;
}
.chat-page {
  padding-top: 14px;
}
.messages-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 4px 13px;
}
.messages-page-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1;
}
.messages-page-head p {
  margin: 7px 0 0;
  color: #858198;
  font-size: 12px;
}
.messages-card {
  border-radius: 20px;
  padding: 7px 18px 7px 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
.chat-detail-page {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: min(430px, 100%);
  margin: 0 auto;
  left: 0;
  right: 0;
  background:
    radial-gradient(
      circle at 18% 0%,
      rgba(255, 222, 238, 0.92) 0 160px,
      transparent 280px
    ),
    linear-gradient(180deg, #fff8fc 0%, #f9f6fb 100%);
}
.chat-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.chat-hd {
  min-height: 76px;
  padding: 16px 12px 9px;
  display: grid;
  grid-template-columns: 34px 42px 1fr 38px;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(241, 237, 247, 0.88);
  backdrop-filter: blur(18px);
}
.chat-back,
.chat-more,
.chat-tool-btn,
.chat-emoji-btn {
  display: grid;
  place-items: center;
  color: #908ba2;
}
.chat-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}
.chat-hd-avatar {
  width: 40px;
  height: 40px;
}
.chat-hd-main {
  min-width: 0;
}
.chat-hd-main strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}
.chat-hd-main span {
  display: block;
  margin-top: 4px;
  color: #24c171;
  font-size: 11px;
}
.chat-more {
  width: 38px;
  height: 34px;
  border-radius: 14px;
  font-weight: 900;
}
.chat-msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  padding: 13px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.chat-msgs::-webkit-scrollbar {
  width: 0;
}
.chat-date {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: #9a94aa;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}
.chat-relation-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  align-self: center;
  max-width: 92%;
  padding: 6px 10px;
  border-radius: 999px;
  color: #77728a;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(97, 70, 112, 0.07);
  font-size: 11px;
  font-weight: 800;
}
.chat-relation-strip span {
  white-space: nowrap;
}
.chat-relation-strip .hot {
  color: #ff2f74;
}
.chat-history-loader,
.chat-history-end {
  align-self: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #8a849a;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
}
.chat-history-loader {
  box-shadow: 0 8px 18px rgba(97, 70, 112, 0.07);
}
.chat-history-loader.loading {
  opacity: 0.72;
  pointer-events: none;
}
.chat-system {
  align-self: center;
  max-width: 88%;
  padding: 7px 11px;
  border-radius: 999px;
  color: #8a849a;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}
.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: chat-in 0.22s ease-out both;
}
.chat-row.me {
  flex-direction: row-reverse;
}
.chat-row .mini-avatar {
  width: 34px;
  height: 34px;
  flex: none;
  margin-top: 18px;
}
.chat-bubble-wrap {
  max-width: 74%;
}
.chat-name {
  margin: 0 0 3px 2px;
  color: #8a849a;
  font-size: 10px;
}
.chat-row.me .chat-name {
  text-align: right;
  margin-right: 2px;
}
.chat-bubble {
  padding: 10px 12px;
  border-radius: 18px 18px 18px 6px;
  color: #24202d;
  background: #fff;
  box-shadow: 0 8px 20px rgba(97, 70, 112, 0.08);
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
  transform-origin: left bottom;
}
.chat-row.me .chat-bubble {
  border-radius: 18px 18px 6px 18px;
  color: #fff;
  background: linear-gradient(135deg, #ff72ae, #ff3f8f);
  transform-origin: right bottom;
}
.chat-bubble.has-image {
  overflow: hidden;
  padding: 4px;
  background: #fff;
}
.chat-row.me .chat-bubble.has-image {
  background: linear-gradient(135deg, #ff72ae, #ff3f8f);
}
.chat-image-msg {
  display: block;
  width: min(210px, 58vw);
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  background: #f4f1f8;
}
.chat-image-caption {
  padding: 6px 8px 4px;
  color: inherit;
  font-size: 13px;
  line-height: 1.45;
}
.chat-time {
  margin-top: 3px;
  color: #aaa4b6;
  font-size: 10px;
}
.chat-row.me .chat-time {
  text-align: right;
}
.typing-line {
  align-self: flex-start;
  margin-left: 44px;
  color: #908ba2;
  font-size: 12px;
}
.typing-line.hidden {
  display: none;
}
.chat-suggestions {
  flex: none;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px 12px 6px;
  background: rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(241, 237, 247, 0.72);
  scrollbar-width: none;
}
.chat-suggestions::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.chat-suggestions button {
  flex: 0 0 auto;
  max-width: 210px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #ff3f8f;
  background: #fff0f7;
  box-shadow: inset 0 0 0 1px rgba(255, 63, 143, 0.14);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.chat-suggestions button:active {
  transform: scale(0.96);
  background: #ffe4f0;
}
.emoji-panel {
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.8);
}
.emoji-panel.show {
  display: grid;
}
.emoji-panel button {
  height: 36px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(97, 70, 112, 0.08);
  font-size: 18px;
}
.chat-image-preview {
  flex: none;
  position: relative;
  margin: 0 16px 10px auto;
  width: 92px;
  height: 92px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(231, 225, 238, 0.95);
  box-shadow: 0 10px 24px rgba(97, 70, 112, 0.12);
}
.chat-image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.chat-image-preview button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 18px;
  line-height: 1;
}
.chat-input-area {
  flex: none;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 16px var(--chat-input-safe-space) 12px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(241, 237, 247, 0.88);
  backdrop-filter: blur(18px);
}
.chat-tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f4f1f8;
  font-size: 24px;
}
.chat-input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  border: 1px solid rgba(231, 225, 238, 0.95);
  border-radius: 22px;
  background: #fff;
  padding-right: 8px;
}
.chat-input {
  flex: 1;
  min-height: 40px;
  max-height: 96px;
  border: 0;
  outline: 0;
  resize: none;
  padding: 10px 0 10px 14px;
  color: #24202d;
  background: transparent;
  font: inherit;
  line-height: 1.45;
}
.chat-emoji-btn {
  width: 32px;
  height: 40px;
  font-size: 18px;
}
.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff72ae, #ff3f8f);
  box-shadow: 0 8px 20px rgba(255, 63, 143, 0.24);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.chat-back:active,
.chat-more:active,
.chat-tool-btn:active,
.chat-emoji-btn:active,
.chat-send-btn:active {
  transform: scale(0.94);
}
.chat-send-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes chat-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100%);
  padding: 8px 14px 16px;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -14px 34px rgba(102, 75, 118, 0.12);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  z-index: 30;
  backdrop-filter: blur(20px);
}
.tab {
  min-width: 0;
  height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #8d879f;
  font-size: 11px;
  font-weight: 800;
  position: relative;
}
.tab svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab.active {
  color: #ff3f8f;
}
.tab.primary {
  margin-top: -24px;
  color: #fff;
}
.tab.primary .heart-action {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff76b2, #ff3d91);
  box-shadow:
    0 12px 26px rgba(255, 63, 143, 0.32),
    inset 0 0 0 5px rgba(255, 255, 255, 0.36);
}
.tab-badge {
  position: absolute;
  right: 18px;
  top: 5px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #ff3f8f;
  font-size: 10px;
  font-weight: 900;
}
.tab.primary .tab-badge {
  right: 8px;
  top: 4px;
}
.update-notice {
  text-align: center;
  padding: 12px 16px;
}
.update-notice span {
  display: inline-block;
  padding: 6px 18px;
  background: linear-gradient(135deg, #ff6b9d, #c44569);
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  letter-spacing: 0.5px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.35);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.02);
    opacity: 0.9;
  }
}
.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%) translateY(-10px);
  z-index: 80;
  max-width: calc(100vw - 40px);
  padding: 10px 15px;
  border-radius: 999px;
  color: #403449;
  background: #fff;
  box-shadow: var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  transition: 0.24s ease;
  font-size: 13px;
  font-weight: 800;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.drawer {
  position: fixed;
  inset: 0;
  display: none;
  place-items: end center;
  background: rgba(36, 24, 44, 0.22);
  z-index: 70;
  padding: 16px;
}
.drawer.show {
  display: grid;
}
.sheet {
  width: min(398px, 100%);
  border-radius: 22px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 26px 60px rgba(77, 45, 90, 0.24);
}
.sheet h3 {
  margin: 0 0 10px;
  font-size: 18px;
}
.sheet p {
  margin: 0 0 14px;
  color: #6e687f;
  line-height: 1.7;
  font-size: 14px;
}
.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sheet-actions button {
  height: 42px;
  border-radius: 14px;
  font-weight: 900;
  background: #fff0f7;
  color: #ff3f8f;
}
.sheet-actions button:first-child {
  background: linear-gradient(135deg, #ff72ae, #ff3f8f);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 63, 143, 0.35);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.sheet-actions button:first-child:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(255, 63, 143, 0.25);
}

/* 离开/稍后再说 按钮 */
#sheetClose {
  background: #fff !important;
  color: #b0a0b8 !important;
  border: 1.5px solid #e8e0ee;
  position: relative;
  overflow: hidden;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s,
    transform 0.15s;
}
/* 主按钮隐藏时，离开按钮居中 */
.sheet-actions.single-btn {
  grid-template-columns: 1fr;
  max-width: 200px;
  margin: 0 auto;
}
#sheetClose::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 63, 143, 0.06),
    rgba(255, 114, 174, 0.06)
  );
  opacity: 0;
  transition: opacity 0.2s;
}
#sheetClose:hover {
  color: #ff3f8f !important;
  border-color: #ffc0d6;
}
#sheetClose:hover::before {
  opacity: 1;
}
#sheetClose:active {
  transform: scale(0.97);
  border-color: #ff72ae;
}
.feed-page {
  padding-top: 16px;
}
.feed-tabs {
  height: 38px;
  border-radius: 15px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
  z-index: 15;
  backdrop-filter: blur(18px);
}
.feed-tab {
  position: relative;
  min-width: 0;
  color: #858198;
  font-size: 14px;
  font-weight: 900;
}
.feed-tab.active {
  color: #191522;
}
.feed-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #ff3f8f;
}
.feed-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.feed-card {
  border-radius: 18px;
  padding: 11px 12px 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: feed-in 0.24s ease-out both;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.feed-card:active {
  transform: scale(0.985);
}
.feed-card-main {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
  align-items: start;
}
.feed-author {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 9px;
  align-items: center;
}
.feed-author .mini-avatar {
  width: 48px;
  height: 48px;
  border: 3px solid #f1f5ff;
}
.feed-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.feed-name {
  font-size: 16px;
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
}
.verify {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: linear-gradient(135deg, #b383ff, #8b64ff);
  font-size: 9px;
  font-weight: 900;
}
.feed-role,
.feed-time {
  color: #858198;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}
.feed-text {
  grid-column: 1 / -1;
  min-height: 46px;
  margin: 8px 0 0;
  color: #24202d;
  font-size: 13px;
  line-height: 1.62;
}
.scene-card {
  position: relative;
  min-height: 76px;
  width: 100%;
  border-radius: 7px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at var(--light-x, 75%) 24%,
      rgba(255, 255, 255, 0.82) 0 5px,
      transparent 34px
    ),
    linear-gradient(135deg, var(--scene-a), var(--scene-b) 52%, var(--scene-c));
}
.scene-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 18% 28%,
      rgba(255, 255, 255, 0.64) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 42% 19%,
      rgba(255, 255, 255, 0.48) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 72% 62%,
      rgba(255, 255, 255, 0.34) 0 3px,
      transparent 4px
    ),
    linear-gradient(180deg, transparent 0 58%, rgba(10, 8, 26, 0.16) 100%);
}
.scene-card::after {
  content: "";
  position: absolute;
  left: 11%;
  right: 7%;
  bottom: 0;
  height: 42%;
  background: var(--scene-shape);
  opacity: 0.75;
}
.feed-image {
  width: 100%;
  height: 76px;
  display: block;
  object-fit: cover;
  border-radius: 7px;
}
.feed-loader,
.feed-empty,
.feed-end {
  min-height: 42px;
  display: grid;
  place-items: center;
  color: #8c8499;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}
.feed-loader {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(86, 74, 105, 0.08);
}
.feed-loader.loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 63, 143, 0.18);
  border-top-color: #ff3f8f;
  animation: spin 0.72s linear infinite;
}
.feed-loader.loading {
  grid-auto-flow: column;
  justify-content: center;
}
.mine-page {
  padding-top: 14px;
}
.mine-hero {
  border-radius: 24px;
  padding: 16px;
  background:
    radial-gradient(
      circle at 86% 8%,
      rgba(255, 255, 255, 0.95) 0 42px,
      transparent 96px
    ),
    linear-gradient(135deg, #fff, #fff2f8 48%, #f1ecff);
  box-shadow: var(--shadow);
}
.mine-profile {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 54px;
  gap: 12px;
  align-items: center;
}
.mine-profile .agent-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f7f8fc;
}
.mine-profile strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}
.mine-profile span {
  display: block;
  margin-top: 6px;
  color: #77728a;
  font-size: 12px;
  line-height: 1.35;
}
.mine-edit {
  height: 32px;
  border-radius: 999px;
  color: #ff3f8f;
  background: #ffeaf3;
  font-size: 12px;
  font-weight: 900;
}
.mine-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mine-stats div,
.mine-card {
  min-width: 0;
  border-radius: 16px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.76);
}
.mine-stats b,
.mine-card strong {
  display: block;
  color: #24202d;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 950;
}
.mine-stats span,
.mine-card small {
  display: block;
  margin-top: 6px;
  color: #858198;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 800;
}
.mine-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mine-card {
  text-align: left;
  box-shadow: var(--shadow);
}
.mine-card span {
  display: block;
  margin-bottom: 12px;
  color: #ff3f8f;
  font-size: 12px;
  font-weight: 900;
}
.mine-panel {
  margin-top: 12px;
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
.bond-list {
  display: grid;
  gap: 10px;
}
.bond-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(241, 237, 247, 0.6);
}
.bond-item:last-child {
  border-bottom: none;
}
.bond-info strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}
.bond-info span {
  display: block;
  margin-top: 3px;
  color: #858198;
  font-size: 12px;
}
.bond-bars {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bond-bar-row {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 6px;
}
.bond-bar-label {
  font-size: 10px;
  font-weight: 800;
  color: #858198;
}
.bond-bar-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.bond-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.bond-bar-fill.intimacy {
  background: linear-gradient(90deg, #ff72ae, #ff3f8f);
}
.bond-bar-fill.danger {
  background: linear-gradient(90deg, #ffb347, #ff6b35);
}
.bond-bar-value {
  font-size: 11px;
  font-weight: 900;
  color: #5d5470;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bond-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  padding-top: 2px;
}
.bond-tag {
  min-height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  padding: 0 8px;
  white-space: nowrap;
}
.bond-tag.intimacy-tag {
  color: #ff3f8f;
  background: #ffeaf3;
}
.bond-tag.danger-tag {
  color: #ff6b35;
  background: #fff3ec;
}
.mine-menu {
  display: grid;
}
.mine-menu button {
  min-height: 48px;
  border-bottom: 1px solid rgba(241, 237, 247, 0.92);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: #24202d;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}
.mine-menu button:last-child {
  border-bottom: 0;
}
.mine-menu b {
  color: #b7b1c3;
  font-size: 22px;
  line-height: 1;
}
.scene-label {
  position: absolute;
  right: 8px;
  top: 8px;
  min-height: 21px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 63, 143, 0.88);
  font-size: 11px;
  font-weight: 900;
  z-index: 2;
}
.feed-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.topic {
  min-height: 25px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ff3f8f;
  background: #ffeaf3;
  font-size: 12px;
  font-weight: 900;
}
.feed-metrics {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #858198;
  font-size: 12px;
  margin-left: auto;
}
.feed-metrics button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #858198;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  transition:
    color 0.2s,
    background 0.2s,
    transform 0.18s ease;
  cursor: pointer;
}
.feed-metrics button:active {
  transform: scale(0.95);
}
.feed-metrics button svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.feed-like-btn.liked {
  color: #ff3f8f;
}
.feed-like-btn.liked svg {
  fill: #ff3f8f;
  stroke: #ff3f8f;
  animation: like-pop 0.28s ease-out;
}
.feed-comment-btn:hover,
.feed-dm-btn:hover {
  color: #ff3f8f;
  background: rgba(255, 63, 143, 0.06);
}
.feed-comments {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(247, 248, 252, 0.8);
  border-radius: 10px;
}
.feed-comment-item {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.4;
}
.feed-comment-item:last-child {
  margin-bottom: 0;
}
.comment-author {
  color: #ff3f8f;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-text {
  color: #5d5470;
}
.comment-more {
  margin-top: 8px;
  color: #858198;
  font-size: 12px;
  cursor: pointer;
}
@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes like-pop {
  0% {
    transform: scale(0.7);
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-avatar-edit {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(247, 248, 252, 0.9);
  display: grid;
  place-items: center;
  font-size: 32px;
  overflow: hidden;
}
.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 63, 143, 0.35);
  color: #ff3f8f;
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}
.profile-nickname-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-nickname-edit label {
  font-size: 13px;
  font-weight: 700;
  color: #5d5470;
}
.profile-nickname-edit input {
  height: 40px;
  border: 1px solid #e8e4ef;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.9);
}
.post-fab {
  position: fixed;
  right: calc(50% - min(215px, 50vw) + 16px);
  bottom: 94px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: none;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #fff;
  background: linear-gradient(135deg, #ff78b5, #ff3f8f);
  box-shadow:
    0 12px 30px rgba(255, 63, 143, 0.35),
    inset 0 0 0 4px rgba(255, 255, 255, 0.28);
  z-index: 28;
}
.post-fab.show {
  display: grid;
}
.post-fab svg {
  width: 27px;
  height: 27px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.post-fab span {
  font-size: 12px;
  font-weight: 900;
}
.post-page {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 58;
  width: min(430px, 100vw);
  overflow-y: auto;
  padding: 0 14px 104px;
  box-sizing: border-box;
  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(255, 222, 238, 0.92) 0 170px,
      transparent 290px
    ),
    linear-gradient(180deg, #fff8fc 0%, #fbf8fc 100%);
}
.post-hd {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 70px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 0 8px;
  background: transparent;
  backdrop-filter: none;
}
.post-hd strong {
  text-align: center;
  font-size: 18px;
}
.post-back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8f88a0;
  font-size: 30px;
  line-height: 1;
}
.post-submit {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #ff72ae, #ff3f8f);
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(255, 63, 143, 0.22);
}
.post-bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 70;
  width: min(430px, 100vw);
  transform: translateX(-50%);
  padding: 10px 14px max(14px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(241, 237, 247, 0.9);
  backdrop-filter: blur(18px);
}
.post-editor {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}
.post-author-row,
.post-preview-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
}
.post-author-row {
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
.post-author-row strong,
.post-preview-head strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}
.post-author-row span,
.post-preview-head span {
  display: block;
  margin-top: 4px;
  color: #858198;
  font-size: 12px;
}
.post-textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 0;
  outline: 0;
  border-radius: 18px;
  padding: 15px;
  color: #24202d;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  font: inherit;
  line-height: 1.7;
}
.upload-card {
  display: grid;
  gap: 8px;
  align-items: stretch;
}
.upload-btn,
.upload-clear {
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 18px rgba(97, 70, 112, 0.07);
  color: #ff3f8f;
  font-size: 13px;
  font-weight: 900;
}
.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}
.upload-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.upload-clear {
  width: 54px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  box-shadow: none;
  color: #858198;
}
.upload-meta {
  min-height: 34px;
  border-radius: 14px;
  padding: 2px 4px 2px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #858198;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 800;
}
.upload-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.post-target-field {
  display: none !important;
}
.post-tools label {
  display: grid;
  gap: 7px;
  color: #7d768e;
  font-size: 12px;
  font-weight: 800;
}
.post-tools select,
.post-tools input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(231, 225, 238, 0.96);
  border-radius: 14px;
  outline: 0;
  padding: 0 12px;
  color: #24202d;
  background: #fff;
  font: inherit;
}
.scene-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.scene-option {
  min-width: 0;
  border-radius: 15px;
  padding: 8px 6px;
  color: #7d768e;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(97, 70, 112, 0.07);
  font-size: 12px;
  font-weight: 900;
}
.scene-option.active {
  color: #ff3f8f;
  box-shadow:
    0 0 0 2px rgba(255, 63, 143, 0.2),
    var(--shadow);
}
.scene-option span {
  display: block;
  height: 42px;
  border-radius: 10px;
  margin-bottom: 6px;
  background:
    var(--scene-shape),
    linear-gradient(135deg, var(--scene-a), var(--scene-b), var(--scene-c));
}
.post-preview-card {
  border-radius: 20px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
.post-preview-card p {
  min-height: 48px;
  margin: 12px 0;
  color: #24202d;
  font-size: 14px;
  line-height: 1.7;
}
.post-preview-scene {
  min-height: 116px;
  margin-bottom: 11px;
}
.post-preview-img {
  display: none;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 11px;
}
.post-preview-card.has-image .post-preview-scene {
  display: none;
}
.post-preview-card.has-image .post-preview-img {
  display: block;
}
@media (max-width: 380px) {
  .feed-card-main {
    grid-template-columns: 1fr 96px;
    gap: 9px;
  }
  .feed-metrics {
    gap: 10px;
  }
  .scene-card {
    min-height: 68px;
  }
}
@media (max-width: 380px) {
  .phone-shell {
    padding-left: 10px;
    padding-right: 10px;
  }
  .profile-card {
    gap: 8px;
    padding-right: 9px;
  }
  .agent {
    width: 58px;
    height: 58px;
  }
  .stat {
    width: 54px;
    grid-template-columns: 23px 1fr;
    gap: 5px;
  }
  .stat-icon {
    width: 23px;
    height: 23px;
    font-size: 14px;
  }
  .stat b {
    font-size: 15px;
  }
  .stat span {
    font-size: 9px;
  }
  .hero-copy {
    width: 59%;
    padding-left: 14px;
  }
  .hero-copy h1 {
    font-size: 27px;
  }
  .goal-note {
    width: 104px;
    right: 6px;
  }
  .crisis-grid {
    gap: 8px;
  }
  .crisis-card {
    padding-left: 7px;
    padding-right: 7px;
  }
}
@media (min-width: 760px) {
  body {
    background: #f9f6fb;
  }
  .phone-shell {
    margin: 24px auto;
    min-height: 928px;
    border-radius: 44px;
    border: 10px solid #111;
    background:
      radial-gradient(
        circle at 12% 3%,
        rgba(255, 222, 238, 0.95) 0 170px,
        transparent 290px
      ),
      radial-gradient(
        circle at 88% 2%,
        rgba(232, 224, 255, 0.92) 0 180px,
        transparent 300px
      ),
      linear-gradient(180deg, #fff8fc 0%, #ffffff 38%, #fff9fd 100%);
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(44, 28, 55, 0.25);
  }
  .profile-card {
    top: 10px;
  }
  .post-page {
    position: absolute;
    inset: 0;
    width: 100%;
  }
  .tabs {
    bottom: 24px;
    border: 10px solid #111;
    border-top: 0;
    width: 430px;
  }
}

/* ========== 新增样式：提醒选项按钮 ========== */
.crisis-options {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.crisis-option-btn {
  min-height: 40px;
  border-radius: 12px;
  padding: 8px 12px;
  color: #24202d;
  background: rgba(255, 240, 247, 0.9);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(97, 70, 112, 0.08);
  transition: all 0.15s ease;
}
.crisis-option-btn:active {
  transform: scale(0.97);
  background: rgba(255, 63, 143, 0.15);
}
.crisis-option-btn small {
  display: block;
  color: #858198;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

/* ========== 新增样式：S级提醒闪烁 ========== */
.crisis-critical {
  animation: crisis-pulse 1.2s ease-in-out infinite;
  border: 2px solid rgba(255, 63, 143, 0.5);
}
@keyframes crisis-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 63, 143, 0.2);
  }
  50% {
    box-shadow: 0 0 16px 4px rgba(255, 63, 143, 0.35);
  }
}

/* ========== 新增样式：游戏时间显示 ========== */
.game-time-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* ========== 独立时间模块 ========== */
.time-module {
  margin: 8px 12px 0;
  padding: 12px 16px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow:
    0 2px 12px rgba(97, 70, 112, 0.08),
    0 1px 3px rgba(97, 70, 112, 0.05);
  display: flex;
  align-items: center;
  gap: 14px;
}
.time-day {
  font-size: 11px;
  font-weight: 800;
  color: #b0a0b8;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.time-clock {
  font-size: 22px;
  font-weight: 900;
  color: #3d2b44;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  line-height: 1;
}
.time-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 63, 143, 0.1);
  overflow: hidden;
}
.time-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff72ae, #ff3f8f);
  transition: width 0.6s ease;
  width: 0%;
}

/* ========== 新增样式：数值变化飘字动画 ========== */
.stat-float {
  position: fixed;
  z-index: 100;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
  animation: float-up 1.2s ease-out forwards;
  white-space: nowrap;
}
.stat-float.positive {
  color: #27d27d;
  background: rgba(39, 210, 125, 0.15);
}
.stat-float.negative {
  color: #ff3f8f;
  background: rgba(255, 63, 143, 0.15);
}
@keyframes float-up {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(0.8);
  }
}

/* ========== 新增样式：行程状态颜色 ========== */
.slot small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  color: inherit;
  opacity: 0.7;
}
