/* ===========================================
   食痕地图 · Design Tokens
   主题：私人美食手账 / 老式菜单纸 / 印章感
   =========================================== */

:root {
  /* 色板 */
  --paper:      #FAF6EE;
  --paper-deep: #F0E9D8;
  --ink:        #2B2522;
  --ink-soft:   #6B6056;
  --chili:      #C0432F;
  --chili-deep: #9E3324;
  --matcha:     #8B9A6B;
  --ginger:     #E8A33D;
  --line:       #DCD3BE;
  --white-card: #FFFEFA;

  /* 字体 */
  --font-display: 'Noto Serif SC', serif;
  --font-body: 'Noto Sans SC', sans-serif;

  /* 阴影 */
  --shadow-card: 0 12px 32px rgba(43, 37, 34, 0.18);
  --shadow-soft: 0 2px 8px rgba(43, 37, 34, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ===== 顶部栏 ===== */

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-stamp {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  color: var(--chili);
  letter-spacing: 2px;
  position: relative;
}

.brand-sub {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.topbar-stats {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.5px;
}

/* ===== 主体布局 ===== */

.app {
  position: relative;
  width: 100%;
  height: calc(100vh - 57px);
  overflow: hidden;
}

.map-container {
  width: 100%;
  height: 100%;
}

/* 高德地图自带控件做轻微调色，融入纸感 */
.map-container .amap-logo,
.map-container .amap-copyright {
  opacity: 0.5;
}

/* ===== 自定义标记点（由 JS 注入 content） ===== */

.food-marker {
  width: 30px;
  height: 38px;
  position: relative;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.15s ease;
}

.food-marker:hover {
  transform: translateY(-3px);
}

.food-marker svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 4px rgba(43, 37, 34, 0.35));
}

.food-marker.is-active svg .pin-body {
  fill: var(--ginger);
}

/* ===== 卡片：桌面端侧滑 / 移动端底部抽屉 ===== */

.place-card {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 92vw;
  background: var(--white-card);
  box-shadow: var(--shadow-card);
  z-index: 30;
  padding: 28px 26px 32px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  border-left: 1px solid var(--line);
}

.place-card.is-open {
  transform: translateX(0);
}

.card-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-close:hover {
  background: var(--line);
  color: var(--ink);
}

.card-stamp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  margin-top: 6px;
}

.card-stamp {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--white-card);
  background: var(--chili);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 1px;
  transform: rotate(-2deg);
  display: inline-block;
}

.card-city {
  font-size: 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--ink);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 13px;
}

.card-cuisine {
  background: var(--matcha);
  color: var(--white-card);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.card-price {
  color: var(--ink-soft);
  font-weight: 700;
}

.card-rating {
  color: var(--ginger);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.card-section {
  margin-bottom: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.card-section-label {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 10px;
  font-weight: 700;
}

.dish-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dish-list li {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  position: relative;
}

.dish-list li::before {
  content: '🥢';
  margin-right: 5px;
  font-size: 11px;
}

.card-review {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.card-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.card-action-btn:active {
  transform: scale(0.98);
}

.card-action-btn.primary {
  background: var(--chili);
  color: var(--white-card);
}

.card-action-btn.primary:hover {
  background: var(--chili-deep);
}

.card-action-btn.secondary {
  background: var(--paper-deep);
  color: var(--ink);
  border: 1px solid var(--line);
}

.card-action-btn.secondary:hover {
  background: var(--line);
}

/* 遮罩层，仅移动端启用 */
.card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 37, 34, 0.35);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.card-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ===== 移动端：底部抽屉 ===== */

@media (max-width: 720px) {
  .place-card {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 78vh;
    border-left: none;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    padding: 24px 22px 28px;
  }

  .place-card.is-open {
    transform: translateY(0);
  }

  .place-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--line);
    border-radius: 100px;
  }

  .card-close {
    top: 16px;
    right: 16px;
  }

  .card-title {
    font-size: 23px;
  }
}

@media (max-width: 480px) {
  .brand-sub { display: none; }
  .topbar-inner { padding: 12px 16px; }
}
