/* ===== 地图面板 ===== */
.map-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: height 0.3s ease;
  overflow: hidden;
}
.map-panel-expanded {
  height: 30vh;
}
.map-panel-collapsed {
  height: 0;
}

.map-toggle-btn {
  position: absolute;
  bottom: 8px;
  right: 12px;
  z-index: 110;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.map-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.amap-container {
  width: 100%;
  height: 100%;
  min-height: 200px;
  position: relative;
}

/* 画廊主体下移 */
#gallery {
  padding-top: 30vh;
  transition: padding-top 0.3s ease;
}
#gallery.map-collapsed {
  padding-top: 0;
}

/* Marker 样式 */
.marker-thumb {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.marker-thumb img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}
.marker-thumb-active img {
  width: 48px;
  height: 48px;
  border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* 返回按钮 */
.back-btn {
  position: fixed;
  z-index: 150;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.back-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}
.back-btn-expanded {
  top: calc(30vh + 12px);
  left: 12px;
}
.back-btn-collapsed {
  top: 12px;
  left: 12px;
}

/* 模式选择按钮 */
.mode-selector {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.08);
  color: #d4a956;
  border: 1px solid rgba(212, 169, 86, 0.3);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Noto Sans SC', sans-serif;
  backdrop-filter: blur(4px);
}
.mode-btn:hover {
  background: rgba(212, 169, 86, 0.15);
  border-color: rgba(212, 169, 86, 0.6);
  transform: translateY(-1px);
}
.mode-btn:active {
  transform: translateY(0);
}
.mode-icon {
  font-size: 18px;
}

/* ===== 地图展开时覆盖 v6 样式 ===== */
/* 照片舞台下移，避免被地图面板遮挡 */
body.map-visible .photo-stage {
  top: 30vh !important;
}

/* 返回按钮位置调整（补充 back-btn 样式） */
body.map-visible .back-btn {
  top: calc(30vh + 12px) !important;
}

/* ===== 留言板 & 反馈 (移植自 v5) ===== */

.gallery-actions {
  position: fixed;
  top: calc(30vh + 12px);
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 200;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 12px;
  color: #e8d8d4;
  transition: all .3s ease;
  cursor: pointer;
}
.action-btn:hover {
  color: #c5a47e;
  border-color: #c5a47e;
}
.action-btn svg {
  width: 16px;
  height: 16px;
}

.msgboard-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 400;
  transform: translateY(100%);
  transition: transform .4s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(44,24,16,.12);
}
.msgboard-panel.open { transform: translateY(0); }

.msgboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,24,16,.3);
  z-index: 350;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.msgboard-overlay.show { opacity: 1; pointer-events: auto; }

.msgboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(44,24,16,.08);
}
.msgboard-title {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #2c1810;
}
.msgboard-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 22px; color: #5a3e2b;
  transition: all .3s; cursor: pointer; border: none; background: none;
}
.msgboard-close:hover { color: #2c1810; background: rgba(44,24,16,.05); }

.msgboard-list {
  flex: 1; overflow-y: auto; padding: 12px 24px;
  -webkit-overflow-scrolling: touch;
}
.msg-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(44,24,16,.04);
  animation: msgFade .4s ease both;
}
@keyframes msgFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-item:last-child { border-bottom: none; }
.msg-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.msg-nickname { font-size: 13px; font-weight: 500; color: #c5a47e; }
.msg-slide-tag {
  font-size: 10px; letter-spacing: .1em; color: #9a8576;
  background: rgba(44,24,16,.04); padding: 2px 8px; border-radius: 8px;
}
.msg-time { font-size: 11px; color: #9a8576; margin-left: auto; }
.msg-content { font-size: 13px; color: #2c1810; line-height: 1.7; word-break: break-word; }

.msgboard-footer {
  padding: 12px 24px 20px; border-top: 1px solid rgba(44,24,16,.08); text-align: center;
}
.msgboard-more {
  padding: 8px 24px; border-radius: 16px; border: 1px solid rgba(44,24,16,.08);
  font-size: 12px; color: #5a3e2b; transition: all .3s; cursor: pointer; background: none;
}
.msgboard-more:hover { color: #c5a47e; border-color: #c5a47e; }
.msgboard-more:disabled { opacity: .4; cursor: default; }
.msgboard-empty {
  text-align: center; padding: 40px 0; color: #9a8576; font-size: 14px;
}

.feedback-modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 500; opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.feedback-modal.open { opacity: 1; pointer-events: auto; }
.feedback-card {
  background: #fff; border-radius: 16px; padding: 24px;
  width: 90%; max-width: 440px; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 8px 40px rgba(44,24,16,.15);
}
.feedback-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.feedback-title {
  font-family: 'Noto Serif SC', Georgia, serif; font-size: 18px; font-weight: 700; color: #2c1810;
}
.feedback-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 22px; color: #5a3e2b; cursor: pointer;
  border: none; background: none; transition: all .3s;
}
.feedback-close:hover { color: #2c1810; background: rgba(44,24,16,.05); }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #2c1810; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 8px 12px; border: 1px solid rgba(44,24,16,.15);
  border-radius: 8px; font-size: 13px; color: #2c1810; font-family: 'Noto Sans SC', system-ui, sans-serif;
  outline: none; transition: border-color .3s; box-sizing: border-box;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #c5a47e; }
.form-textarea { height: 100px; resize: vertical; }
.form-hint { font-size: 11px; color: #9a8576; text-align: right; margin-top: 4px; }
.form-checkbox-group { display: flex; align-items: center; }
.form-checkbox { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.form-checkbox-text { font-size: 13px; color: #5a3e2b; }

.feedback-submit {
  width: 100%; padding: 10px; border-radius: 12px; border: none;
  background: #c5a47e; color: #fff; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .3s; margin-top: 8px;
}
.feedback-submit:hover { background: #b8956a; }
.feedback-submit:disabled { opacity: .5; cursor: default; }

.feedback-overlay {
  position: fixed; inset: 0; background: rgba(44,24,16,.3);
  z-index: 450; opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.feedback-overlay.show { opacity: 1; pointer-events: auto; }

.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100%);
  padding: 10px 24px; border-radius: 12px; font-size: 13px; color: #fff;
  z-index: 9999; transition: transform .3s ease; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-success { background: #51cf66; }
.toast-error { background: #ff6b6b; }
.toast-info { background: #4dabf7; }

/* 移动端响应 */
@media (max-width: 768px) {
  .gallery-actions { top: calc(30vh + 12px); right: 16px; }
  .action-btn { padding: 8px 12px; }
  .action-btn svg { width: 14px; height: 14px; }
  .action-btn span { display: none; }
  .msgboard-panel { max-height: 80vh; }
  .feedback-card { width: 95%; padding: 20px; }
}
