:root {
  --ink: oklch(28% 0.025 155);
  --muted: oklch(53% 0.018 155);
  --faint: oklch(68% 0.012 155);
  --line: oklch(88% 0.012 155);
  --paper: oklch(97% 0.008 110);
  --surface: oklch(99% 0.006 110);
  --rail: oklch(24% 0.025 160);
  --moss: oklch(43% 0.065 155);
  --moss-soft: oklch(91% 0.035 145);
  --coral: oklch(64% 0.13 42);
  --amber: oklch(77% 0.105 78);
  --danger: oklch(56% 0.16 30);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --shadow: 0 12px 32px oklch(28% 0.02 155 / 0.08);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    14px/1.45 Gantari,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}
.hidden {
  display: none !important;
}
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100dvh;
}
.project-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 25px 16px 18px;
  border-right: 1px solid var(--line);
  background: oklch(95% 0.012 125);
  display: flex;
  flex-direction: column;
}
.project-brand {
  display: grid;
  gap: 2px;
  padding: 0 10px 22px;
}
.project-brand span,
.title-group span,
.drawer header span,
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
.project-brand strong {
  font:
    24px Young Serif,
    serif;
}
.trip-switcher {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-align: left;
}
.trip-switcher small,
.trip-switcher strong {
  display: block;
}
.trip-switcher small {
  font-size: 10px;
  color: var(--muted);
}
.trip-switcher strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trip-switcher i {
  width: 14px;
  color: var(--muted);
}
.trip-swatch {
  width: 8px;
  height: 30px;
  border-radius: 3px;
  background: var(--coral);
}
.trip-menu {
  position: absolute;
  z-index: 20;
  top: 110px;
  left: 16px;
  right: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 6px;
  border-radius: 6px;
}
.trip-menu button {
  width: 100%;
  text-align: left;
  padding: 9px;
  border-radius: 4px;
  font-size: 12px;
}
.trip-menu button:hover {
  background: var(--moss-soft);
}
.project-nav {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}
.project-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 5px;
  color: var(--muted);
  text-align: left;
}
.project-nav button:hover,
.project-nav button.active {
  color: var(--ink);
  background: var(--surface);
}
.project-nav i {
  width: 17px;
}
.project-nav b {
  margin-left: auto;
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 10px;
  background: var(--coral);
  color: var(--surface);
  font-size: 10px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
}
.sidebar-bottom button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-bottom i {
  width: 15px;
}
.sidebar-bottom small {
  padding: 0 10px;
  color: var(--faint);
  font-size: 10px;
}
.sidebar-bottom small span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(66% 0.12 150);
}
.sidebar-bottom small.sync-pending span {
  background: var(--amber);
}
.sidebar-bottom small.sync-synced span {
  background: var(--moss);
}
.sidebar-bottom small.sync-error span {
  background: var(--danger);
}
.workspace {
  min-width: 0;
  padding: 26px clamp(22px, 4vw, 60px) 52px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.title-group h1 {
  margin: 3px 0 0;
  font:
    30px Young Serif,
    serif;
}
.top-actions {
  display: flex;
  gap: 8px;
}
.primary-btn,
.quiet-btn,
.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 12px;
}
.primary-btn {
  background: var(--ink);
  color: var(--surface);
}
.quiet-btn,
.outline-btn {
  border: 1px solid var(--line);
  background: var(--surface);
}
.primary-btn i,
.quiet-btn i {
  width: 15px;
}
.trip-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.trip-header h2 {
  max-width: 720px;
  margin: 5px 0 8px;
  font:
    40px/1.12 Young Serif,
    serif;
  text-wrap: balance;
}
.trip-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trip-title-row .icon-btn {
  flex: 0 0 auto;
}
.trip-header p {
  margin: 0;
  color: var(--muted);
}
.progress-ring {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border: 8px solid var(--moss-soft);
  border-radius: 50%;
  background: var(--paper);
  position: relative;
}
.progress-ring:after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid var(--moss);
  border-radius: 50%;
}
.progress-ring strong,
.progress-ring small {
  position: relative;
  z-index: 1;
}
.progress-ring strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.progress-ring small {
  margin-top: -22px;
  font-size: 9px;
  color: var(--muted);
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.metric {
  padding: 20px 0;
}
.metric + .metric {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.metric span,
.metric small {
  display: block;
  color: var(--muted);
}
.metric strong {
  display: block;
  margin: 4px 0;
  font:
    22px Young Serif,
    serif;
  font-variant-numeric: tabular-nums;
}
.metric small {
  font-size: 10px;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 42px;
  margin-top: 34px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 3px 0 0;
  font:
    22px Young Serif,
    serif;
}
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--moss);
  font-size: 12px;
  font-weight: 600;
}
.text-btn i {
  width: 14px;
}
.timeline {
  display: grid;
}
.timeline-item {
  display: grid;
  grid-template-columns: 56px 14px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.timeline-item:first-child {
  border-top: 0;
}
.timeline-item time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 2px solid var(--moss);
  border-radius: 50%;
}
.timeline-item strong,
.timeline-item small {
  display: block;
}
.timeline-item small {
  margin-top: 3px;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--moss-soft);
  color: var(--moss);
  font-size: 10px;
  font-weight: 700;
}
.pill.must {
  background: oklch(91% 0.045 40);
  color: oklch(50% 0.12 35);
}
.decision-stack {
  display: grid;
  gap: 10px;
}
.decision-row {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.decision-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.decision-row h3 {
  margin: 0;
  font-size: 14px;
}
.decision-row p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.decision-actions button {
  padding: 6px 9px;
  border-radius: 4px;
  background: var(--paper);
  font-size: 11px;
}
.task-list {
  display: grid;
  max-width: 820px;
  border-top: 1px solid var(--line);
}
.task-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.task-row.done {
  color: var(--muted);
}
.task-row.done strong {
  text-decoration: line-through;
}
.task-check {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--moss);
}
.task-check i {
  width: 18px;
}
.task-row strong,
.task-row small {
  display: block;
}
.task-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.next-step {
  margin-top: 28px;
  padding: 20px;
  background: var(--ink);
  color: oklch(96% 0.01 130);
  border-radius: 6px;
}
.next-step span {
  font-size: 10px;
  color: oklch(76% 0.02 140);
}
.next-step h3 {
  margin: 7px 0 15px;
  font:
    19px Young Serif,
    serif;
}
.next-step button {
  color: var(--ink);
  background: var(--amber);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.toolbar-actions,
.row-tail,
.map-provider {
  display: flex;
  align-items: center;
  gap: 8px;
}
.schedule-switch {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 18px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.schedule-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.schedule-switch button.active {
  color: var(--surface);
  background: var(--ink);
}
.schedule-switch i {
  width: 14px;
}
.route-progress {
  margin-bottom: 22px;
}
.route-progress > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.route-progress > header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.route-track {
  display: flex;
  gap: 4px;
  min-width: 0;
}
.route-segment {
  flex: var(--segment-days) 1 0;
  min-width: 62px;
  padding: 0 3px 7px;
  overflow: hidden;
  text-align: left;
}
.segment-line {
  display: block;
  width: 100%;
  height: 6px;
  margin-bottom: 7px;
  border-radius: 3px;
  background: var(--line);
}
.segment-line.tone-0 {
  background: var(--coral);
}
.segment-line.tone-1 {
  background: var(--moss);
}
.segment-line.tone-2 {
  background: var(--amber);
}
.segment-line.tone-3 {
  background: oklch(60% 0.06 235);
}
.route-segment strong,
.route-segment small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-segment strong {
  font-size: 11px;
}
.route-segment small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}
.route-segment.active {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 4px;
}
.map-provider {
  color: var(--muted);
  font-size: 11px;
}
.map-provider i {
  width: 15px;
  color: var(--moss);
}
.filter-group {
  display: flex;
  gap: 4px;
  overflow: auto;
}
.filter-group button {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
}
.filter-group button.active {
  background: var(--ink);
  color: var(--surface);
}
.filter-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--moss-soft);
  color: var(--moss);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.filter-context i {
  width: 13px;
}
.day-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 760px);
  gap: 30px;
}
.location-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px);
  gap: 30px;
}
.location-list {
  display: grid;
  align-content: start;
  gap: 5px;
}
.location-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 5px;
  color: var(--muted);
  text-align: left;
}
.location-list button.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.location-list strong,
.location-list small {
  display: block;
}
.location-list small {
  margin-top: 2px;
  font-size: 10px;
}
.location-list b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--moss-soft);
  color: var(--moss);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.region-sheet {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.region-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.region-sheet h2 {
  margin: 4px 0;
  font:
    24px Young Serif,
    serif;
}
.region-sheet p {
  margin: 0;
  color: var(--muted);
}
.region-days {
  display: grid;
  padding: 4px 22px 22px;
}
.region-day {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.region-day:last-child {
  border-bottom: 0;
}
.region-day > header button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
}
.region-day > header span {
  color: var(--coral);
  font-size: 10px;
  font-weight: 700;
}
.region-day > header i {
  width: 14px;
  margin-left: auto;
  color: var(--muted);
}
.region-item {
  display: grid;
  grid-template-columns: 48px 20px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}
.region-item time {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.region-item > i {
  width: 14px;
  color: var(--moss);
}
.region-item strong,
.region-item small {
  display: block;
}
.region-item small {
  color: var(--muted);
  font-size: 10px;
}
.day-list {
  display: grid;
  align-content: start;
  gap: 5px;
}
.day-list button {
  text-align: left;
  padding: 10px;
  border-radius: 5px;
  color: var(--muted);
}
.day-list button.active {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}
.day-list strong,
.day-list small {
  display: block;
}
.day-list small {
  margin-top: 2px;
  font-size: 10px;
}
.day-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.day-sheet > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.day-sheet h2 {
  margin: 4px 0;
  font:
    24px Young Serif,
    serif;
}
.day-sheet p {
  margin: 0;
  color: var(--muted);
}
.day-items {
  padding: 8px 22px 22px;
}
.item-row {
  display: grid;
  grid-template-columns: 54px 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.item-row time {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.item-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--moss-soft);
  color: var(--moss);
}
.item-icon i {
  width: 14px;
}
.item-row strong,
.item-row small {
  display: block;
}
.item-row small {
  color: var(--muted);
  font-size: 11px;
}
.item-actions {
  display: flex;
  gap: 3px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  color: var(--muted);
}
.icon-btn:hover {
  background: var(--paper);
  color: var(--ink);
}
.icon-btn i {
  width: 16px;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  min-height: calc(100dvh - 150px);
  border: 1px solid var(--line);
  background: var(--surface);
}
#map-canvas {
  min-height: 590px;
}
.map-panel {
  padding: 18px;
  border-left: 1px solid var(--line);
  overflow: auto;
}
.map-panel h2 {
  margin: 4px 0 14px;
  font:
    20px Young Serif,
    serif;
}
.map-place-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  border-top: 1px solid var(--line);
}
.map-place {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px;
  padding: 12px 0;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}
.map-place strong,
.map-place small {
  display: block;
}
.map-place small {
  color: var(--muted);
  font-size: 10px;
}
.map-place i {
  width: 16px;
  color: var(--muted);
}
.map-place-gmaps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  color: var(--moss);
  text-decoration: none;
  transition: background 0.15s;
}
.map-place-gmaps:hover {
  background: var(--moss-soft);
}
.map-place-gmaps i {
  width: 14px;
}
.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}
.place-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}
.place-image {
  width: 100%;
  aspect-ratio: 16/8;
  object-fit: cover;
  background: var(--moss-soft);
}
.place-content {
  padding: 15px;
}
.place-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.place-content h3 {
  margin: 10px 0 3px;
  font-size: 15px;
}
.place-content p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.place-links {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.place-links a,
.place-links button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--moss);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.place-links i {
  width: 13px;
}
.place-links a.primary-link {
  background: var(--moss-soft);
  color: var(--moss-strong);
  padding: 6px 10px;
  border-radius: 5px;
}
.place-links a.primary-link:hover {
  background: var(--moss);
  color: var(--surface);
}
/* Leaflet popup 内嵌的 Google Maps 跳转按钮 */
.leaflet-popup-content .map-popup {
  min-width: 180px;
}
.leaflet-popup-content .map-popup strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.leaflet-popup-content .map-popup-addr {
  color: #6b6b6b;
  font-size: 11px;
  margin-bottom: 8px;
  line-height: 1.35;
  max-width: 220px;
}
.leaflet-popup-content .map-popup-gmaps {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.leaflet-popup-content .map-popup-gmaps:hover {
  background: #1557b0;
}
.leaflet-popup-content .map-popup-gmaps i {
  width: 12px;
}
/* Google Maps InfoWindow 内嵌跳转按钮 */
.gm-style .map-popup-gmaps {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}
.gm-style .map-popup-gmaps:hover {
  background: #1557b0;
}
.gm-style .map-popup-addr {
  color: #555;
  font-size: 11px;
  margin-top: 2px;
}
.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
}
.empty-state i {
  width: 24px;
}
.empty-state strong {
  color: var(--ink);
}
.drawer-layer {
  position: fixed;
  z-index: 40;
  inset: 0;
}
.drawer-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: oklch(20% 0.02 155 / 0.35);
}
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(460px, 100%);
  height: 100dvh;
  overflow: auto;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.drawer > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.drawer h2 {
  margin: 4px 0 0;
  font:
    23px Young Serif,
    serif;
}
.drawer form {
  display: grid;
  gap: 16px;
  padding: 24px;
}
.integration-note {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}
.integration-note i {
  width: 20px;
  color: var(--moss);
}
.integration-note strong,
.integration-note p {
  display: block;
  margin: 0;
}
.integration-note p,
.import-block p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.import-block {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.import-block h3 {
  margin: 0;
  font-size: 14px;
}
.import-block input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: var(--paper);
  font-size: 11px;
}
.import-block small {
  color: var(--faint);
  font-size: 10px;
}
.form-error {
  padding: 9px 10px;
  border: 1px solid color-mix(in oklch, var(--danger), var(--line) 70%);
  border-radius: 4px;
  color: var(--danger);
  background: color-mix(in oklch, var(--danger), var(--surface) 94%);
  font-size: 11px;
}
.export-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}
.export-panel p {
  margin: 0;
  color: var(--muted);
}
.export-panel textarea {
  width: 100%;
  min-height: 420px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  resize: vertical;
  background: var(--paper);
  color: var(--muted);
  font:
    11px/1.55 ui-monospace,
    monospace;
}
.export-panel a {
  text-decoration: none;
}
.add-menu {
  display: grid;
  padding: 12px 24px 24px;
}
.add-menu button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.add-menu button > i:first-child {
  width: 18px;
  color: var(--moss);
}
.add-menu button > i:last-child {
  width: 15px;
  color: var(--faint);
}
.add-menu strong,
.add-menu small {
  display: block;
}
.add-menu small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.type-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.type-picker button {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
}
.type-picker button.active {
  border-color: var(--moss);
  background: var(--moss-soft);
  color: var(--moss);
}
.type-picker i {
  width: 17px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-size: 11px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}
.danger-btn {
  margin-right: auto;
  color: var(--danger);
  font-size: 12px;
}
.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 9px 13px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
}
.mobile-nav,
.mobile-add,
.mobile-cloud {
  display: none;
}
@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .workspace {
    padding-inline: 24px;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .day-layout {
    grid-template-columns: 140px minmax(0, 1fr);
  }
  .map-layout {
    grid-template-columns: 1fr;
  }
  .map-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  #map-canvas {
    min-height: 460px;
  }
}
@media (max-width: 700px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }
  .app-shell {
    display: block;
  }
  .project-sidebar {
    display: none;
  }
  .workspace {
    padding: 18px 16px 30px;
  }
  .topbar {
    margin-bottom: 24px;
  }
  .title-group h1 {
    font-size: 24px;
  }
  .quiet-btn {
    display: none;
  }
  .mobile-cloud {
    display: inline-flex;
  }
  .trip-header {
    grid-template-columns: 1fr auto;
  }
  .trip-header h2 {
    font-size: 30px;
  }
  .progress-ring {
    width: 76px;
    height: 76px;
  }
  .progress-ring small {
    display: none;
  }
  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }
  .metric {
    padding: 14px 0;
  }
  .metric:nth-child(3) {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }
  .metric:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .overview-grid {
    gap: 28px;
    margin-top: 25px;
  }
  .day-layout {
    display: block;
  }
  .location-layout {
    display: block;
  }
  .location-list {
    display: flex;
    margin-bottom: 12px;
    overflow: auto;
  }
  .location-list button {
    min-width: 150px;
  }
  .route-track {
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .route-segment {
    flex: 0 0 calc(var(--segment-days) * 58px);
  }
  .region-sheet > header {
    align-items: flex-start;
    padding: 17px;
  }
  .region-days {
    padding: 2px 16px 17px;
  }
  .day-list {
    display: flex;
    overflow: auto;
    margin-bottom: 12px;
  }
  .day-list button {
    min-width: 112px;
  }
  .day-sheet > header {
    padding: 17px;
  }
  .day-items {
    padding: 6px 16px 17px;
  }
  .item-row {
    grid-template-columns: 42px 24px 1fr;
  }
  .item-actions {
    grid-column: 3;
    justify-self: end;
  }
  .map-layout {
    margin-inline: -16px;
    border-left: 0;
    border-right: 0;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .map-provider {
    display: none;
  }
  .map-panel {
    max-height: 280px;
  }
  #map-canvas {
    min-height: 54dvh;
  }
  .place-grid {
    grid-template-columns: 1fr;
  }
  .mobile-nav {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }
  .mobile-nav button {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 54px;
    color: var(--muted);
    font-size: 9px;
  }
  .mobile-nav button.active {
    color: var(--moss);
  }
  .mobile-nav i {
    width: 18px;
  }
  .mobile-add {
    display: none;
  }
  .mobile-add i {
    width: 20px;
  }
  .drawer {
    padding-bottom: env(safe-area-inset-bottom);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .top-actions .primary-btn span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
