/* ========================================================
 * 饮食日历 PWA - 样式
 * 暖色调 / iPhone 友好 / 移动端优先
 * ======================================================== */

/* ---- 设计令牌 ---- */
:root {
  /* 暖色调主色系 */
  --color-bg: #FAF6F0;        /* 米白背景 */
  --color-card: #FFFFFF;       /* 卡片白 */
  --color-primary: #C4956A;   /* 暖棕主色 */
  --color-primary-dark: #8B5E3C;
  --color-primary-light: #E8C9A0;
  --color-accent: #E8A87C;    /* 珊瑚橙点缀 */
  --color-text: #4A3728;
  --color-text-light: #8B7A6B;
  --color-text-muted: #B5A79A;
  --color-border: #EDE4DA;
  --color-danger: #D97B66;
  --color-success: #8FB89E;

  --shadow-soft: 0 4px 20px rgba(196, 149, 106, 0.12);
  --shadow-card: 0 2px 12px rgba(74, 55, 40, 0.06);
  
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* iPhone 安全区 */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- 基础重置 ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
               "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

#app {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  /* iOS 滚动弹性 */
  -webkit-overflow-scrolling: touch;
}

input, textarea, button, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- 视图切换 ---- */
.view {
  display: none;
  padding-top: calc(60px + var(--safe-top));
  padding-bottom: calc(100px + var(--safe-bottom));
  padding-left: 16px;
  padding-right: 16px;
  min-height: 100%;
}
.view.active {
  display: block;
}
@media (min-width: 768px) {
  .view {
    max-width: 480px;
    margin: 0 auto;
  }
}

.bottom-spacer { height: 40px; }

/* ---- 通用卡片 ---- */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

/* ---- 顶部 Header ---- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(60px + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(196, 149, 106, 0.1);
  color: var(--color-primary-dark);
  transition: background 0.2s;
}
.icon-btn:active {
  background: rgba(196, 149, 106, 0.2);
}

.logo-text {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}

/* ---- 今日标题 ---- */
.today-section {
  text-align: center;
  padding: 24px 0 20px;
}
.today-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: 4px;
}
.today-date {
  font-size: 18px;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* ---- 月历 ---- */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: 22px;
  color: var(--color-primary);
  background: rgba(196, 149, 106, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:active {
  background: rgba(196, 149, 106, 0.25);
}
.calendar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
}
.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 12px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.calendar-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}
.calendar-cell:active {
  transform: scale(0.95);
}
.calendar-cell.outside {
  background: rgba(237, 228, 218, 0.4);
  color: var(--color-text-muted);
}
.calendar-cell.today {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(196, 149, 106, 0.3);
}
.calendar-cell.has-image {
  background-size: cover;
  background-position: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  font-weight: 600;
}
.calendar-cell.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.35) 100%);
  border-radius: inherit;
}
.calendar-cell.has-image > * {
  position: relative;
  z-index: 1;
}
.calendar-cell .count-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.calendar-cell.has-image.today {
  box-shadow: 0 0 0 3px var(--color-primary), 0 2px 8px rgba(196, 149, 106, 0.4);
}
.calendar-cell.selected {
  box-shadow: 0 0 0 3px var(--color-accent);
}

/* ---- 统计卡片 ---- */
.stats-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #FFF8EE, #FFFFFF);
}
.stats-info {
  flex: 1;
}
.stats-label {
  font-size: 18px;
  color: var(--color-text-light);
  font-weight: 500;
}
.stats-num {
  font-size: 56px;
  font-weight: 800;
  color: var(--color-primary-dark);
  line-height: 1;
  margin-top: 4px;
}
.stats-unit {
  font-size: 18px;
  color: var(--color-text-light);
  font-weight: 500;
  margin-left: 4px;
  display: inline-block;
  vertical-align: middle;
}
.stats-shop {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-top: 8px;
}
.stats-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.stats-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stats-image img:not([src]), .stats-image img[src=""] {
  display: none;
}

/* ---- 本月最爱 ---- */
.favorite-card {
  background: linear-gradient(135deg, #FFFFFF, #FFF5E6);
}
.fav-header {
  margin-bottom: 12px;
}
.fav-title {
  font-size: 18px;
  color: var(--color-text-light);
  font-weight: 500;
}
.fav-content {
  display: flex;
  align-items: center;
  gap: 16px;
}
.fav-stats {
  flex: 1;
}
.fav-num {
  font-size: 42px;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1;
}
.fav-shop {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.fav-actions {
  display: flex;
  gap: 8px;
}
.fav-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s;
}
.fav-btn:active {
  transform: scale(0.95);
}
.fav-btn span {
  font-size: 11px;
  font-weight: 500;
}

/* ---- 今日记录列表 ---- */
.today-records {
  padding-bottom: 16px;
}
.today-records h3 {
  font-size: 16px;
  color: var(--color-text-light);
  margin-bottom: 12px;
  font-weight: 500;
}
.record-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.15s;
}
.record-item:active {
  transform: scale(0.98);
}
.record-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--color-border);
  flex-shrink: 0;
  overflow: hidden;
}
.record-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.record-item-info {
  flex: 1;
  min-width: 0;
}
.record-item-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-item-shop {
  font-size: 14px;
  color: var(--color-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.record-item-time {
  font-size: 13px;
  color: var(--color-text-muted);
}
.record-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--color-text-muted);
}

/* ========================================================
 * 表单页
 * ======================================================== */
.form-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(56px + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 12px;
  padding-right: 12px;
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}
.form-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
}
.back-btn {
  padding: 8px 12px;
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 500;
}
.form-header-spacer { width: 60px; }
.text-btn {
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
}
.text-btn.danger { color: var(--color-danger); }

/* 图片上传 */
.form-image-section {
  margin-bottom: 20px;
}
.image-uploader {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--color-primary-light);
  background: var(--color-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s;
}
.image-uploader:active {
  border-color: var(--color-primary);
}
.uploader-placeholder {
  text-align: center;
  color: var(--color-text-light);
}
.uploader-placeholder p {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
}
.uploader-placeholder .hint {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.uploader-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-actions {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.img-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}
.img-action-btn:active {
  background: rgba(0,0,0,0.7);
}

.processing-indicator {
  position: absolute;
  inset: 0;
  background: rgba(250, 246, 240, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius-lg);
  z-index: 10;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.processing-indicator span {
  color: var(--color-text);
  font-size: 14px;
}

/* 表单字段 */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
}
.req { color: var(--color-danger); }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 16px;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.15);
}
.form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.with-map {
  display: flex;
  gap: 8px;
}
.with-map input {
  flex: 1;
}
.map-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.map-btn:active {
  background: rgba(196, 149, 106, 0.1);
}

/* 主按钮 */
.primary-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(139, 94, 60, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.primary-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(139, 94, 60, 0.2);
}
.primary-btn.small {
  width: auto;
  padding: 10px 20px;
  font-size: 14px;
  margin-top: 0;
}

.hidden { display: none !important; }

/* ========================================================
 * 详情页
 * ======================================================== */
.detail-content {
  padding: 0;
}
.detail-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-field {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.detail-field:last-child {
  border-bottom: none;
}
.detail-field-label {
  width: 72px;
  font-size: 14px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.detail-field-value {
  flex: 1;
  font-size: 15px;
  color: var(--color-text);
  word-break: break-all;
}
.detail-note {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 12px;
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ========================================================
 * 列表检索页
 * ======================================================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 4px 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.search-bar input {
  flex: 1;
  border: none;
  padding: 12px 0;
  font-size: 15px;
  background: transparent;
}
.clear-search {
  color: var(--color-text-muted);
  padding: 6px;
  display: flex;
  align-items: center;
}

.record-list {
  padding-bottom: 20px;
}
.record-list .record-item {
  margin-bottom: 8px;
}
.record-list-date-header {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 16px 4px 8px;
  font-weight: 500;
}

/* ========================================================
 * 悬浮按钮 FAB
 * ======================================================== */
.fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + var(--safe-bottom));
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(139, 94, 60, 0.4);
  z-index: 90;
  transition: transform 0.15s;
}
.fab:active {
  transform: scale(0.92);
}

/* ========================================================
 * 模态框
 * ======================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(74, 55, 40, 0.5);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal.hidden {
  display: none;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(50px + var(--safe-top)) 16px 12px;
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
}

/* 地图 */
.map-search {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-card);
}
.map-search input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: var(--color-bg);
}
#amap-container {
  flex: 1;
  background: var(--color-border);
  min-height: 300px;
}
.poi-list {
  max-height: 200px;
  overflow-y: auto;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
}
.poi-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}
.poi-item:active {
  background: rgba(196, 149, 106, 0.1);
}
.poi-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.poi-item-addr {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* 导入选项 */
.import-options {
  padding: 20px;
  background: var(--color-bg);
}
.import-desc {
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 16px;
}
.import-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  text-align: left;
  transition: transform 0.15s;
}
.import-option:active {
  transform: scale(0.98);
}
.import-option .opt-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.import-option.merge .opt-icon { background: linear-gradient(135deg, #8FB89E, #6BA07F); }
.import-option.overwrite .opt-icon { background: linear-gradient(135deg, #E8A87C, #D97B66); }
.import-option .opt-info { flex: 1; }
.import-option .opt-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.import-option .opt-desc {
  font-size: 13px;
  color: var(--color-text-muted);
}
.import-option.cancel {
  justify-content: center;
  color: var(--color-text-muted);
  background: transparent;
  box-shadow: none;
  border: none;
}

/* ========================================================
 * Toast
 * ======================================================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 22px;
  background: rgba(74, 55, 40, 0.92);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 15px;
  z-index: 300;
  animation: toastIn 0.2s;
  backdrop-filter: blur(4px);
  max-width: 85%;
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ========================================================
 * iPhone 特定适配
 * ======================================================== */
/* 禁用 iOS Safari 中的双指缩放问题 */
@supports (-webkit-touch-callout: none) {
  .image-uploader,
  .fab,
  .icon-btn,
  .fav-btn,
  .calendar-cell,
  .import-option {
    -webkit-touch-callout: none;
  }
}

/* iPhone 横屏支持（保持竖屏优先） */
@media (orientation: landscape) and (max-height: 500px) {
  .today-title { font-size: 36px; }
  .stats-num { font-size: 40px; }
  .fav-num { font-size: 32px; }
}

/* ========================================================
 * 追加：评价选择、tab、打卡地图、城市分布
 * ======================================================== */

/* 评价可选标记 */
.hint-optional {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: normal;
}

/* 表单评价选择（二选一卡片式 radio） */
.rating-options {
  display: flex;
  gap: 12px;
}
.rating-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: var(--color-card);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.rating-option input {
  display: none;
}
.rating-option .rating-icon {
  font-size: 22px;
}
.rating-option .rating-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
}
.rating-option.recommend input:checked ~ .rating-label { color: var(--color-success); }
.rating-option.not-recommend input:checked ~ .rating-label { color: var(--color-danger); }
.rating-option.recommend:has(input:checked) {
  border-color: var(--color-success);
  background: rgba(143, 184, 158, 0.08);
  box-shadow: 0 0 0 3px rgba(143, 184, 158, 0.15);
}
.rating-option.not-recommend:has(input:checked) {
  border-color: var(--color-danger);
  background: rgba(217, 123, 102, 0.08);
  box-shadow: 0 0 0 3px rgba(217, 123, 102, 0.15);
}
.rating-option:active {
  transform: scale(0.97);
}

/* 列表页 tab 切换 */
.rating-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 4px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.rating-tab {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}
.rating-tab.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 94, 60, 0.3);
}
.rating-tab .tab-icon { font-size: 15px; }

/* 卡片缩略图评价角标 */
.thumb-rating {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  z-index: 2;
}
.thumb-rating.recommend { background: rgba(143, 184, 158, 0.95); }
.thumb-rating.not-recommend { background: rgba(217, 123, 102, 0.95); }
.record-item-thumb { position: relative; }

/* 详情页评价 pill */
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}
.rating-pill.recommend {
  background: rgba(143, 184, 158, 0.15);
  color: #5A8A68;
}
.rating-pill.not-recommend {
  background: rgba(217, 123, 102, 0.15);
  color: var(--color-danger);
}

/* ============ 打卡地图页 ============ */
.map-stats-hero {
  margin-bottom: 16px;
}
.map-stats-summary {
  display: flex;
  gap: 12px;
  background: linear-gradient(135deg, #FFF8EE, #FFFFFF);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
}
.ms-item {
  flex: 1;
  text-align: center;
}
.ms-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.1;
}
.ms-num.green { color: var(--color-success); }
.ms-num.red { color: var(--color-danger); }
.ms-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.map-stats-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  background: var(--color-border);
}
#amap-stats {
  width: 100%;
  height: 320px;
}

/* 城市分布 */
.city-breakdown {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
}
.city-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
}
.city-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.city-row:last-child { border-bottom: none; }
.city-name {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  min-width: 80px;
}
.city-bars {
  flex: 1;
  height: 10px;
  background: var(--color-border);
  border-radius: 5px;
  overflow: hidden;
}
.city-bar {
  display: block;
  height: 100%;
  border-radius: 5px;
}
.city-bar.total { background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary)); }
.city-counts {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}
.c-total {
  font-weight: 700;
  color: var(--color-primary-dark);
  min-width: 20px;
  text-align: right;
}
.c-rec { color: var(--color-success); font-size: 12px; }
.c-norec { color: var(--color-danger); font-size: 12px; }
