:root {
  --ink: #182f32;
  --muted: #627471;
  --green: #086b63;
  --green-hover: #0a7d74;
  --green-light: #e8f3ef;
  --lime: #def49e;
  --gold: #b37e28;
  --line: #e1e8e5;
  --bg: #f5f7f6;
  --white: #ffffff;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid #69bcb3;
  outline-offset: 3px;
}

/* 头部导航 */
header {
  height: 84px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(4vw, 24px);
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand-logo {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 210px;
  aspect-ratio: 3/1;
  overflow: hidden;
  background: #fff;
}
.brand-logo img {
  position: absolute;
  width: 113.78%;
  max-width: none;
  height: auto;
  left: -7.4%;
  top: -62.2%;
  display: block;
}
nav {
  display: flex;
  gap: 28px;
  height: 100%;
  align-items: center;
}
nav a {
  height: 100%;
  display: flex;
  align-items: center;
  color: #687978;
  font-weight: 600;
  font-size: 15px;
  border-bottom: 3px solid transparent;
  padding-top: 3px;
  transition: color 0.15s;
}
nav a:hover { color: var(--green); }
nav a.active {
  color: var(--green);
  border-color: var(--green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  font-size: 14px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8efeb;
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 600;
}
.account b {
  background: #e8f0e9;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--green);
}

/* 主容器 */
main {
  max-width: 1320px;
  margin: auto;
  padding: 28px 36px 40px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--green);
  font-weight: 800;
}
h1 {
  font-size: 32px;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin: 6px 0;
}
p { color: var(--muted); margin: 6px 0; }
.location {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  color: #3b504d;
}
.location small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}

/* 顶部横幅 */
.coast-banner {
  height: 250px;
  border-radius: 16px;
  background: #165c66 url("./coast.jpg") no-repeat center 57% / cover;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(11, 48, 43, 0.15);
}
.banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 41, 45, 0.88), rgba(8, 41, 45, 0.3) 80%);
}
.banner-copy {
  position: relative;
  padding: 28px 36px;
  max-width: 680px;
}
.label-light {
  font-size: 12px;
  color: #e4f3d2;
  letter-spacing: 1px;
  font-weight: 600;
}
.banner-copy h2 {
  font-size: 28px;
  line-height: 1.35;
  margin: 8px 0 10px;
}
.banner-copy p {
  color: #e2eeeb;
  font-size: 14px;
  margin-bottom: 16px;
}
.banner-btns {
  display: flex;
  gap: 12px;
  align-items: center;
}
.light-btn {
  background: var(--lime);
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  color: #173830;
  font-size: 14px;
  font-weight: 700;
  transition: opacity 0.2s;
}
.light-btn:hover { opacity: 0.92; }
.trans-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.trans-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
.banner-index {
  position: absolute;
  right: 32px;
  bottom: 24px;
  font-size: 28px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
}
.banner-index span {
  font-size: 10px;
  letter-spacing: 2px;
  margin-left: 8px;
}

/* 布局网格 */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
}
.section-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-top h2 { font-size: 22px; margin: 0; }
.section-top h3 { font-size: 16px; margin: 0; }
.section-top > span { font-size: 13px; color: var(--muted); }

/* 搜索与筛选 */
.search {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}
.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
}
.search select {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  color: var(--ink);
  min-width: 110px;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}
.chip {
  border: 1px solid var(--line);
  color: #556966;
  background: #fff;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  transition: all 0.15s;
}
.chip:hover { border-color: #abbcb7; }
.chip.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 600;
}

/* 卡片栅格 */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(18, 48, 40, 0.08);
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.tag {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: #386759;
  background: #edf6f1;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.tag.tag-gold { background: #fdf5e8; color: #a37222; }
.tag.blue { background: #edf4f9; color: #3b6b8c; }
.date { font-size: 12px; color: #80928c; }
.card h3 { font-size: 18px; line-height: 1.4; margin: 12px 0 6px; }
.place { font-size: 13px; color: #72847f; }
.metrics {
  display: flex;
  gap: 22px;
  margin: 18px 0;
}
.metrics strong {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.8px;
  font-weight: 750;
  color: var(--ink);
}
.metrics em {
  font-size: 12px;
  font-style: normal;
  margin-left: 4px;
  color: #7b8e88;
}
.metrics small {
  display: block;
  color: #7d908a;
  font-size: 11px;
  margin-top: 5px;
}
.card-bottom {
  padding-top: 14px;
  border-top: 1px solid #edf1ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.people { font-size: 12px; color: #788c85; }
.mini-avatars { display: inline-flex; margin-right: 6px; }
.mini-avatars i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  background: #c5dcd2;
  border-radius: 50%;
  margin-right: -6px;
  font-size: 9px;
  color: #3e6250;
  font-weight: 700;
}
.mini-avatars i:nth-child(2) { background: #f0debb; color: #775211; }
.mini-avatars i:nth-child(3) { background: #bed6df; color: #23596d; }
.join {
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  transition: background 0.15s;
}
.join:hover { background: var(--green-hover); }
.join.joined { color: var(--green); background: #e5f1ec; }

/* 侧边栏卡片 */
.side-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  row-gap: 10px;
  margin: 16px -2px;
  font-size: 12px;
}
.days span { color: #949f9a; }
.days b { font-weight: 600; padding: 4px 0; }
.chosen { background: var(--green); color: #fff; border-radius: 50%; }
.days .dot { color: var(--green); background: #ebf3ec; border-radius: 50%; }
.next-run {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.tiny-label {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #798b84;
  font-weight: 700;
}
.next-run h4 { margin: 6px 0 4px; font-size: 14px; }
.next-run p { font-size: 12px; }
.text-btn {
  border: 0;
  background: none;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0 0;
}
.outline-link {
  font-size: 13px;
  display: block;
  text-align: center;
  border: 1px solid #d3e2da;
  color: var(--green);
  border-radius: 6px;
  padding: 8px;
  margin-top: 16px;
  font-weight: 600;
}

/* 路线与地图可视化 (选项 B 核心样式) */
.map-view-container {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.map-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #fafbfb;
}
.route-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.route-btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #4b605c;
  transition: all 0.15s;
}
.route-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.map-canvas-area {
  position: relative;
  height: 380px;
  background: #eef3f1;
  overflow: hidden;
}
.map-canvas-area svg {
  width: 100%;
  height: 100%;
  display: block;
}
.map-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-start { background: #086b63; }
.dot-water { background: #1982c4; }
.dot-medical { background: #e63946; }
.dot-turn { background: #f4a261; }
.dot-scenic { background: #9b5de5; }

.marker-filter-bar {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}
.marker-pill {
  border: 1px solid var(--line);
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  color: #556c67;
}
.marker-pill.active {
  background: #e8f4f0;
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}

/* 路线详情卡片分栏 */
.route-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.route-kpi {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}
.route-kpi div strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
}
.route-kpi div small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.marker-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fafbfb;
}
.marker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #edf1ee;
  font-size: 13px;
  border-radius: 6px;
  transition: background 0.15s;
}
.marker-row:last-child { border-bottom: 0; }
.marker-row:hover { background: #eef6f3; }
.marker-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.badge-start { background: #d7ede7; color: #086b63; }
.badge-water { background: #d8edfa; color: #166ba1; }
.badge-medical { background: #fce1e3; color: #b82330; }
.badge-scenic { background: #eee1fa; color: #692fb8; }
.badge-turn { background: #fde8d4; color: #b86217; }
.badge-restroom { background: #e2ede8; color: #376353; }

/* 常规弹窗 */
dialog {
  border: 0;
  border-radius: 16px;
  padding: 26px;
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 88vh;
  color: var(--ink);
  box-shadow: 0 20px 100px rgba(8, 46, 57, 0.25);
}
dialog::backdrop {
  background: rgba(18, 52, 53, 0.5);
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.close {
  background: #f0f4f1;
  border: 0;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 20px;
  color: var(--ink);
}
dialog h2 { font-size: 24px; line-height: 1.35; margin: 14px 0; }
dialog h3 { font-size: 15px; margin: 18px 0 6px; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f3f7f4;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}
.detail-grid small { display: block; color: #7f9188; font-size: 11px; }
.detail-grid b { font-size: 13px; }
.form-field { display: block; font-size: 14px; margin: 14px 0; }
.form-field input {
  width: 100%;
  padding: 10px;
  border: 1px solid #d4dfd9;
  border-radius: 6px;
  margin-top: 5px;
}
.wide { width: 100%; padding: 11px; font-size: 14px; }
.notice {
  font-size: 12px !important;
  background: #f4f6ec;
  padding: 10px 12px;
  border-radius: 6px;
  color: #727a58;
}
.cancel {
  border: 1px solid #d4e0d8;
  background: white;
  color: #5c7469;
  border-radius: 6px;
  padding: 8px 12px;
}
.my-row {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.my-row h4 { margin: 0; font-size: 14px; }
.my-row p { font-size: 12px; margin: 2px 0 0; }
.success {
  background: #e6f5ea;
  border-radius: 8px;
  padding: 16px;
  color: var(--green);
  text-align: center;
}

/* 页脚 */
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  font-size: 12px;
  color: #7a8c85;
}
.footer-left { display: flex; align-items: center; gap: 14px; }
.footer-right { display: flex; gap: 16px; }
.footer-brand {
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #4b6658;
}

/* Toast */
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 10px 20px;
  background: #14352e;
  color: #fff;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  font-size: 13px;
  z-index: 999;
  max-width: 90%;
  width: max-content;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 响应式 */
@media (max-width: 1024px) {
  .workspace { grid-template-columns: 1fr; }
  aside { display: none; }
  .route-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  header { height: auto; flex-wrap: wrap; padding: 12px 16px; }
  nav { order: 3; width: 100%; justify-content: space-around; height: 40px; gap: 10px; }
  nav a { font-size: 13px; }
  .cards { grid-template-columns: 1fr; }
  main { padding: 18px 16px 30px; }
  h1 { font-size: 26px; }
  .banner-copy h2 { font-size: 22px; }
  .banner-btns { flex-direction: column; align-items: flex-start; }
  .map-canvas-area { height: 290px; }
  footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}
