/* ---------- 海报弹窗 ---------- */
.poster-overlay {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.poster-wrap {
  background: var(--paper);
  border-radius: 20px;
  padding: 16px;
  width: 92%;
  max-width: 360px;
  text-align: center;
  animation: pop-in .2s ease;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.poster-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 10px;
  flex-shrink: 0;
}
.poster-img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}
.poster-tip {
  font-size: 12px;
  color: #a39d86;
  margin: 10px 0 12px;
  flex-shrink: 0;
}

/* ---------- 留言板 ---------- */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  scrollbar-width: none;
}
.chat-area::-webkit-scrollbar { display: none; }
.chat-empty {
  text-align: center;
  color: #a39d86;
  font-size: 14px;
  padding: 40px 0;
}
.chat-msg {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.chat-msg.mine {
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--moss), var(--forest-lt));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-msg.mine .chat-avatar {
  background: linear-gradient(135deg, var(--amber), var(--amber-dk));
}
.chat-body {
  max-width: 75%;
}
.chat-meta {
  font-size: 11px;
  color: #a39d86;
  margin-bottom: 4px;
}
.chat-msg.mine .chat-meta {
  text-align: right;
}
.chat-bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}
.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-color: #c8e6c9;
  border-radius: 14px 4px 14px 14px;
}
.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  flex-shrink: 0;
}
.chat-name {
  width: 72px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  color: var(--forest);
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
  transition: border-color .15s;
}
.chat-name:focus {
  outline: none;
  border-color: var(--moss);
}
.chat-input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
.chat-input:focus {
  outline: none;
  border-color: var(--amber);
}
.chat-send {
  background: linear-gradient(135deg, var(--amber), #d97b3f);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(232,147,90,0.3);
  transition: transform .1s;
}
.chat-send:active { transform: scale(0.94); }

/* 录音按钮 */
.chat-record {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--moss), var(--forest));
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform .1s, background .2s;
}
.chat-record:active { transform: scale(0.9); }
.chat-record.recording {
  background: linear-gradient(135deg, #e53935, #c62828);
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.chat-record-cancel {
  background: transparent;
  border: 1px solid var(--clay);
  color: var(--clay);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 14px;
  flex-shrink: 0;
}
.record-timer {
  font-size: 12px;
  color: var(--clay);
  font-weight: 600;
  min-width: 30px;
}

/* 语音消息气泡 */
.voice-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 80px;
}
.voice-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--amber), #d97b3f);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .1s;
}
.voice-play-btn:active { transform: scale(0.9); }
.voice-play-btn.playing {
  animation: pulse 1s infinite;
}
.voice-duration {
  font-size: 13px;
  color: var(--ink);
}

/* 新留言提示 */
.new-msg-tip {
  position: absolute;
  bottom: 70px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  background: var(--forest);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  animation: pop-in .2s ease;
  z-index: 5;
}

/* ---------- 按人查看面板 ---------- */
.person-section {
  margin: 0 18px 14px;
  background: #fff;
  border: 1px solid rgba(228,220,199,0.7);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.person-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.person-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest), var(--forest-lt));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.person-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--forest);
}
.person-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.person-items li {
  font-size: 13.5px;
  color: var(--ink);
  padding: 5px 0;
  border-bottom: 1px solid var(--paper-dk);
  display: flex;
  justify-content: space-between;
}
.person-items li:last-child { border-bottom: none; }

/* ---------- 导出文本预览 ---------- */
.export-preview {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow-y: auto;
  color: var(--ink);
  margin-bottom: 14px;
}

/* ---------- Tab 切换 ---------- */
.tab-bar {
  display: flex;
  margin: 8px 14px 4px;
  background: rgba(241,234,218,0.8);
  border-radius: 10px;
  padding: 3px;
  backdrop-filter: blur(4px);
}
.tab-bar button {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #8a8672;
  border-radius: 8px;
  transition: all .2s ease;
}
.tab-bar button.active {
  background: #fff;
  color: var(--forest);
  box-shadow: 0 2px 8px rgba(31,58,46,0.10), 0 1px 2px rgba(0,0,0,0.04);
  font-weight: 700;
}
/* 留言 Tab 新消息红点 */
.tab-bar button.has-badge {
  position: relative;
}
.tab-bar button.has-badge::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 2px var(--paper-dk);
}

/* ---------- 地图选点弹窗 ---------- */
.map-picker-overlay {
  align-items: flex-end;
}
.map-picker-sheet {
  padding: 0;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  flex-shrink: 0;
}
.mp-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--forest);
}
.mp-close {
  font-size: 18px;
  color: var(--clay);
  padding: 4px 8px;
  border-radius: 8px;
}
.mp-close:active { background: rgba(193,87,63,0.1); }
.mp-search-row {
  display: flex;
  gap: 8px;
  padding: 0 18px 10px;
  flex-shrink: 0;
}
.mp-search-row input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
}
.mp-search-row input:focus { outline: none; border-color: var(--amber); }
.mp-search-btn {
  background: var(--forest);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  flex-shrink: 0;
}
.mp-search-btn:active { background: var(--forest-lt); }
.mp-results {
  max-height: 140px;
  overflow-y: auto;
  padding: 0 18px;
  flex-shrink: 0;
  scrollbar-width: none;
}
.mp-results::-webkit-scrollbar { display: none; }
.mp-poi-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(93,118,84,0.06);
  margin-bottom: 6px;
  cursor: pointer;
}
.mp-poi-item:active { background: rgba(93,118,84,0.14); }
.mp-poi-name { font-size: 14px; font-weight: 600; color: var(--forest); }
.mp-poi-addr { font-size: 12px; color: var(--clay); margin-top: 2px; }
.mp-map-wrap {
  flex: 1;
  min-height: 220px;
  margin: 8px 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--line);
}
.mp-selected {
  padding: 0 18px 8px;
  flex-shrink: 0;
}
.mp-selected-text {
  font-size: 13px;
  color: var(--forest);
  background: rgba(93,118,84,0.08);
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1.4;
}
.map-picker-sheet .sheet-actions {
  padding: 0 18px 18px;
  flex-shrink: 0;
}
