/* ========== 个人卡片 ========== */
.profile-card {
  width: 100%;
  aspect-ratio: 16 / 11.5;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: transparent;
  z-index: 0;
}
.card-bg:not(.has-bg)::after {
  content: "";
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: #8e8e93;
  pointer-events: none;
}

.card-upper {
  position: relative;
  z-index: 1;
  height: 45%;
  cursor: pointer;
}

.card-lower {
  position: relative;
  z-index: 1;
  height: 55%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 下半部分遮罩层 */
.lower-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 24px 24px 0 0;
  z-index: 0;
  transition: background-color 0.3s ease;
}
.lower-overlay.glass-effect {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.avatar-wrapper {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: #fdfdfd;
  border: 2px solid #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  cursor: pointer;
}
.avatar-wrapper img { display: none; width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder { width: 32px; height: 32px; stroke: #8e8e93; stroke-width: 1.5; fill: none; }
.avatar-wrapper.has-img img { display: block; }
.avatar-wrapper.has-img .avatar-placeholder { display: none; }

.info-area {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 44px;
  padding: 0 20px;
  width: 100%;
}

.info-text {
  width: 100%;
  text-align: center;
  font-weight: 500;
  color: #1a1a1a;
  padding: 0;
  border-radius: 6px;
  outline: none;
  transition: background-color .2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-user-select: text;
  user-select: text;
}
.info-text:focus { background: rgba(255, 255, 255, 0.08); }
.info-text:empty::before {
  content: attr(data-placeholder);
  color: #1a1a1a;
  font-weight: 400;
}
.info-text.line-1 { font-size: 17px; font-weight: 600; margin-bottom: 0; }
.info-text.line-2 { font-size: 13px; }
.info-text.line-3 { font-size: 13px; }
.info-text.line-4 {
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #1a1a1a;
  margin-bottom: 2px;
  -webkit-user-select: none;
  user-select: none;
}
.info-text.line-4:empty::before { content: none; }
.location-icon {
  width: 13px; height: 13px; fill: #1a1a1a; flex-shrink: 0;
}
.location-text {
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.location-text:empty::before { content: '所在地'; color: #1a1a1a; font-weight: 400; }

/* ========== 消息卡片 ========== */
.message-card {
  width: 100%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 0.5px solid #f0f0f0;
  cursor: pointer;
}

.message-avatar {
  width: 48px;
  height: 48px;
  border-radius: 20%;
  background: #fff;
  border: 1px solid #e5e5ea;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.message-avatar img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.message-avatar svg {
  width: 24px;
  height: 24px;
  stroke: #c7c7cc;
  stroke-width: 1.5;
  fill: none;
}
.message-avatar.has-img img { display: block; }
.message-avatar.has-img svg { display: none; }

.message-content {
  flex: 1;
  overflow: hidden;
}
.message-preview {
  font-size: 14px;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: #8e8e93;
  color: #ffffff;
  border-radius: 12px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.badge-icon {
  width: 14px;
  height: 14px;
  color: inherit;
}

.message-badge span {
  font-size: 10px;
  color: inherit;
  font-weight: 600;
}

/* ========== 头像展示区 ========== */
.couple-avatars {
  display: flex;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

.couple-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.couple-speech {
  background: #f0f0f3;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  color: #3c3c43;
  text-align: center;
  outline: none;
  position: relative;
  max-width: 80px;
  word-break: break-all;
  line-height: 1.3;
  min-height: 20px;
  min-width: 30px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.couple-speech.glass-effect {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.couple-speech:empty::before {
  content: '...';
  color: #c7c7cc;
  pointer-events: none;
}
.couple-speech::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #f0f0f3;
}

.couple-avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #d1d1d6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.couple-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: none;
}
.couple-avatar-circle.has-img img { display: block; }
.couple-avatar-circle.has-img svg { display: none; }
.couple-avatar-circle svg {
  width: 26px;
  height: 26px;
  stroke: #c7c7cc;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.couple-name {
  font-size: 11px;
  color: #1c1c1e;
  text-align: center;
  outline: none;
  max-width: 58px;
  min-height: 16px;
  min-width: 24px;
  word-break: break-all;
  line-height: 1.3;
  transition: color 0.2s ease;
}
.couple-name:empty::before {
  content: '名字';
  color: #1c1c1e;
  pointer-events: none;
}

/* ========== 迷你日期卡片 ========== */
.couple-date-card {
  background: #f8f8fa;
  border-radius: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  padding: 8px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  transition: background-color 0.2s ease;
}

.date-card-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  font-size: 10px;
  color: #8e8e93;
  font-weight: 500;
  flex-wrap: wrap;
  position: relative;
  line-height: 1.4;
}

.date-card-name {
  font-weight: 700;
  color: #8e8e93;
}

.date-card-days {
  font-size: 16px;
  font-weight: 800;
  color: #8e8e93;
  line-height: 1;
  margin: 0 1px;
  cursor: pointer;
}
.date-card-days:active { opacity: 0.5; }

.date-card-text { white-space: nowrap; }

.date-card-unit {
  font-size: 10px;
  color: #8e8e93;
  font-weight: 500;
}

.date-hidden-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.date-card-calendar {
  background: #ffffff;
  border-radius: 8px;
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-card-labels,
.date-card-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.date-card-labels span {
  font-size: 8px;
  font-weight: 600;
  color: #8e8e93;
  padding: 1px 0;
}

.date-card-dates span {
  font-size: 10px;
  font-weight: 500;
  color: #8e8e93;
  padding: 2px 0;
  border-radius: 6px;
}

.date-card-dates span.today {
  background: #8e8e93;
  color: #ffffff;
  font-weight: 700;
}
