/* ============ 变量 + 重置 ============ */
:root {
  --primary: #FF7A45;
  --primary-dark: #D94A15;
  --primary-soft: #FFE7DC;
  --bg: #F7F7F5;
  --card: #FFFFFF;
  --border: #ECECEC;
  --text: #1C1C1E;
  --text-2: #3A3A3C;
  --muted: #8E8E93;
  --muted-2: #C7C7CC;
  --success: #34C759;
  --warning: #FF9F0A;
  --danger: #FF3B30;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #0F0F10;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
textarea { resize: none; }
[hidden] { display: none !important; }

/* ============ 设备容器：手机全屏，桌面显示手机壳 ============ */
.device {
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #0F0F10;
}
.app {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 560px) {
  .device { padding: 32px 16px; }
  .app {
    max-width: 400px;
    height: min(860px, calc(100dvh - 64px));
    border-radius: 44px;
    border: 9px solid #1A1A1C;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 2px #2A2A2C inset;
  }
}

/* ============ 屏幕栈 + 过渡 ============ */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  padding-top: var(--safe-top);
}
.screen.active { display: flex; }
.screen.slide-in {
  animation: slideIn .28s cubic-bezier(.2,.9,.3,1);
}
@keyframes slideIn {
  from { transform: translate3d(100%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}
.screen.slide-out {
  animation: slideOut .22s cubic-bezier(.4,0,.8,.3) forwards;
}
@keyframes slideOut {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(100%, 0, 0); }
}

/* ============ Header（通用 / 橙色 / 透明浮层） ============ */
.scr-head {
  padding: 12px 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  z-index: 2;
}
.scr-head.stacked { flex-direction: column; align-items: stretch; padding-bottom: 8px; gap: 10px; }
.scr-head.orange {
  background: linear-gradient(135deg, #FF9A5A 0%, #FF7A45 60%, #F06433 100%);
  color: #fff;
  border: 0;
  padding: 20px 18px 22px;
}
.scr-head.transparent {
  background: transparent;
  backdrop-filter: none;
  border: 0;
}
.scr-head.float {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding-top: calc(12px + var(--safe-top));
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent);
}

.title-lg { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.title-md { font-size: 16px; font-weight: 600; }
.spacer { flex: 1; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  background: rgba(255,255,255,0.85);
  box-shadow: var(--shadow-sm);
}
.icon-btn.circle { background: rgba(0,0,0,0.4); color: #fff; backdrop-filter: blur(8px); }
.icon-btn:active { transform: scale(0.94); }
.scr-head.orange .icon-btn { background: rgba(255,255,255,0.25); color: #fff; }

.text-btn { padding: 6px 4px; font-size: 15px; color: var(--muted); }
.text-btn.primary { color: var(--primary); font-weight: 600; }
.link-btn { color: var(--primary); font-size: 13px; font-weight: 600; padding: 0 4px; }

/* ============ 主体 + 底部 CTA ============ */
.scr-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(100px + var(--safe-bot));
}
.scr-body.no-pad { padding: 0; padding-bottom: calc(110px + var(--safe-bot)); }
.screen[data-has-tab="1"] .scr-body { padding-bottom: calc(88px + var(--safe-bot)); }

.bottom-cta {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  padding: 10px 14px calc(10px + var(--safe-bot));
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.bottom-cta.comment { padding: 8px 14px calc(8px + var(--safe-bot)); }
.bottom-cta.comment input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 999px;
  border: 0;
  font-size: 13px;
}
.empty-hint {
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

/* ============ Tab Bar（底部毛玻璃 + 凸起发布按钮） ============ */
.tab-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(64px + var(--safe-bot));
  padding-bottom: var(--safe-bot);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 10;
  transition: transform 0.22s ease;
}
.tab-bar.hidden { transform: translateY(120%); }
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted-2);
  padding: 6px 0;
  transition: color 0.15s;
}
.tab-btn.active { color: var(--primary); }
.tab-btn .t-icon { font-size: 22px; line-height: 1; }
.tab-btn .t-label { font-size: 10px; font-weight: 500; }
.tab-plus {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF9A5A, #F06433);
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  margin-top: -28px;
  box-shadow: 0 6px 18px rgba(240,100,51,0.45), 0 0 0 4px var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-plus:active { transform: scale(0.92); }

/* ============ 笔记瀑布流（小红书式，2 列） ============ */
.feed-grid {
  columns: 2;
  column-gap: 8px;
}
.note-card {
  break-inside: avoid;
  margin-bottom: 8px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s;
}
.note-card:active { transform: scale(0.98); }
.note-cover {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px;
  color: #fff;
  font-size: 40px;
}
.note-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.12), transparent 50%);
  pointer-events: none;
}
.note-body { padding: 8px 10px 10px; }
.note-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.note-author {
  display: flex;
  align-items: center;
  gap: 4px;
}
.note-author .av {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.like { color: var(--muted); }

/* ============ 路线卡片（探索列表） ============ */
.route-list { display: flex; flex-direction: column; gap: 12px; }
.route-card {
  background: var(--card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.1s;
}
.route-card:active { transform: scale(0.99); }
.route-cover {
  height: 140px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}
.route-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 55%);
}
.route-cover .glyph {
  position: absolute;
  top: 50%; right: 12px;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.65;
}
.route-cover .city-pill {
  position: relative;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 1;
}
.route-info { padding: 12px 14px 14px; }
.route-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.2px; }
.route-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.route-meta .rate { color: var(--warning); font-weight: 600; }
.route-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.route-parking {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #F0F0F0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ============ Tag 语义色 ============ */
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #F2F2F5;
  color: var(--text-2);
  white-space: nowrap;
}
.tag.primary { background: var(--primary-soft); color: var(--primary-dark); }
.tag.quiet { background: #E5F7E8; color: #1F8A2E; }
.tag.warning { background: #FFF1D6; color: #A86500; }
.tag.danger { background: #FFE1DF; color: #B22A20; }
.tag.solid { background: var(--primary); color: #fff; }

/* ============ City + Filter Chips ============ */
.city-row, .filter-row {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.city-row::-webkit-scrollbar, .filter-row::-webkit-scrollbar { display: none; }
.city-chip {
  padding: 4px 2px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  flex-shrink: 0;
  margin-right: 12px;
}
.city-chip.active {
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
}
.city-chip.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}
.filter-chip.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,122,69,0.35);
}

/* ============ 我的页 ============ */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: calc(var(--safe-top) + 8px);
  cursor: pointer;
}
.profile-head:active { opacity: 0.85; }
.avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 2px solid rgba(255,255,255,0.6);
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }

.section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 4px 10px;
  color: var(--text-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pet-item {
  background: var(--card);
  padding: 12px 14px;
  border-radius: var(--r-md);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}
.pet-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.pet-name { font-size: 14px; font-weight: 600; }
.pet-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.checkin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.checkin-cell {
  background: var(--card);
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.checkin-thumb {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.checkin-title {
  padding: 4px 6px 2px;
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkin-date {
  padding: 0 6px 5px;
  font-size: 9px;
  color: var(--muted);
}

/* ============ 路线详情 ============ */
.rd-cover {
  height: 280px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rd-cover .glyph { font-size: 80px; opacity: 0.75; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2)); }
.rd-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, transparent 30%, rgba(247,247,245,0.8) 90%, var(--bg));
}
.rd-section {
  background: var(--card);
  margin: 0 12px 8px;
  padding: 16px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}
.rd-section:first-child { margin-top: -28px; }
.rd-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.rd-meta { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.rd-meta .rate { color: var(--warning); font-weight: 600; }
.warn-bar {
  background: linear-gradient(90deg, #FFF1F0, #FFF7F5);
  border-left: 3px solid var(--danger);
  padding: 12px 14px;
  color: var(--danger);
  font-size: 13px;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  font-size: 14px;
  border-bottom: 1px solid #F5F5F7;
}
.kv-row:last-child { border: 0; }
.kv-row .k { color: var(--muted); font-size: 13px; }
.kv-row .v { color: var(--text); font-weight: 500; }
.verify-line {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 16px 0;
}
.rd-section .note-grid-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

/* ============ 笔记详情 ============ */
.nd-cover {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
}
.nd-section {
  padding: 18px 16px;
  background: var(--card);
}
.nd-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.2px; }
.nd-body { font-size: 15px; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; }
.nd-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--card);
  margin-top: 8px;
}
.nd-author .av {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.nd-author .name { font-size: 14px; font-weight: 600; }
.nd-author .sub { font-size: 12px; color: var(--muted); }
.nd-tags {
  padding: 12px 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--card);
}

/* ============ 通用按钮 + 输入 ============ */
.btn {
  width: 100%;
  background: linear-gradient(135deg, #FF9A5A, #F06433);
  color: #fff;
  padding: 14px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 12px rgba(240,100,51,0.3);
  transition: transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; box-shadow: none; }
.btn.ghost {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--primary-soft);
  box-shadow: none;
}
.bottom-cta .btn { flex: 1; padding: 13px; }
.bottom-cta .btn.ghost { flex: 0 0 auto; width: 88px; }

.ln-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text);
}
.ln-input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,122,69,0.12);
}
.ln-input::placeholder { color: var(--muted-2); }
textarea.ln-input { line-height: 1.6; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; padding: 0 4px; }
.f-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }

/* ============ Stepper（发布路线 4 步） ============ */
.stepper {
  display: flex;
  background: var(--card);
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 4px;
}
.stepper .step {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--muted);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-weight: 500;
}
.stepper .step.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}
.stepper .step.done { color: var(--success); }

/* ============ 模态（底弹 / 中心对话框） ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal.center { align-items: center; padding: 24px; }
.modal .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  animation: fadeIn .2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet, .dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: rise .28s cubic-bezier(.2,.9,.3,1);
}
.sheet {
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 14px 16px calc(14px + var(--safe-bot));
}
.dialog {
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
}
@keyframes rise {
  from { transform: translateY(40px); opacity: 0.4; }
  to   { transform: translateY(0); opacity: 1; }
}
.sheet-title {
  font-size: 15px;
  font-weight: 700;
  padding: 4px 0 14px;
  text-align: center;
  position: relative;
}
.sheet-x {
  position: absolute;
  right: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
}
.sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 12px;
  border-radius: var(--r-md);
  text-align: left;
}
.sheet-item:active { background: var(--bg); }
.sheet-item.simple { padding: 14px; font-size: 15px; }
.sheet-item .s-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.sheet-item .s-name { font-size: 15px; font-weight: 600; }
.sheet-item .s-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sheet-cancel {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: var(--bg);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.dialog-head {
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: relative;
}
.dialog-body { padding: 16px; }
.pet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pet-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid transparent;
}
.pet-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* ============ Toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.88);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.25s cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
  z-index: 300;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(255,59,48,0.95); }
.toast.ok { background: rgba(52,199,89,0.95); }

/* ============ 商城 ============ */
.shop-points-pill {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB57A 0%, #FF7A45 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255,122,69,0.3);
}
.shop-hint {
  padding: 10px 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: var(--r-md);
  font-size: 12px;
  margin-bottom: 12px;
}
.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.shop-card {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.1s;
}
.shop-card:active { transform: scale(0.98); }
.shop-card .sc-emoji {
  font-size: 42px;
  text-align: center;
  line-height: 1;
  padding: 8px 0;
  background: var(--primary-soft);
  border-radius: var(--r-sm);
  margin-bottom: 4px;
}
.shop-card .sc-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.shop-card .sc-sub { font-size: 11px; color: var(--muted); min-height: 28px; }
.shop-card .sc-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.shop-card .sc-points {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 15px;
}
.shop-card .sc-stock {
  font-size: 10px;
  color: var(--muted);
}
.shop-card.unavailable {
  opacity: 0.5;
}
.shop-card.unavailable .sc-emoji { filter: grayscale(1); }

.redemption-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.redemption-row {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.redemption-row .r-emoji {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.redemption-row .r-info { flex: 1; min-width: 0; }
.redemption-row .r-title { font-size: 14px; font-weight: 600; }
.redemption-row .r-code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
}
.redemption-row .r-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  flex-shrink: 0;
}
.redemption-row .r-status.used { background: var(--muted); }

.redeem-preview {
  text-align: center;
  padding: 8px 0 16px;
}
.redeem-preview .rp-emoji { font-size: 60px; margin-bottom: 8px; }
.redeem-preview .rp-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.redeem-preview .rp-desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.redeem-preview .rp-cost {
  font-size: 14px;
  margin-top: 8px;
  padding: 10px;
  background: var(--bg);
  border-radius: var(--r-sm);
}
.redeem-preview .rp-cost .pay { color: var(--danger); font-weight: 600; }
.redeem-preview .rp-cost .left { color: var(--muted); }

.redeem-code-card {
  background: linear-gradient(135deg, #FFF7E6, #FFE4A8);
  border-radius: var(--r-md);
  padding: 20px 14px;
  text-align: center;
  margin-bottom: 14px;
}
.redeem-code-card .rcc-label { font-size: 12px; color: var(--muted); }
.redeem-code-card .rcc-code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 2px;
  margin: 8px 0;
  user-select: all;
}
.redeem-code-card .rcc-hint { font-size: 11px; color: var(--muted); }

/* ============ 积分卡（我的页头部 + 积分屏） ============ */
.points-banner {
  margin-top: 14px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.points-banner:active { background: rgba(255,255,255,0.28); }
.points-banner .p-icon { font-size: 18px; }
.points-banner .p-label { flex: 1; font-weight: 500; }
.points-banner .p-value { font-weight: 700; font-size: 16px; }
.points-banner .p-arrow { opacity: 0.7; }

.points-card {
  background: linear-gradient(135deg, #FFB57A 0%, #FF7A45 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 6px;
  box-shadow: 0 8px 24px rgba(255,122,69,0.35);
}
.points-card .pc-label { font-size: 13px; opacity: 0.85; }
.points-card .pc-value { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 6px 0; letter-spacing: -1px; }
.points-card .pc-hint { font-size: 12px; opacity: 0.85; }

.points-history {
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 4px 14px;
}
.point-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F5F5F7;
  font-size: 14px;
}
.point-row:last-child { border: 0; }
.point-row .pr-left .pr-reason { font-weight: 500; }
.point-row .pr-left .pr-date { font-size: 11px; color: var(--muted); margin-top: 2px; }
.point-row .pr-right { text-align: right; }
.point-row .pr-delta { font-weight: 700; }
.point-row .pr-delta.plus { color: var(--success); }
.point-row .pr-delta.minus { color: var(--danger); }
.point-row .pr-balance { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ============ 设置屏专用 ============ */
.profile-head .profile-meta { flex: 1; }
.scr-head.orange .settings-icon {
  background: rgba(255,255,255,0.2);
  color: #fff;
  width: 38px; height: 38px;
  font-size: 18px;
  border: 1px solid rgba(255,255,255,0.3);
}
.scr-head.orange .settings-icon:active { background: rgba(255,255,255,0.35); }

.api-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.api-banner .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.api-banner.offline { background: #FFF7E6; color: #A86500; border: 1px solid #FFE4A8; }
.api-banner.offline .dot { background: #FF9F0A; box-shadow: 0 0 0 3px rgba(255,159,10,0.2); }
.api-banner.online { background: #E5F7E8; color: #1F8A2E; border: 1px solid #B7E6BE; }
.api-banner.online .dot { background: #34C759; box-shadow: 0 0 0 3px rgba(52,199,89,0.2); }
.api-banner.error { background: #FFEBE9; color: #B22A20; border: 1px solid #FFCBC6; }
.api-banner.error .dot { background: #FF3B30; box-shadow: 0 0 0 3px rgba(255,59,48,0.2); }
.api-banner.testing { background: #E7F1FF; color: #1E5FB3; border: 1px solid #B9D4F5; }
.api-banner.testing .dot { background: #1E5FB3; animation: pulse 1s infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
}

.btn-row { display: flex; gap: 10px; margin-top: 6px; margin-bottom: 12px; }
.btn-row .btn { flex: 1; margin: 0; }

.steps-box {
  background: var(--card);
  border-radius: var(--r-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}
.step-item {
  padding: 10px 0;
  border-bottom: 1px solid #F5F5F7;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}
.step-item:last-child { border: 0; }
.step-item b { color: var(--primary); margin-right: 6px; }
.step-item code {
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--primary-dark);
}
.step-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.btn.ghost.danger {
  border-color: #FFCBC6;
  color: var(--danger);
  background: #FFF5F4;
}
.btn.ghost.danger:active { background: #FFE1DF; }
.f-label.danger-label { color: var(--danger); }

/* ============ 图片选择器（发布笔记） ============ */
.image-picker {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.image-previews { display: contents; }
.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--border);
}
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-item .remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-preview-item .loading {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px;
}
.image-add-btn {
  aspect-ratio: 1;
  border: 2px dashed var(--muted-2);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.image-add-btn:active { transform: scale(0.97); background: var(--bg); }
.image-add-btn .plus-icon { font-size: 26px; line-height: 1; font-weight: 200; }
.image-add-btn .label { font-size: 11px; }
.image-add-btn.hidden { display: none; }

/* ============ 笔记封面图（API 模式有图时替换 emoji） ============ */
.note-cover.has-image { padding: 0; font-size: 0; }
.note-cover.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.note-cover.has-image::after { display: none; }

.nd-cover.has-image { font-size: 0; padding: 0; }
.nd-cover.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============ 打卡时间线（路线详情） ============ */
.checkin-timeline {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F5F5F7;
  position: relative;
}
.timeline-row:last-child { border: 0; }
.timeline-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.timeline-info { flex: 1; min-width: 0; }
.timeline-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.timeline-meta .name { color: var(--text); font-weight: 600; }
.timeline-pets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.timeline-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 20px 0;
}

/* 顶部全局告警条（API 断开时出现在其他屏顶） */
.top-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 8px 14px;
  background: #FFEBE9;
  color: #B22A20;
  font-size: 12px;
  text-align: center;
  font-weight: 500;
  z-index: 5;
  border-bottom: 1px solid #FFCBC6;
  animation: slideDown .3s;
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ── Sprint 4: 评论 / 点赞 / 收藏 ── */

/* 点赞按钮 */
.like-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 0;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, transform .15s;
  white-space: nowrap;
}
.like-btn.liked { color: #E53935; }
.like-btn:active { transform: scale(0.92); }

/* 发送按钮 */
#commentSend {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: center;
}

/* 评论区 */
.comment-section {
  padding: 10px 14px 80px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.comment-row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.comment-row:last-child { border-bottom: 0; }
.comment-nick { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.comment-body { font-size: 14px; color: var(--text); line-height: 1.5; }
.comment-time { font-size: 11px; color: var(--muted); margin-top: 3px; }
.comment-loading, .comment-empty {
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 收藏按钮激活态 */
.btn.ghost.active { color: var(--primary); border-color: var(--primary); }
