﻿:root {
  --bg: #f2eadb;
  --card: rgba(251, 248, 242, 0.94);
  --line: rgba(214, 173, 120, 0.48);
  --text: #2b353f;
  --muted: #6f756f;
  --brand: #3b5944;
  --brand-dark: #31493a;
  --accent: #cd8147;
  --danger: #c04545;
  --accent-soft: rgba(205, 129, 71, 0.16);
  --soft-gold: rgba(214, 173, 120, 0.22);
  --shadow: 0 20px 42px rgba(43, 53, 63, 0.09);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 173, 120, 0.28), transparent 26%),
    linear-gradient(180deg, #f7f2e9 0%, #f2eadb 100%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

.app-shell { height: 100vh; padding: 14px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid rgba(37, 49, 58, 0.08); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-section { min-height: 0; }
.page-section[hidden] { display: none !important; }
.local-open-notice {
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(191, 90, 43, 0.22);
  background: linear-gradient(180deg, rgba(255, 244, 235, 0.98), rgba(255, 251, 246, 0.98));
  color: var(--text);
  box-shadow: 0 10px 24px rgba(89, 63, 39, 0.08);
  line-height: 1.7;
}
.local-open-notice strong { color: var(--brand-dark); }
.global-nav {
  padding: 8px 14px 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  overflow: visible;
}
.brand-wrap { position: relative; width: fit-content; flex: 0 1 auto; min-width: 0; }
.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 4px 0 0;
  border-radius: 12px;
  transition: background 0.18s ease;
}
.brand-wrap:hover .brand-block { background: rgba(255, 255, 255, 0.38); }
.brand-mark {
  display: block;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  margin: 0;
  filter: drop-shadow(0 10px 18px rgba(43, 53, 63, 0.12));
}
.brand-wordmark {
  display: block;
  height: 28px;
  width: auto;
}
.brand-wordmark-text {
  display: inline-flex;
  align-items: center;
  color: var(--text-strong);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}
.brand-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 250px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(212, 199, 176, 0.96);
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 18px 36px rgba(89, 63, 39, 0.16);
  display: grid;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}
.brand-wrap:hover .brand-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.brand-popover-logo-wrap {
  display: flex;
  justify-content: center;
}
.brand-popover-logo {
  width: 48px;
  height: 48px;
  display: block;
}
.brand-popover-head,
.brand-popover-meta,
.brand-popover-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.brand-popover-meta {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(212, 199, 176, 0.96);
  font-size: 12px;
  color: var(--muted);
}
.brand-popover-meta strong { color: var(--text); font-size: 18px; }
.brand-popover-actions { flex-wrap: wrap; }
.nav-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  margin-left: auto;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(37, 49, 58, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(43, 53, 63, 0.08);
}
.nav-tabs { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: nowrap; }
.nav-tab {
  border: 1px solid rgba(37, 49, 58, 0.12);
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  min-height: 36px;
}
.nav-tab.active {
  background: var(--brand);
  color: white;
  border-color: transparent;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(59, 89, 68, 0.12);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.home-page {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.home-page.signed-in {
  height: 100%;
  overflow: hidden;
  padding-right: 0;
}
.home-grid {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(360px, 1fr);
  gap: 14px;
  align-content: start;
}
.home-page.signed-in .home-grid {
  height: 100%;
  min-height: 0;
  align-content: stretch;
}
.home-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}
.home-overview-card {
  min-height: 280px;
  grid-template-rows: auto minmax(0, 1fr);
}
.home-overview-shell {
  display: grid;
  gap: 14px;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.plans-card { min-height: 280px; }
.library-page {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.library-card {
  min-height: calc(100vh - 170px);
}
.plan-toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.account-card {
  align-self: start;
  position: sticky;
  top: 0;
}
.home-grid.signed-in {
  grid-template-columns: minmax(380px, 0.92fr) minmax(520px, 1.28fr);
  grid-auto-rows: minmax(0, 1fr);
  align-items: stretch;
}
.home-grid.signed-in .home-overview-card {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.footprint-card {
  grid-column: 1 / -1;
  min-height: 560px;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}
.home-grid.signed-in .footprint-card {
  grid-column: auto;
  height: 100%;
  overflow: hidden;
}
.overview-intro-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(212, 199, 176, 0.96);
  background:
    radial-gradient(circle at top right, rgba(214, 173, 120, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 243, 235, 0.92));
}
.overview-intro {
  margin: 0;
  max-width: 42ch;
  font-size: 14px;
}
.overview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.overview-spotlight {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(59, 89, 68, 0.96), rgba(43, 53, 63, 0.96)),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
  color: rgba(255, 250, 244, 0.96);
  box-shadow: 0 20px 36px rgba(43, 53, 63, 0.18);
}
.overview-spotlight .eyebrow,
.overview-spotlight .panel-note,
.overview-spotlight .plan-card-meta {
  color: rgba(255, 245, 236, 0.8);
}
.overview-spotlight-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.overview-spotlight h3 {
  font-size: 24px;
  line-height: 1.15;
  color: #fffaf3;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 0;
}
.overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.overview-metric-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(212, 199, 176, 0.96);
  min-height: 88px;
}
.overview-metric-card:nth-child(1) strong {
  color: var(--text);
}
.overview-metric-card:nth-child(2) strong {
  color: var(--accent);
}
.overview-metric-card:nth-child(3) strong {
  color: var(--brand);
}
.overview-metric-card span {
  font-size: 12px;
  color: var(--muted);
}
.overview-metric-card strong {
  font-size: 24px;
}
.overview-mini-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(212, 199, 176, 0.96);
  min-height: 0;
  height: 100%;
  align-self: stretch;
  overflow: hidden;
  grid-template-rows: auto minmax(0, 1fr);
}
.overview-mini-note {
  margin: 4px 0 0;
  font-size: 12px;
}
.overview-mini-panel .sub-head {
  align-items: flex-start;
}
.footprint-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.footprint-stat-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(212, 199, 176, 0.96);
}
.footprint-stat-card span {
  font-size: 12px;
  color: var(--muted);
}
.footprint-stat-card strong {
  font-size: 22px;
  color: var(--text);
}
.footprint-map-shell {
  position: relative;
  min-height: 380px;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(212, 199, 176, 0.96);
  background:
    radial-gradient(circle at top left, rgba(214, 173, 120, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(251, 247, 239, 0.96), rgba(244, 238, 228, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}
.footprint-map-shell.is-hovering {
  border-color: rgba(59, 89, 68, 0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 18px 36px rgba(59, 89, 68, 0.08);
  transform: translateY(-1px);
}
.footprint-content {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(280px, 0.88fr);
  gap: 14px;
  align-items: stretch;
  min-height: 0;
}
.footprint-side-panel {
  display: grid;
  gap: 12px;
  min-height: 0;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}
.footprint-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(212, 199, 176, 0.96);
  min-height: 0;
  overflow: hidden;
  align-content: start;
}
.footprint-detail-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.footprint-ranking-panel {
  grid-template-rows: auto minmax(0, 1fr);
}
.footprint-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.footprint-panel-title-row strong {
  font-size: 18px;
  color: var(--text);
}
.footprint-map-stage {
  position: absolute;
  inset: 0;
  cursor: pointer;
}
.footprint-map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  line-height: 1.8;
  color: var(--muted);
  background: rgba(250, 246, 238, 0.78);
  z-index: 2;
}
.footprint-map-empty.is-hidden {
  display: none;
}
.visited-city-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #cd8147;
  border: 2px solid rgba(255, 250, 244, 0.96);
  box-shadow: 0 0 0 4px rgba(205, 129, 71, 0.18), 0 8px 18px rgba(43, 53, 63, 0.18);
}
.footprint-info-window {
  display: grid;
  gap: 4px;
  min-width: 160px;
  color: var(--text);
}
.footprint-info-window strong {
  font-size: 14px;
}
.footprint-info-window span {
  font-size: 12px;
  color: var(--muted);
}
.footprint-city-list,
.footprint-ranking-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}
.footprint-city-item,
.footprint-ranking-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 243, 235, 0.82);
  border: 1px solid rgba(212, 199, 176, 0.88);
}
.footprint-city-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.footprint-city-main,
.footprint-ranking-main {
  display: grid;
  gap: 4px;
}
.footprint-city-main strong,
.footprint-ranking-main strong {
  color: var(--text);
  font-size: 14px;
}
.footprint-city-main span,
.footprint-ranking-main span {
  color: var(--muted);
  font-size: 12px;
}
.footprint-city-badge,
.footprint-ranking-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 89, 68, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.footprint-ranking-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.footprint-ranking-item:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 89, 68, 0.24);
}
.footprint-ranking-rank {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(59, 89, 68, 0.92), rgba(43, 53, 63, 0.92));
  color: #fffaf3;
  font-size: 12px;
  font-weight: 800;
}
.footprint-ranking-item.is-active {
  background: linear-gradient(180deg, rgba(241, 247, 242, 0.94), rgba(233, 241, 235, 0.94));
  border-color: rgba(59, 89, 68, 0.28);
}
.mini-plan-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}
.mini-plan-item {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(248, 243, 235, 0.84);
  border: 1px solid rgba(212, 199, 176, 0.88);
}
.mini-plan-item.is-current {
  background: linear-gradient(180deg, rgba(241, 247, 242, 0.94), rgba(233, 241, 235, 0.94));
  border-color: rgba(59, 89, 68, 0.28);
}
.mini-plan-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.mini-plan-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.mini-plan-item .plan-card-meta {
  gap: 6px;
}
.mini-plan-item .ghost.small {
  justify-self: start;
}
.account-card[hidden] { display: none !important; }
.auth-switcher { display: inline-flex; gap: 8px; padding: 4px; border-radius: 999px; background: rgba(37, 49, 58, 0.05); width: fit-content; }
.auth-switch {
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
}
.auth-switch.active {
  background: white;
  border-color: rgba(37, 49, 58, 0.08);
}
.auth-form { display: grid; gap: 12px; }
.inline-notice, .panel-note {
  line-height: 1.7;
  font-size: 13px;
  color: var(--muted);
}
.inline-notice {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(205, 129, 71, 0.28);
  background: rgba(255, 246, 237, 0.92);
  color: var(--accent);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-field {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(212, 199, 176, 0.96);
}
.profile-field strong { font-size: 16px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.plan-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.plan-stat-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(212, 199, 176, 0.96);
}
.plan-stat-card span {
  font-size: 12px;
  color: var(--muted);
}
.plan-stat-card strong {
  font-size: 22px;
  color: var(--text);
}
.plan-manager-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: end;
}
.plan-search-field,
.plan-sort-field {
  display: grid;
  gap: 6px;
}
.plan-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-filter {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid rgba(37, 49, 58, 0.12);
  padding: 8px 14px;
}
.plan-filter.active {
  background: var(--brand);
  color: white;
  border-color: transparent;
}
.plan-manager-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.plan-list {
  display: grid;
  gap: 14px;
  align-content: start;
}
.plan-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(212, 199, 176, 0.96);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,243,235,0.96));
  box-shadow: 0 18px 34px rgba(43, 53, 63, 0.08);
  overflow: hidden;
  position: relative;
}
.plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, rgba(59, 89, 68, 0.92), rgba(205, 129, 71, 0.84));
}
.plan-card.archived::before {
  background: linear-gradient(90deg, rgba(132, 140, 147, 0.9), rgba(169, 173, 177, 0.76));
}
.plan-card.current::before {
  height: 6px;
  background: linear-gradient(90deg, rgba(59, 89, 68, 1), rgba(214, 173, 120, 0.95));
}
.plan-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.plan-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.plan-main { display: grid; gap: 8px; }
.plan-card h3 {
  font-size: 21px;
  line-height: 1.15;
  color: var(--text);
}
.plan-card-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.plan-summary-chip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(212, 199, 176, 0.92);
}
.plan-summary-chip span {
  font-size: 11px;
  color: var(--muted);
}
.plan-summary-chip strong {
  font-size: 14px;
  color: var(--text);
}
.plan-card-notes {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 89, 68, 0.12);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.plan-status.archived {
  background: rgba(103, 115, 127, 0.14);
  color: var(--muted);
}
.empty-block {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(205, 129, 71, 0.35);
  color: var(--muted);
  background: rgba(255, 250, 244, 0.9);
  line-height: 1.7;
}
.planner-page {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}
.topbar { padding: 14px 18px; display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.eyebrow { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand); }
.title-block h1, .title-block h2 { font-size: 28px; }
.planner-caption { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.trip-inline { display: grid; grid-template-columns: 2fr 0.8fr 1fr 1fr; gap: 10px; align-items: center; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.workspace { min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pane { min-height: 0; display: grid; padding: 16px; overflow: hidden; }
.left-pane { grid-template-rows: auto auto auto 1fr; }
.center-pane { grid-template-rows: auto 1fr; }
.right-pane { grid-template-rows: auto auto minmax(320px, 1fr) auto; }
.section-head, .day-header, .place-title-row, .item-top, .right-head, .map-toolbar, .sub-head, .segment-top, .center-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.map-toolbar { align-items: center; }
.map-day-field { display: block; }
.map-day-field select { min-width: 172px; height: 38px; }
.map-toolbar .ghost { height: 38px; display: inline-flex; align-items: center; justify-content: center; }
.section-head { margin-bottom: 10px; }
.status, .muted { color: var(--muted); }
.status, .mini { font-size: 12px; }
.mini { color: var(--muted); }
label { display: grid; gap: 4px; }
label span, .time-label { font-size: 12px; color: var(--muted); }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.96);
  color: var(--text);
  border-radius: 11px;
  padding: 8px 10px;
}
button { border: 0; border-radius: 999px; padding: 10px 14px; background: var(--brand); color: white; font-weight: 700; }
button:hover { background: var(--brand-dark); }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.small { padding: 6px 10px; font-size: 12px; }
.search-box { margin-bottom: 10px; }
.search-input-wrap { position: relative; }
.place-pool, .days-container, .route-summary { overflow: auto; }
.planner-status-row { margin: 0 0 8px; }
.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  border: 1px solid rgba(212, 199, 176, 0.96);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.99);
  box-shadow: 0 12px 28px rgba(89, 63, 39, 0.16);
  max-height: 420px;
  overflow: auto;
}
.suggestions.has-items { display: block; }
.suggestion-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid rgba(212, 199, 176, 0.96); background: transparent; }
.suggestion-row:last-child { border-bottom: 0; }
.suggestion-row.active, .suggestion-row:hover { background: rgba(255, 242, 226, 0.96); }
.suggestion-main { min-width: 0; display: grid; gap: 2px; }
.suggestion-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.suggestion-tag { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.add-inline { width: 34px; height: 34px; border-radius: 10px; padding: 0; display: inline-grid; place-items: center; font-size: 20px; line-height: 1; }
.sub-head { margin: 4px 0 8px; }
.place-pool, .route-summary { display: grid; gap: 8px; min-height: 0; padding-right: 4px; align-content: start; grid-auto-rows: max-content; }
.days-container { display: block; min-height: 0; overflow: auto; padding-right: 4px; }
.place-card, .day-card, .itinerary-item, .segment-card, .summary-card { border: 1px solid rgba(212, 199, 176, 0.96); border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,247,240,0.96)); }
.place-card, .itinerary-item, .segment-card, .summary-card { padding: 10px; }
.place-card { min-height: 72px; display: flex; align-items: center; box-shadow: 0 8px 18px rgba(89, 63, 39, 0.07); }
.place-main, .item-main { min-width: 0; display: grid; gap: 2px; }
.place-name, .item-name { font-size: 15px; }
.place-card.dragging, .itinerary-item.dragging { opacity: 0.45; }
.day-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.day-tab { border: 1px solid var(--line); background: rgba(255,255,255,0.7); color: var(--text); padding: 7px 12px; border-radius: 999px; font-size: 12px; }
.day-tab.active { background: var(--brand); color: white; border-color: transparent; }
.day-card { padding: 12px; }
.day-stats { font-size: 12px; color: var(--muted); }
.drop-zone { margin-top: 10px; min-height: 76px; padding: 8px; border-radius: 16px; border: 2px dashed rgba(205, 129, 71, 0.22); background: rgba(255, 248, 239, 0.82); display: grid; gap: 8px; align-content: start; }
.drop-zone.empty::before { content: "将左侧地点拖到这里，或拖动已有行程块调整顺序"; color: var(--muted); font-size: 13px; }
.drop-zone.drag-over { background: rgba(251, 235, 219, 0.95); border-color: rgba(205, 129, 71, 0.7); }
.itinerary-item { display: grid; gap: 8px; }
.itinerary-item.edge-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.itinerary-item.edge-item .item-top,
.itinerary-item.edge-item .compact-note-field { grid-column: 1 / -1; }
.itinerary-item.edge-item .time-grid { grid-template-columns: minmax(0, 1fr); }
.itinerary-item.edge-item .compact-grid-item { grid-template-columns: minmax(0, 1fr); }
.item-order { font-size: 13px; color: var(--accent); }
.item-address { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.time-chip { border: 1px solid rgba(212, 199, 176, 0.96); border-radius: 12px; background: rgba(255,255,255,0.78); padding: 8px 10px; display: grid; gap: 4px; }
.time-chip strong { font-size: 14px; }
.compact-grid { display: grid; gap: 8px; }
.compact-grid-item { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-note-field input { padding: 7px 10px; }
.field-hidden { display: none !important; }
.segment-card { display: grid; gap: 6px; margin: -2px 8px 0 24px; background: rgba(247, 241, 233, 0.95); border-style: dashed; }
.segment-label { font-size: 12px; color: var(--brand); font-weight: 700; }
.segment-metrics { font-size: 12px; color: var(--muted); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,0.72); border: 1px solid rgba(212, 199, 176, 0.96); font-size: 12px; }
.legend-line { width: 18px; height: 4px; border-radius: 999px; }
.map-canvas { position: relative; min-height: 320px; height: 100%; border-radius: 18px; border: 1px solid rgba(37, 49, 58, 0.1); overflow: hidden; background: linear-gradient(180deg, rgba(229, 244, 240, 0.88), rgba(252, 248, 240, 0.94)); }
.map-stage { position: absolute; inset: 0; }
.map-empty { position: absolute; inset: 0; display: none; place-items: center; padding: 24px; text-align: center; line-height: 1.7; color: var(--muted); background: rgba(255, 252, 247, 0.82); z-index: 2; }
.map-empty.is-visible { display: grid; }
.route-summary { margin-top: 10px; }
.summary-card strong { display: block; margin-bottom: 6px; }
.summary-card.day-focus { border-color: rgba(59, 89, 68, 0.35); background: rgba(245, 250, 246, 0.96); }
.segment-list { display: grid; gap: 6px; margin-top: 8px; }
.segment-row { display: grid; gap: 3px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.75); border: 1px solid rgba(212, 199, 176, 0.9); font-size: 12px; }
.mode-badge { display: inline-flex; width: fit-content; padding: 2px 8px; border-radius: 999px; color: white; font-weight: 700; }
.drop-marker { height: 8px; border-radius: 999px; background: rgba(205, 129, 71, 0.2); border: 1px dashed rgba(205, 129, 71, 0.7); }

@media print {
  body { overflow: visible; background: white; }
  .app-shell { height: auto; padding: 0; gap: 10px; }
  .global-nav, .home-page, .library-page, .local-open-notice { display: none !important; }
  #plannerPage { display: grid !important; }
  .topbar { display: block; padding: 12px; }
  .top-actions, .suggestions, .map-toolbar, .day-tabs { display: none !important; }
  .workspace { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .pane { display: block; overflow: visible; min-height: auto; padding: 12px; }
  .right-pane { break-before: page; }
  .map-canvas { min-height: 420px; height: 420px; }
  .map-empty { display: none !important; }
  .place-pool, .days-container, .route-summary { overflow: visible; max-height: none; }
  .card { box-shadow: none; border: 1px solid #ddd; background: white; }
}

@media (max-width: 1360px) {
  body { overflow: auto; }
  .app-shell { height: auto; }
  .home-page.signed-in { height: auto; overflow: auto; padding-right: 4px; }
  .home-grid { grid-template-columns: 1fr; }
  .home-page.signed-in .home-grid { height: auto; }
  .workspace { grid-template-columns: 1fr; }
  .global-nav, .topbar { align-items: start; }
  .plan-stats-grid, .overview-metrics, .footprint-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .footprint-content { grid-template-columns: 1fr; }
  .footprint-side-panel { grid-template-rows: auto; height: auto; }
  .plan-card-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-inline, .time-grid, .compact-grid-item { grid-template-columns: 1fr 1fr; }
  .pane { min-height: 420px; }
  .footprint-card { grid-column: auto; }
}

@media (max-width: 780px) {
  .global-nav { flex-direction: column; align-items: flex-start; gap: 10px; }
  .brand-block { min-height: 40px; }
  .brand-mark { width: 44px; height: 44px; margin: 0; }
  .brand-wordmark-text { font-size: 1.05rem; }
  .nav-meta { width: 100%; }
  .profile-grid { grid-template-columns: 1fr; }
  .plan-stats-grid, .plan-manager-bar, .overview-metrics, .plan-card-summary, .footprint-stats { grid-template-columns: 1fr; }
  .trip-inline, .time-grid, .compact-grid-item { grid-template-columns: 1fr; }
  .itinerary-item.edge-item { grid-template-columns: 1fr; }
  .itinerary-item.edge-item .item-top,
  .itinerary-item.edge-item .compact-note-field { grid-column: auto; }
  .brand-popover { min-width: 220px; }
  .nav-meta, .nav-tabs, .top-actions, .right-head, .map-toolbar, .item-top, .day-header, .section-head, .sub-head, .segment-top, .suggestion-top, .place-title-row, .center-head, .plan-card-top, .plan-actions, .profile-actions, .plan-toolbar-actions, .plan-manager-summary, .brand-popover-head, .brand-popover-meta, .brand-popover-actions, .overview-actions, .overview-intro-row { flex-direction: column; align-items: flex-start; }
  .day-tabs { justify-content: flex-start; }
}


