:root {
  color-scheme: light;
  --bg: #f9f8f6;
  --surface: #ffffff;
  --surface-soft: #f1f5f3;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --coral: #c2410c;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(15, 118, 110, 0.04) 0%, transparent 65%),
              radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.03) 0%, transparent 60%),
              #f9f8f6;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.permission-strip,
.timeline-item p,
.item-meta,
.map-details span {
  color: var(--muted);
}

.header-actions,
.pane-head,
.itinerary-toolbar,
.permission-strip,
.day-head,
.timeline-item,
.map-details {
  display: flex;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.header-menu-mine {
  margin-left: 2px;
}

.header-menu {
  position: relative;
}

.header-menu-trigger {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.header-menu-trigger:hover,
.header-menu.is-open .header-menu-trigger {
  color: var(--ink);
  background: var(--surface-soft);
}

.header-menu.is-open .header-menu-trigger {
  color: var(--teal);
}

.header-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(320px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.header-menu-panel-mine {
  width: min(360px, calc(100vw - 24px));
  max-height: min(72vh, 640px);
  overflow: auto;
}

.header-profile-block .header-menu-item-label {
  margin-bottom: 2px;
}

.header-profile-sections {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.header-profile-section {
  display: grid;
  gap: 6px;
}

.header-profile-kicker {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.header-profile-facts {
  display: grid;
  gap: 4px;
  margin: 0;
}

.header-profile-fact {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.header-profile-fact dt {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.header-profile-fact dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.header-document-list,
.header-traveler-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.header-document-item,
.header-traveler-item {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.header-document-item {
  display: grid;
  gap: 2px;
}

.header-document-item strong,
.header-traveler-head strong {
  font-size: 13px;
}

.header-document-item span,
.header-traveler-item .header-menu-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.header-document-item em,
.header-traveler-note {
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
}

.header-traveler-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.header-traveler-tag {
  flex-shrink: 0;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.header-profile-edit {
  width: 100%;
  margin-top: 2px;
}

.header-menu-user {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.header-menu-user strong {
  font-size: 15px;
}

.header-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.header-menu-item {
  margin: 0;
}

.header-menu-item-button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.header-menu-item-button:hover {
  border-color: #b8ddd8;
  background: #f7fbfa;
}

.header-menu-item-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.header-menu-item-meta,
.header-menu-item-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.header-menu-item-block {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.header-menu-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.header-menu-ai-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(8, 124, 114, 0.12);
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.header-session-button {
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.header-session-button.is-primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.header-session-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.header-trip-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.header-trip-item {
  margin: 0;
}

.header-trip-button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.header-trip-button:hover {
  border-color: #b8ddd8;
  background: #f7fbfa;
}

.header-trip-button.is-current {
  border-color: #9ec5e8;
  background: #f3f9ff;
}

.header-trip-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-trip-status {
  flex-shrink: 0;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.header-trip-status.status-planning {
  background: rgba(8, 124, 114, 0.12);
  color: var(--teal);
}

.header-trip-status.status-completed {
  background: var(--surface-soft);
  color: var(--muted);
}

.header-platform-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.header-platform-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.header-platform-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.header-platform-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.header-platform-scope {
  font-size: 11px;
  color: var(--muted);
}

.header-platform-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--teal);
}

.header-platform-connect {
  flex-shrink: 0;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.header-platform-connect:hover {
  border-color: var(--teal);
  background: #f7fbfa;
}

.header-menu-section {
  display: grid;
  gap: 6px;
}

.header-menu-kicker {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.header-menu-title {
  font-size: 15px;
  line-height: 1.35;
}

.header-menu-meta,
.header-menu-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.header-auth-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.header-auth-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.header-menu-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.header-menu-action {
  width: 100%;
  margin-top: 12px;
}

.header-menu-actions .header-menu-action {
  margin-top: 0;
}

.primary-button,
.ghost-button,
.permission-strip button {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

.primary-button {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal);
  font-weight: 800;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 18px;
  height: calc(100vh - 56px);
  padding: 18px;
}

.chat-column,
.itinerary-column {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 14px;
}

.itinerary-column {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.pane-head,
.itinerary-toolbar {
  justify-content: space-between;
  gap: 16px;
}

.pane-head {
  min-height: 28px;
}

.title-date,
.day-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.title-date {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.day-date {
  display: block;
  margin-top: 4px;
}

.title-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.15;
}

.pane-head h1 {
  font-size: 18px;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.status {
  padding: 7px 10px;
  border-radius: 8px;
  background: #fff4e8;
  color: #9a5a14;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
}

.message.user {
  align-self: flex-end;
  background: var(--teal);
  color: #fff;
}

.message.assistant {
  background: var(--surface-soft);
}

/* Standalone operation/error state: never an Agent reply, never persisted
   to chat history. Rendered for failures, takeovers and refresh notes. */
.message.operation-state {
  align-self: stretch;
  background: #fff8e6;
  border: 1px dashed #d9a441;
  color: #7a5a10;
}

.chat-retry-btn {
  margin-top: 8px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  background: #fff;
  color: var(--teal);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.agent-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-progress-label {
  min-width: 0;
  flex: 1;
}

.agent-stop {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #c85a54;
  border-radius: 6px;
  background: #fff;
  color: #a33e38;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.agent-stop:disabled {
  cursor: wait;
  opacity: 0.65;
}

.permission-strip {
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  font-size: 13px;
}

.permission-strip strong {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--teal);
  font-size: 12px;
}

.permission-strip button {
  min-height: 30px;
  margin-left: auto;
  padding: 0 10px;
}

/* Skill bar — AI mode selector shown above the chat input */
.skill-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.skill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.skill-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: #f7fbfa;
}

.skill-btn.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.skill-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.system-mode-switch {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  padding: 4px 12px;
  text-align: center;
}

.chat-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-box input {
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.chat-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 124, 114, 0.12);
}

.fill-only-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary, inherit);
  cursor: pointer;
  user-select: none;
}

.fill-only-toggle input {
  min-height: auto;
  width: 14px;
  height: 14px;
}

.view-panel {
  display: block;
  min-height: 0;
}

.view-panel.active {
  display: block;
}

#mapView {
  order: 1;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.trip-content {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.trip-panel {
  display: none;
  min-height: 0;
}

.trip-panel.active {
  display: grid;
  min-height: 0;
}

.map-panel.active {
  grid-template-rows: auto minmax(0, 1fr);
}

.map-route-sequence {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(34, 67, 60, 0.12);
  background: rgba(248, 251, 249, 0.96);
  scrollbar-width: thin;
}

.map-route-sequence[hidden] {
  display: none;
}

.map-route-sequence-stop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 9px 4px 5px;
  border: 1px solid rgba(34, 67, 60, 0.16);
  border-radius: 999px;
  color: #23443d;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  font-family: inherit;
}

button.map-route-sequence-stop {
  appearance: none;
  cursor: pointer;
}

button.map-route-sequence-stop:hover,
button.map-route-sequence-stop:focus-visible {
  border-color: rgba(35, 107, 91, 0.48);
  background: #f0f8f5;
  box-shadow: 0 3px 10px rgba(35, 107, 91, 0.12);
  outline: none;
}

.map-route-sequence-stop b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #236b5b;
  font-size: 11px;
}

.map-route-sequence-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid rgba(35, 107, 91, 0.18);
  border-radius: 999px;
  color: #35665a;
  background: #eef7f3;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.map-route-sequence-context > span {
  color: #236b5b;
  font-size: 15px;
}

.map-route-sequence-context em {
  max-width: 180px;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-context-popup {
  display: grid;
  gap: 4px;
  min-width: 180px;
  font-family: inherit;
}

.map-context-popup strong {
  color: #236b5b;
  font-size: 13px;
}

.map-context-popup span,
.map-context-popup small {
  color: #5e706a;
  font-size: 11px;
  line-height: 1.45;
}

.map-route-sequence-arrow {
  flex: 0 0 auto;
  color: #d96f55;
  font-size: 18px;
  font-weight: 800;
}

.map-route-sequence-connector {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 3px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c85f47;
  font-family: inherit;
  cursor: default;
}

button.map-route-sequence-connector.is-card {
  cursor: pointer;
}

button.map-route-sequence-connector.is-card:hover,
button.map-route-sequence-connector.is-card:focus-visible {
  background: #fff2ed;
  outline: none;
}

.map-route-sequence-connector em {
  max-width: 80px;
  overflow: hidden;
  color: #8b4b3d;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manifest-panel.active {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.manifest-schedule.day-list {
  min-height: 0;
}

.day-head-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.day-head-copy h3 {
  margin: 0;
}

.manifest-toolbar {
  display: grid;
  gap: 8px;
}

.manifest-progress {
  margin: 0;
}

.manifest-filters {
  margin: 0;
}

.manifest-booking {
  display: flex;
  justify-content: flex-end;
}

.manifest-booking-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.manifest-booking-cta .booking-tier {
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.manifest-booking-cta.secondary .booking-tier {
  background: var(--surface);
}

.manifest-booking-empty {
  color: var(--muted);
  font-size: 12px;
}

.detail-booking-panel {
  margin-bottom: 0;
}

.detail-booking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.detail-booking-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-booking-panel .manifest-booking-cta {
  flex-shrink: 0;
}

.day-list {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 4px 4px 0;
}

.day-group {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.day-head {
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.day-head div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.day-head time {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--teal);
  font-weight: 800;
}

.day-head h3 {
  margin-bottom: 0;
}

.day-head > strong {
  white-space: nowrap;
}

.day-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.poi-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.poi-strip span {
  padding: 5px 8px;
  border: 1px solid #cfe4dd;
  border-radius: 8px;
  background: #eef8f5;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  max-height: calc(100% - 73px);
  overflow-x: hidden;
  overflow-y: auto;
}

.itinerary-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.itinerary-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.itinerary-table td {
  padding: 12px;
  border-bottom: 1px solid #edf1ef;
  vertical-align: top;
  font-size: 14px;
}

.itinerary-table tr:last-child td {
  border-bottom: 0;
}

.itinerary-table th:nth-child(1),
.itinerary-table td:nth-child(1) {
  width: 68px;
}

.itinerary-table th:nth-child(2),
.itinerary-table td:nth-child(2) {
  width: 54px;
  text-align: center;
}

.itinerary-table th:nth-child(3),
.itinerary-table td:nth-child(3) {
  width: auto;
}

.itinerary-table th:nth-child(4),
.itinerary-table td:nth-child(4) {
  width: 76px;
}

.itinerary-table th:nth-child(5),
.itinerary-table td:nth-child(5) {
  width: 16%;
}

.itinerary-table th:nth-child(6),
.itinerary-table td:nth-child(6) {
  width: 24%;
  min-width: 150px;
  text-align: left;
}

.itinerary-table th:nth-child(7),
.itinerary-table td:nth-child(7) {
  width: 118px;
  text-align: right;
}

.booking-cell {
  vertical-align: top;
}

.itinerary-table tr.is-filter-muted {
  opacity: 0.36;
}

.itinerary-table tr.is-filter-muted:hover {
  opacity: 0.72;
}

.manifest-schedule .itinerary-table tbody tr {
  cursor: pointer;
}

.time-cell,
.duration-cell {
  font-weight: 800;
  white-space: nowrap;
}

.budget-cell {
  min-width: 0;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.budget-cell > span {
  display: block;
  max-width: 100%;
}

.estimate-rationale {
  display: block;
  max-width: 180px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}

.manifest-schedule.day-list {
  scroll-padding-bottom: 88px;
  padding-bottom: 88px;
}

@media (max-width: 1400px) {
  .planner-layout {
    grid-template-columns: minmax(320px, 370px) minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .itinerary-table th,
  .itinerary-table td {
    padding-right: 9px;
    padding-left: 9px;
  }

  .itinerary-table th:nth-child(1),
  .itinerary-table td:nth-child(1) {
    width: 62px;
  }

  .itinerary-table th:nth-child(2),
  .itinerary-table td:nth-child(2) {
    width: 50px;
  }

  .itinerary-table th:nth-child(4),
  .itinerary-table td:nth-child(4) {
    width: 68px;
  }

  .itinerary-table th:nth-child(5),
  .itinerary-table td:nth-child(5) {
    width: 14%;
  }

  .itinerary-table th:nth-child(6),
  .itinerary-table td:nth-child(6) {
    width: 25%;
  }

  .itinerary-table th:nth-child(7),
  .itinerary-table td:nth-child(7) {
    width: 106px;
  }

  .manifest-booking-cta {
    padding-right: 8px;
    padding-left: 8px;
  }
}

.estimate-rationale.is-missing {
  color: #a06a23;
}

.planning-audit-summary {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef8f5;
  color: #266b5e;
  font-size: 12px;
  font-weight: 700;
}

.planning-audit-summary.is-incomplete {
  background: #fff5e7;
  color: #8a5a18;
}



.route-cell,
.duration-cell,
.plan-cell span {
  color: var(--muted);
}

.plan-cell strong,
.plan-cell span {
  display: block;
}

.plan-cell strong {
  margin-bottom: 5px;
  line-height: 1.35;
}

.plan-cell span,
.route-cell {
  font-size: 13px;
  line-height: 1.45;
}

.type-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #edf2ff;
  color: #3451a3;
}

.type-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.type-icon.rail {
  background: #edf2ff;
  color: #3451a3;
}

.type-icon.local {
  background: #eaf5f1;
  color: var(--teal);
}

.type-icon.hotel {
  background: #fff2e8;
  color: #9a5a14;
}

.type-icon.meal {
  background: #fff4de;
  color: #8a5600;
  box-shadow: inset 0 0 0 1px #f3d59b;
}

.type-icon.poi {
  background: var(--teal);
  color: #fff;
}

.table-photo-icon {
  display: inline-block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 8px;
  background-color: var(--surface-soft);
  background-image: var(--fallback-image);
  background-position: center;
  background-size: cover;
  box-shadow: 0 5px 14px rgba(23, 32, 28, 0.16);
}

.table-photo-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poi-row {
  background: #fbfefd;
}

.poi-row td {
  border-bottom-color: #dceae5;
}

.meal-row {
  background: #fffaf1;
}

.meal-row td {
  border-bottom-color: #f1dfbd;
}

.meal-row .time-cell,
.meal-name,
.meal-row .budget-cell {
  color: #8a5600;
}

.poi-name {
  color: var(--teal);
  font-size: 15px;
}

.itinerary-table tr.is-adjusting,
.itinerary-table tr.is-detail-open,
.itinerary-table tr.is-map-linked {
  background: #fff8ea;
}

.itinerary-table tr.is-adjusting td,
.itinerary-table tr.is-detail-open td,
.itinerary-table tr.is-map-linked td {
  background: #fff2cf;
}

.itinerary-table tr.is-map-linked td:first-child {
  box-shadow: inset 4px 0 0 var(--coral);
}

.detail-drawer {
  display: none;
  position: absolute;
  inset: 18px;
  z-index: 20;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  box-shadow: 0 24px 80px rgba(23, 32, 28, 0.24);
}

.detail-drawer.open {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

/* A real card has summary, canonical facts, evidence and scoped chat after
   its header. Keep those sections in one scroll region; implicit grid rows
   previously pushed the lower sections under each other or below the panel. */
.detail-drawer.detail-card-open {
  grid-template-rows: auto minmax(0, 1fr);
}

.detail-card-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.detail-card-scroll > .detail-main {
  min-height: min(340px, 46vh);
  overflow: visible;
}

.detail-drawer.detail-meal {
  border-color: #e6c88c;
}

.detail-drawer.detail-meal .detail-head {
  background: #fff8ea;
}

.detail-drawer.detail-meal .detail-summary-unified > .detail-summary-col,
.detail-drawer.detail-meal .detail-facts span {
  border-color: #f0d8a8;
  background: #fffaf1;
}

.detail-drawer.detail-meal-signature .detail-main,
.detail-drawer.detail-poi .detail-main,
.detail-drawer.detail-terminal .detail-main {
  grid-template-columns: minmax(220px, 0.46fr) minmax(0, 0.54fr);
}

.detail-drawer.detail-meal-quick .detail-main,
.detail-drawer.detail-meal-included .detail-main,
.detail-drawer.detail-hotel .detail-main {
  grid-template-columns: minmax(180px, 0.4fr) minmax(0, 0.6fr);
}

.detail-drawer.detail-longhaul .detail-main {
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 0.66fr);
}

.detail-drawer.open .detail-poi-hero,
.detail-drawer.open .detail-hero,
.detail-drawer.open .travel-detail-hero {
  position: relative;
  width: 100%;
  min-height: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  align-self: stretch;
  overflow: hidden;
  border-radius: 8px;
}

.detail-drawer.open .detail-poi-hero img,
.detail-drawer.open .detail-hero img,
.detail-drawer.open .travel-detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.meal-detail-quick,
.meal-detail-included,
.meal-detail-signature {
  gap: 6px;
}

.meal-dishes-panel h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.meal-dish-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.meal-dish-item strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.meal-dish-item p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.meal-dish-tip {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--teal-dark);
  font-weight: 700;
}

.meal-tips-panel {
  padding: 0;
}

.meal-tips-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.meal-tips-list li + li {
  margin-top: 4px;
}

.meal-signature-links {
  flex-wrap: nowrap;
}

.meal-guide-compact .poi-story-copy p {
  margin-bottom: 0;
}

.meal-quick-body {
  display: grid;
  gap: 8px;
}

.meal-quick-picks,
.meal-quick-tips {
  margin: 0;
  padding-left: 1rem;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}

.meal-quick-picks li + li,
.meal-quick-tips li + li {
  margin-top: 4px;
}

.meal-quick-tips {
  color: var(--muted);
  font-size: 12px;
}

.meal-quick-panel .poi-section-head {
  margin-bottom: 8px;
}

.meal-story-copy .meal-quick-tip {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.meal-order-panel h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.meal-order-panel p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.meal-included-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.meal-included-fact {
  display: grid;
  gap: 2px;
}

.meal-included-fact dt {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
}

.meal-included-fact dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
}

.detail-drawer.detail-longhaul .detail-main {
  gap: 8px;
}

.travel-detail-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.travel-ai-banner {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #c5dff5;
  border-radius: 8px;
  background: linear-gradient(135deg, #f3f9ff 0%, #f8fcfa 100%);
}

.travel-ai-badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #087c72;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.travel-ai-banner p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #3a4a44;
}

.detail-drawer.detail-flight.detail-longhaul .detail-main {
  display: flex;
  flex-direction: column;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 0;
  overflow: hidden;
  align-content: stretch;
}

.detail-drawer.detail-flight .travel-detail-column,
.detail-drawer.detail-flight .travel-detail-column-flight {
  flex: 1;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
}

.flight-explore-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.detail-flight .detail-summary-unified:empty {
  display: none;
}

.flight-explore-requirements {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.flight-explore-requirements-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.flight-explore-requirements-input {
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: 104px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.flight-explore-requirements-input:focus {
  outline: 2px solid rgba(0, 105, 92, 0.22);
  border-color: rgba(0, 105, 92, 0.35);
}

.flight-explore-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.flight-explore-toolbar h4 {
  margin: 0;
  font-size: 15px;
}

.flight-explore-start {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.flight-explore-table-wrap {
  flex: 1;
  min-height: 140px;
  max-height: min(52vh, 420px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.flight-candidate-row.is-selected td {
  background: #f4faf4;
}

.flight-explore-status-msg {
  color: #5a554f;
  font-size: 13px;
}

.flight-explore-flight {
  font-weight: 600;
  white-space: nowrap;
}

.flight-explore-note-col {
  font-size: 12px;
  color: #6b6560;
  line-height: 1.35;
}

.flight-rank-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e8f3e8;
  color: #2d6a2d;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.flight-explore-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.flight-explore-status-line:empty {
  display: none;
}

.flight-explore-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.flight-explore-table th,
.flight-explore-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.flight-explore-table thead th {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  background: var(--surface-soft);
}

.flight-explore-table tbody tr:last-child td,
.flight-explore-table tbody tr:last-child th {
  border-bottom: 0;
}

.flight-explore-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  font-weight: 700;
}

.flight-explore-platform-link {
  color: var(--teal-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 105, 92, 0.28);
}

.flight-explore-platform-link:hover {
  color: var(--teal);
  border-bottom-color: currentColor;
}

.flight-explore-status {
  white-space: nowrap;
  color: var(--teal-dark);
  font-weight: 700;
}

.flight-explore-row-pending_login .flight-explore-status {
  color: #9a6700;
}

.flight-explore-row-searching .flight-explore-status {
  color: var(--teal);
}

.flight-explore-row-failed .flight-explore-status {
  color: #b54a3a;
}

.flight-explore-summary,
.flight-explore-time,
.flight-explore-price {
  color: var(--ink);
}

.flight-explore-action {
  width: 88px;
  text-align: right;
}

.flight-explore-action-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.flight-explore-empty td {
  padding: 18px 12px;
  color: var(--muted);
  text-align: center;
}

.flight-explore-status-line {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-dark);
}

.flight-explore-login-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #dce9e7;
  border-radius: 12px;
  background: #f7fbfa;
}

.flight-explore-login-banner-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--teal-dark);
}

.flight-explore-login-banner-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.flight-explore-login-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.flight-explore-login-banner-actions .primary-button,
.flight-explore-login-banner-actions .ghost-button {
  min-height: 36px;
  font-size: 13px;
}

.flight-explore-login-platforms-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
}

.detail-drawer.detail-flight .detail-actions {
  flex-shrink: 0;
  align-items: center;
}

.detail-drawer.detail-flight .detail-actions .primary-button,
.detail-drawer.detail-flight .detail-actions .secondary-button {
  min-height: 40px;
  height: 40px;
  max-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

.flight-explore-selected {
  padding: 14px;
  border: 1px solid #b8ddd8;
  border-radius: 12px;
  background: #f7fbfa;
}

.flight-explore-selected-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.flight-explore-selected-head span {
  font-size: 12px;
  color: var(--muted);
}

.flight-explore-manage {
  display: grid;
  gap: 10px;
}

.flight-explore-manage-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
}

.flight-explore-manage-row span {
  color: var(--muted);
  font-weight: 700;
}

.flight-explore-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.flight-explore-disconnect {
  color: #b54a3a;
  border-color: #efc8c0;
}

.flight-ai-results {
  margin-top: 16px;
}

.flight-ai-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.flight-ai-option {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border-soft, #e8e4df);
  border-radius: 12px;
  background: #fff;
}

.flight-ai-option.is-selected {
  border-color: #c8dcc8;
  background: #f7fbf7;
}

.flight-ai-option-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.flight-ai-option-label {
  font-size: 15px;
}

.flight-ai-option-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f3e8;
  color: #2d6a2d;
  font-size: 11px;
  font-weight: 600;
}

.flight-ai-option-time {
  font-size: 14px;
  font-weight: 600;
  color: #1f1c1a;
}

.flight-ai-option-reason {
  font-size: 12px;
  color: #6b6560;
}

.flight-ai-option-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 13px;
  color: #4a4541;
  white-space: nowrap;
}

.flight-ai-option-meta strong {
  font-size: 15px;
  color: #1f1c1a;
}

.flight-ai-select-button {
  min-width: 72px;
}

.travel-options-panel {
  padding-top: 0;
  min-width: 0;
  overflow-x: auto;
}

.travel-options-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 580px);
}

.travel-options-head,
.travel-option-row {
  display: grid;
  grid-template-columns:
    minmax(72px, 0.9fr)
    minmax(92px, 1fr)
    minmax(44px, 0.48fr)
    minmax(40px, 0.44fr)
    minmax(88px, 0.85fr);
  gap: 8px 8px;
  align-items: center;
}

.travel-options-head {
  padding: 0 12px 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.travel-option-row {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.travel-option-row.is-selected {
  border-color: #9ec5e8;
  background: #f3f9ff;
  box-shadow: inset 0 0 0 1px #c5dff5;
}

.detail-drawer.detail-rail .travel-option-row.is-selected {
  border-color: #b8ddd8;
  background: #eef8f5;
  box-shadow: inset 0 0 0 1px #c5e8e0;
}

.travel-option-row.is-booked {
  border-color: #9ec5e8;
  background: #f3f9ff;
  box-shadow: inset 0 0 0 1px #c5dff5;
}

.travel-options-booked .travel-option-row:not(.is-booked) {
  opacity: 0.72;
}

.travel-booking-actions-slot {
  margin-top: 10px;
}

.travel-booking-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.travel-booking-actions-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.travel-booking-selection {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.travel-booking-actions-cta {
  flex-shrink: 0;
}

.travel-option-status {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: middle;
}

.travel-option-label-cell {
  min-width: 0;
}

.travel-option-label {
  font-size: 13px;
  line-height: 1.3;
}

.travel-option-note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.travel-option-time-range {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.travel-option-duration,
.travel-option-transfer {
  font-size: 12px;
  line-height: 1.35;
}

.travel-option-transfer {
  color: var(--muted);
  font-weight: 700;
}

.travel-option-best {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.travel-option-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.travel-option-vendor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.travel-vendor-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
}

.travel-save-note {
  font-size: 10px;
  font-style: normal;
  color: var(--teal-dark);
  line-height: 1.2;
}

.hotel-ai-line {
  margin: 0 0 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f3f9ff;
  color: #3a4a44;
  font-size: 11px;
  line-height: 1.35;
}

.poi-detail-bullets {
  margin: 0;
  padding-left: 1rem;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
}

.poi-detail-bullets li + li {
  margin-top: 3px;
}

.poi-detail-tips {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.poi-ticket-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 8px;
  align-items: stretch;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.poi-ticket-inline > span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  box-sizing: border-box;
}

.poi-ticket-inline strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.poi-ticket-link {
  grid-column: 1 / -1;
  justify-self: end;
  margin-left: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--teal-dark);
  text-decoration: none;
  white-space: nowrap;
}

.meal-signature-lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
}

.detail-drawer.open .travel-option-note,
.detail-drawer.open .travel-save-note {
  display: none;
}

.detail-drawer.open .travel-options-table {
  gap: 4px;
}

.detail-drawer.open .travel-option-row {
  padding: 6px 8px;
}

.detail-drawer.open .travel-option-label {
  font-size: 11px;
}

.detail-drawer.open .travel-ai-banner {
  margin-bottom: 6px;
  padding: 6px 8px;
}

.detail-drawer.open .travel-ai-banner p {
  font-size: 10px;
  line-height: 1.3;
}

.hotel-detail-column {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.detail-drawer.detail-hotel .hotel-detail-column-wide {
  grid-column: 1 / -1;
}

.detail-drawer.detail-hotel .detail-poi-hero-compact {
  min-height: 220px;
  max-height: 360px;
}

.hotel-ai-banner {
  margin-bottom: 0;
  padding: 8px 10px;
  border-color: #d9c8ef;
  background: linear-gradient(135deg, #f9f5ff 0%, #f8fcfa 100%);
}

.hotel-ai-banner p {
  font-size: 11px;
  line-height: 1.4;
}

.hotel-rec-card {
  padding: 10px 12px;
  border: 1px solid #ddd0ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfaff 0%, var(--surface) 100%);
}

.hotel-rec-card-overnight {
  border-color: var(--line);
  background: var(--surface);
}

.hotel-core-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0;
  align-items: stretch;
}

.hotel-fact-block {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  height: 100%;
  box-sizing: border-box;
}

.hotel-fact-block dt {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hotel-fact-block dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.hotel-fact-block dd strong {
  display: block;
  margin-bottom: 1px;
}

.hotel-fact-block dd span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.hotel-fact-span {
  grid-column: 1 / -1;
}

.hotel-map-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--teal-dark);
  text-decoration: none;
}

.hotel-map-link:hover {
  color: var(--teal);
  text-decoration: underline;
}

.hotel-extras-panel {
  margin-top: 6px;
}

.hotel-section-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hotel-extra-list {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.hotel-extra-list li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfbfe;
}

.hotel-extra-list span {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
  font-weight: 800;
  color: var(--teal-dark);
  letter-spacing: 0.04em;
}

.hotel-extra-list p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

.hotel-tips-list {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.hotel-tips-list li + li {
  margin-top: 4px;
}

.hotel-rec-foot {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.meal-detail-column {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.meal-options-panel {
  padding-top: 0;
  min-width: 0;
  overflow-x: auto;
}

.meal-options-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 560px);
}

.meal-options-head,
.meal-option-row {
  display: grid;
  grid-template-columns:
    minmax(64px, 0.78fr)
    minmax(92px, 1.2fr)
    minmax(48px, 0.52fr)
    minmax(56px, 0.58fr)
    minmax(44px, 0.42fr)
    52px;
  gap: 8px 8px;
  align-items: center;
}

.meal-options-head {
  padding: 0 12px 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.meal-option-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}

.meal-option-row.is-selected {
  border-color: #e6c88c;
  background: #fffaf1;
  box-shadow: inset 0 0 0 1px #f0d8a8;
}

.meal-option-name {
  font-size: 14px;
  line-height: 1.3;
}

.meal-option-location {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.meal-option-price,
.meal-option-time {
  font-size: 12px;
  font-weight: 700;
}

.meal-option-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meal-option-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.meal-review-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: contain;
}

.meal-option-link:hover {
  border-color: #b8c5bf;
  background: #f7faf8;
}

.meal-option-links-empty {
  color: var(--muted);
  font-size: 12px;
}

.meal-option-action {
  display: flex;
  justify-content: stretch;
  min-width: 0;
}

.meal-option-confirm {
  width: 100%;
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

.meal-option-confirm.is-confirmed {
  border-color: #b8ddd8;
  background: #e8f5f3;
  color: var(--teal-dark);
}

.meal-option-row .meal-option-confirm {
  cursor: pointer;
}

.meal-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-included-blurb p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

.meal-slot-note p,
.meal-route-note p {
  margin: 0;
}

.meal-reservation-facts {
  padding: 0;
  margin-bottom: 10px;
}

.meal-tier-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

.meal-tier-signature {
  color: #8a5a12;
  background: #fff1d6;
  border: 1px solid #f0d8a8;
}

.meal-tier-quick {
  color: #4a5651;
  background: #eef3f1;
  border: 1px solid var(--line);
}

.meal-tier-included {
  color: #075f59;
  background: #e8f5f3;
  border: 1px solid #b8ddd8;
}

.detail-empty {
  padding: 22px;
}

.detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.detail-head-kicker,
.detail-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-head-main {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.detail-head-main > span,
.detail-head-kicker {
  display: block;
}

.detail-place-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 4px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
}

.detail-place-meta-transit {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.detail-place-text {
  color: var(--ink);
}

.detail-place-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-transit-route {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-transit-point {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
}

.detail-transit-arrow {
  color: var(--muted);
  font-weight: 700;
}

.detail-transit-vehicle {
  color: var(--muted);
  font-size: 12px;
}

.detail-map-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: var(--teal-dark);
  background: #eef6f3;
  flex-shrink: 0;
}

.detail-map-icon-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.detail-map-icon-link:hover {
  color: var(--teal);
  background: #e2f0eb;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
}

.local-detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.local-detail-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.local-detail-list strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.detail-title-row h3 {
  margin: 0;
  padding: 0 1px;
  font-size: 18px;
  line-height: 1.25;
  min-width: 0;
}

.detail-nav {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: #4a5651;
  cursor: pointer;
}

.detail-nav svg {
  width: 16px;
  height: 16px;
}

.detail-nav:hover:not(:disabled) {
  color: var(--ink);
  border-color: #b8c5bf;
  background: #e4ebe8;
}

.detail-nav:disabled {
  opacity: 0.38;
  cursor: default;
  background: var(--surface);
}

.detail-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.detail-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 20px;
  cursor: pointer;
  position: relative;
  z-index: 40;
}

.detail-summary,
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 12px;
  align-items: stretch;
}

.detail-summary-unified {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.detail-summary-unified > .detail-summary-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  height: 100%;
}

.detail-summary-unified .detail-summary-col span {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.detail-summary-col-compact .detail-summary-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.detail-summary-col-compact .detail-summary-sub {
  justify-self: end;
  text-align: right;
  white-space: normal;
  min-width: 0;
}

.detail-summary-col-compact .detail-summary-price-row {
  min-width: 0;
}

.detail-summary-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  min-height: 12px;
  color: var(--muted);
}

.detail-summary-unified .detail-summary-main {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  min-width: 0;
}

.detail-summary-unified .detail-summary-sub {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.detail-summary-unified .detail-summary-main strong {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

.detail-summary-price-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.detail-summary-book,
.detail-summary-map,
.hotel-map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: var(--teal-dark);
  text-decoration: none;
  white-space: nowrap;
}

.detail-summary-book:hover,
.detail-summary-map:hover,
.hotel-map-link:hover {
  color: var(--teal);
}

.detail-summary-book .travel-vendor-icon,
.detail-summary-book .site-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(200px, 0.42fr) minmax(0, 0.58fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 0 12px 8px;
  align-items: stretch;
  align-content: stretch;
}

.detail-drawer.detail-flight.detail-longhaul .detail-main {
  display: flex;
  flex-direction: column;
  grid-template-columns: minmax(0, 1fr);
}

.detail-drawer.detail-local .detail-main {
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 0.66fr);
}

.local-options-table .travel-options-head,
.local-options-table .local-option-row {
  grid-template-columns:
    minmax(72px, 0.82fr)
    minmax(120px, 1.35fr)
    minmax(64px, 0.72fr)
    minmax(56px, 0.62fr)
    minmax(72px, 0.78fr);
  min-width: min(100%, 680px);
}

.local-option-route-vendor {
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink);
  min-width: 0;
}

.local-option-route {
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}

.local-option-route-text {
  line-height: 1.35;
}

.local-option-pass-hint {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #edf6f0;
  color: #2a6b4f;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.local-option-vendor .travel-option-vendor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.local-option-vendor .travel-vendor-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.local-option-duration,
.local-option-price,
.local-option-effort {
  font-size: 12px;
  line-height: 1.35;
}

.local-option-price {
  font-size: 13px;
  color: var(--ink);
}

.local-option-effort {
  font-weight: 700;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
}

.detail-drawer.detail-local .travel-option-row.is-selected {
  border-color: #c8ddd4;
  background: #eef6f2;
  box-shadow: inset 0 0 0 1px #c5e8dc;
}

.detail-summary:not(.detail-summary-unified) > span,
.detail-facts > span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  height: 100%;
  box-sizing: border-box;
}

.detail-summary:not(.detail-summary-unified) > span strong,
.detail-facts > span strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 190px 190px;
  gap: 8px;
  align-self: start;
}

.detail-gallery img:first-child {
  grid-row: span 2;
}

.detail-gallery img,
.detail-hero img,
.detail-poi-hero img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.detail-poi-hero {
  position: relative;
  width: 100%;
  min-height: 100%;
  margin: 0;
  align-self: stretch;
  overflow: hidden;
  border-radius: 8px;
}

.poi-detail-column,
.hotel-detail-column,
.travel-detail-column,
.meal-detail-column {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 0;
  overflow: hidden;
  align-self: stretch;
}

.detail-hero {
  width: 100%;
  height: 100%;
  min-height: 100%;
  align-self: stretch;
}

.detail-section {
  display: grid;
  gap: 6px;
  align-self: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.detail-section h4 {
  margin: 0;
  font-size: 13px;
}

.detail-section p,
.detail-section li,
.detail-option span,
.detail-option p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.detail-section ul {
  margin: 0;
  padding-left: 18px;
}

.detail-section a,
.detail-links a {
  color: var(--teal);
  font-weight: 800;
}

.detail-section a.open-calendar-sub-link,
.detail-section a.open-calendar-sub-link:visited {
  color: #fff;
}

.detail-drawer.detail-calendar-sync .detail-main,
.detail-drawer.detail-share .detail-main {
  display: block;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.detail-calendar-sync .detail-section,
.detail-share .detail-section {
  max-width: 760px;
  margin-inline: auto;
}

.calendar-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 0 auto 14px;
}

.calendar-mode-tab {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid #dbe3ec;
  border-radius: 12px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.calendar-mode-tab strong {
  color: #0f172a;
  font-size: 14px;
}

.calendar-mode-tab span {
  color: #64748b;
  font-size: 11px;
}

.calendar-mode-tab.active {
  border-color: var(--teal);
  background: #ecfdf9;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 20%, transparent);
}

.calendar-primary-actions,
.share-link-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.share-link-actions {
  grid-template-columns: minmax(160px, 1fr) auto auto;
}

.calendar-primary-actions > *,
.calendar-management-actions > *,
.share-management-actions > * {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 13px;
}

.calendar-management-actions,
.share-management-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.calendar-management-actions .revoke-calendar-sub-btn,
.share-management-actions .revoke-share-link-btn {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fff;
}

.calendar-action-status {
  min-height: 18px;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.calendar-plain-note {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .calendar-primary-actions,
  .share-link-actions {
    grid-template-columns: 1fr;
  }

  .share-link-actions input {
    width: 100%;
    box-sizing: border-box;
  }
}

.detail-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.detail-option strong,
.detail-option span {
  display: block;
}

.detail-option p {
  margin: 5px 0 0;
}

.detail-option em {
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.ticket-panel {
  border-color: #b7dbd4;
}

.ticket-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.ticket-row span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  height: 100%;
  box-sizing: border-box;
}

.ticket-row strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}

.local-guide-links a {
  flex: 1 1 150px;
  text-align: center;
}

.meal-guide {
  border-color: #f0d8a8;
  background: #fffaf1;
}

.meal-guide h4 {
  color: #8a5600;
}

.poi-guide {
  border-color: #b7dbd4;
  background: #f2fbf8;
}

.poi-story-panel {
  min-height: 0;
  overflow: visible;
}

.poi-story-copy {
  display: grid;
  gap: 6px;
}

.poi-story-copy p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.poi-story-copy strong {
  color: var(--ink);
}

.poi-guide-list {
  margin: 0;
  padding-left: 18px;
}

.poi-guide-list li + li {
  margin-top: 6px;
}

.poi-ticket-panel p {
  margin: 0;
}

.poi-ticket-panel a {
  display: inline-block;
  margin-top: 4px;
}

.poi-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.poi-section-head h4 {
  flex: 0 0 auto;
}

.poi-section-head .local-guide-links {
  justify-content: flex-end;
  overflow: visible;
}

.destination-link {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none;
}

.link-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.site-icon {
  border-radius: 5px;
}

.local-guide-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 0;
}

.official-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f2fbf8;
  color: var(--teal);
}

.official-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chinese-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #fff4e8;
  color: #9a5a14;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.voice-guide-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.voice-guide-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.voice-guide-button span {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  display: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.18);
}

.voice-guide-button:hover span,
.voice-guide-button:focus-visible span {
  display: block;
}

.voice-guide-button.is-playing {
  background: var(--ink);
  border-color: var(--ink);
}

.voice-link-preview {
  overflow-wrap: anywhere;
}

.voice-link-preview {
  display: block;
  margin-top: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.voice-player {
  margin: 0 22px 14px;
  gap: 12px;
  padding: 12px 14px;
  border-color: #b7dbd4;
  background: #f8fcfb;
}

.voice-player.is-hidden {
  display: none;
}

.voice-player-inline {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 220px;
  max-width: min(340px, 100%);
  padding: 6px 8px;
  border: 1px solid #b7dbd4;
  border-radius: 8px;
  background: #f8fcfb;
  direction: ltr;
}

.voice-play-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  order: 1;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
}

.voice-play-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.voice-player-time {
  flex: 0 0 auto;
  order: 3;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
  min-width: 72px;
}

.voice-player-slot {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.voice-progress-hit {
  display: block;
  flex: 1 1 auto;
  order: 2;
  min-width: 56px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.voice-progress-track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #d9ebe7;
  overflow: hidden;
}

.voice-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.detail-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 8px;
  padding: 8px 12px 10px;
  border-top: 1px solid var(--line);
  background: rgba(251, 252, 251, 0.95);
}

.detail-actions button {
  width: 100%;
}

.detail-confirm.is-confirmed {
  background: var(--surface);
  color: var(--teal);
  border: 1px solid rgba(15, 118, 110, 0.28);
  box-shadow: none;
}

.segment-confirmed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  color: var(--teal);
  vertical-align: -2px;
}

.segment-confirmed-icon svg {
  width: 14px;
  height: 14px;
}

.plan-cell strong {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.timeline-items {
  position: relative;
  display: grid;
  gap: 0;
  padding: 8px 15px 12px;
}

.timeline-items::before {
  content: "";
  position: absolute;
  left: 91px;
  top: 18px;
  bottom: 20px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 62px 88px minmax(0, 1fr) 88px;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 72px;
  top: 20px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.timeline-item time {
  padding-top: 1px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.timeline-item h4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.35;
}

.timeline-item p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.5;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
}

.item-meta span {
  padding: 4px 7px;
  border-radius: 8px;
  background: #f5f7f6;
  white-space: nowrap;
}

.item-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.item-actions strong {
  text-align: right;
  font-size: 14px;
  white-space: nowrap;
}

.duration-badge {
  padding: 3px 7px;
  border-radius: 8px;
  background: #eef3f1;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.adjust-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.adjust-button:hover,
.adjust-button:focus-visible {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(8, 124, 114, 0.12);
}

.item-type {
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.item-type.long-haul {
  background: #edf2ff;
  color: #3451a3;
}

.item-type.hotel {
  background: #fff2e8;
  color: #9a5a14;
}

.item-type.local {
  background: #eaf5f1;
  color: var(--teal);
}

.item-type.meal {
  background: #fff4de;
  color: #8a5600;
}

.map-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.map-toolbar-compact {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}

.map-toolbar-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.map-toolbar-primary .map-tabs {
  flex: 1 1 auto;
  min-width: 0;
}

.map-toolbar-primary .title-actions {
  flex: 0 0 auto;
  margin-left: auto;
  position: relative;
  z-index: 3;
}

.map-toolbar-compact .map-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.map-toolbar-compact .map-hint span {
  padding: 4px 7px;
  font-size: 11px;
}

.map-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.map-scope {
  min-width: 42px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.map-scope:hover:not(.active) {
  background: rgba(23, 32, 28, 0.07);
}

.map-scope:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.map-scope.overview-scope {
  min-width: 58px;
}

.map-scope.active {
  background: var(--ink);
  color: #fff;
}

.map-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.map-hint span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.title-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 32, 28, 0.12);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.title-action:hover {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 10px 22px rgba(8, 124, 114, 0.28);
}

.title-action:active {
  transform: translateY(1px);
  box-shadow: 0 6px 14px rgba(8, 124, 114, 0.2);
}

.title-action:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.title-action.view-mode-toggle:hover,
.title-action.view-mode-toggle:focus-visible,
.title-action.calendar-export-toggle:hover,
.title-action.calendar-export-toggle:focus-visible {
  background: #fff;
  color: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 8px 20px rgba(8, 124, 114, 0.2);
  transform: translateY(-1px);
}

.title-action.view-mode-toggle:active,
.title-action.calendar-export-toggle:active {
  transform: translateY(0);
  background: var(--surface-soft);
}

.title-action.cost-verify {
  display: inline-flex;
  width: auto;
  min-width: 34px;
  padding: 0 11px;
  gap: 6px;
  background: #fff;
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 8px 18px rgba(8, 124, 114, 0.14);
}

.title-action.cost-verify:hover,
.title-action.cost-verify:focus-visible {
  background: var(--teal);
  color: #fff;
}

.title-action.cost-verify > span {
  position: static;
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
  white-space: nowrap;
}

.title-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.title-action span {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  min-width: max-content;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.18);
}

.booking-progress span {
  padding-bottom: 18px;
}

.booking-progress i,
.booking-progress-large i {
  display: block;
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.booking-progress b,
.booking-progress-large b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2bbf9f;
}

.booking-progress > i {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 14px);
  z-index: 1;
  display: none;
  width: 98px;
}

.title-action:hover span,
.title-action:focus-visible span {
  display: block;
}

.booking-progress:hover > i,
.booking-progress:focus-visible > i {
  display: block;
}

.booking-progress-large {
  display: grid;
  gap: 8px;
  padding: 12px 18px 0;
}

.booking-progress-large i {
  height: 8px;
  background: var(--surface-soft);
}

.booking-progress-large span {
  color: var(--muted);
  font-size: 13px;
}

.booking-manifest {
  display: grid;
  gap: 12px;
  padding-top: 0;
}

.booking-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 22px 10px;
}

.booking-filter {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.booking-filter.active {
  border-color: var(--teal);
  background: #eef8f5;
  color: var(--teal);
}

.detail-drawer.detail-booking.open {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.detail-drawer.detail-booking .detail-main {
  display: block;
  min-width: 0;
  padding: 0 18px 12px;
  overflow: auto;
}

.detail-drawer.detail-booking .booking-progress-large {
  margin: 0 18px 10px;
}

.detail-drawer.detail-booking .booking-filters {
  padding: 0 18px 12px;
}

.booking-list-head,
.booking-list-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 72px 68px;
  align-items: center;
  column-gap: 12px;
}

.booking-list-head {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.booking-list-head span:last-child {
  justify-self: end;
}

.booking-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.booking-list-row {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.booking-list-row:last-child {
  border-bottom: 0;
}

.booking-tier {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.booking-tier.tier-required {
  background: #fff0ee;
  color: #b42318;
}

.booking-tier.tier-recommended {
  background: #eef3ff;
  color: #3559b8;
}

.booking-tier.tier-onsite {
  background: var(--surface-soft);
  color: var(--muted);
}

.booking-list-copy {
  min-width: 0;
}

.booking-list-title {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  word-break: normal;
  overflow-wrap: anywhere;
}

.booking-list-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.booking-list-price {
  justify-self: end;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.booking-status {
  justify-self: end;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.booking-status.status-pending {
  background: #eef3ff;
  color: #3559b8;
}

.booking-status.status-watching {
  background: #fff4e8;
  color: #9a5a14;
}

.booking-status.status-booked {
  background: #e8f5ef;
  color: #0d6b4e;
}

.booking-status.status-skipped {
  background: var(--surface-soft);
  color: var(--muted);
}

.booking-status.status-onsite {
  background: var(--surface-soft);
  color: var(--muted);
}

.booking-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 64px;
}

.booking-action {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.booking-action.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.booking-action.ghost {
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.booking-list-empty {
  margin: 0;
  padding: 12px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.booking-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.booking-badge.status-pending {
  background: #eef3ff;
  color: #3559b8;
}

.booking-badge.status-watching {
  background: #fff4e8;
  color: #9a5a14;
}

.booking-badge.status-booked {
  background: #e8f5ef;
  color: #0d6b4e;
}

.booking-badge.status-skipped {
  background: var(--surface-soft);
  color: var(--muted);
}

.booking-badge.status-onsite {
  background: var(--surface-soft);
  color: var(--muted);
}

@media (max-width: 520px) {
  .booking-list-head,
  .booking-list-main {
    grid-template-columns: 48px minmax(0, 1fr);
    row-gap: 6px;
  }

  .booking-list-head span:nth-child(3),
  .booking-list-head span:nth-child(4),
  .booking-list-price,
  .booking-status {
    justify-self: start;
  }

  .booking-list-head span:nth-child(3),
  .booking-list-price {
    grid-column: 2;
  }

  .booking-list-head span:nth-child(4),
  .booking-status {
    grid-column: 2;
    justify-self: end;
  }

  .booking-list-actions {
    padding-left: 0;
  }
}

.map-canvas {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dfece8;
}

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

.map-coverage-status {
  position: absolute;
  z-index: 800;
  left: 12px;
  bottom: 12px;
  max-width: min(560px, calc(100% - 24px));
  padding: 8px 11px;
  border: 1px solid rgba(167, 103, 33, 0.24);
  border-radius: 9px;
  background: rgba(255, 249, 235, 0.94);
  color: #75501f;
  box-shadow: 0 7px 18px rgba(52, 40, 22, 0.12);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.marker-index {
  position: absolute;
  top: -6px;
  left: -6px;
  right: auto;
  /* The number is an interaction cue, not part of the image. Keep it above
     the photo, status tag, and any marker decoration. */
  z-index: 30;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  font-style: normal;
  box-shadow: 0 4px 10px rgba(8, 124, 114, 0.35);
  pointer-events: none;
  isolation: isolate;
}

.marker-index span {
  position: relative;
  z-index: 2;
}

/* Multiple canonical cards may intentionally share one physical venue
   (hotel + breakfast/dinner). Keep their real Leaflet coordinates identical,
   but expose each card as a stable visual stack so none disappears behind
   another marker. The offset is CSS-only and does not participate in route
   geometry or zoom recalculation. */
.leaflet-marker-icon.map-coincident-stack {
  transition:
    margin-left 140ms cubic-bezier(0.2, 0.8, 0.2, 1),
    margin-top 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: margin-left, margin-top;
}

.leaflet-marker-icon.map-coincident-stack:not(.map-coincident-expanded) {
  filter: drop-shadow(0 3px 6px rgba(17, 67, 61, 0.16));
}

.map-marker-leader-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}

.map-route-sequence-connector.is-pending {
  color: #9a6a2f;
  background: #fff8e8;
  border: 1px solid rgba(154, 106, 47, 0.38);
}

.map-route-sequence-connector.is-pending em {
  color: #86591f;
}

.photo-marker.city .marker-index {
  top: 6px;
  right: 6px;
  left: auto;
}

.photo-marker {
  position: relative;
  box-sizing: border-box;
  overflow: visible;
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  border-radius: 14px;
  background-color: var(--surface-soft);
  background-image: var(--fallback-image);
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 18px rgba(23, 32, 28, 0.24);
}

.photo-marker img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.leaflet-container .leaflet-marker-pane .photo-marker img {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  padding: 0;
  object-fit: cover;
}

.photo-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: var(--surface-soft);
  transform: translateX(-50%) rotate(45deg);
}

.photo-marker.terminal {
  border-color: rgba(255, 255, 255, 0.98);
  background-color: #eaf3f7;
  box-shadow: 0 10px 22px rgba(31, 73, 92, 0.28);
}

.photo-marker.terminal.airport {
  outline: 2px solid rgba(36, 59, 122, 0.18);
}

.photo-marker.terminal.station {
  outline: 2px solid rgba(52, 81, 163, 0.16);
}

.leaflet-marker-icon:hover {
  z-index: 20000 !important;
}

.photo-marker.cluster {
  border-radius: 14px;
}

.photo-marker.city {
  display: grid;
  grid-template-rows: 78px minmax(0, 1fr);
  width: 120px;
  height: 126px;
  overflow: hidden;
  border-width: 3px;
  border-radius: 8px;
  background-color: var(--surface);
  box-shadow: 0 14px 30px rgba(23, 32, 28, 0.28);
}

.photo-marker.city img {
  width: 100%;
  height: 78px;
  max-height: 78px;
  border-radius: 5px;
}

.leaflet-container .leaflet-marker-pane .photo-marker.city img {
  height: 78px !important;
  max-height: 78px !important;
}

.photo-marker.city::after {
  content: none;
  display: none;
}

.city-caption {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 0;
  padding: 6px 7px 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  line-height: 1.2;
  text-align: center;
}

.city-caption strong,
.city-caption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-caption strong {
  font-size: 14px;
  font-weight: 900;
}

.city-caption span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.photo-marker em {
  position: absolute;
  left: 50%;
  bottom: -22px;
  max-width: 76px;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid rgba(207, 224, 218, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 5px 12px rgba(23, 32, 28, 0.12);
  opacity: 0;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease;
}

.photo-marker:hover em,
.photo-marker.is-hovered em {
  opacity: 1;
  transform: translate(-50%, 0);
}

.simple-marker {
  position: relative;
  overflow: visible;
  display: inline-grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 4px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 32, 28, 0.25);
  font-size: 15px;
  font-weight: 900;
}

.simple-marker.endpoint {
  max-width: 104px;
  padding-inline: 9px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-color: rgba(34, 67, 60, 0.18);
  box-shadow: 0 8px 20px rgba(23, 32, 28, 0.2);
}

.simple-marker.endpoint.flight span {
  color: #243b7a;
}

.simple-marker.endpoint.rail span {
  color: #3451a3;
}

.simple-marker.endpoint small {
  max-width: 70px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
}

.simple-marker small {
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.simple-marker.meal {
  background: #fff4de;
  color: #8a5600;
  border-color: #fff;
  box-shadow: 0 8px 18px rgba(138, 86, 0, 0.22);
}

.simple-marker.hotel {
  background: #fff2e8;
  color: #9a5a14;
  border-color: #fff;
  box-shadow: 0 8px 18px rgba(154, 90, 20, 0.24);
}

.photo-marker:hover,
.photo-marker.is-hovered,
.simple-marker:hover,
.simple-marker.is-hovered {
  box-shadow: 0 18px 36px rgba(23, 32, 28, 0.34);
  transform: translateY(-2px);
}

.photo-marker.is-selected,
.simple-marker.is-selected {
  outline: 4px solid rgba(217, 111, 85, 0.42);
  box-shadow: 0 14px 30px rgba(23, 32, 28, 0.34);
  transform: translateY(-2px);
}

.simple-marker.rail {
  background: #3451a3;
}

.simple-marker.flight {
  background: #243b7a;
}

.route-arrow {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 5px 12px rgba(23, 32, 28, 0.2);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.leaflet-pane.leaflet-routeHitPane-pane,
.leaflet-pane.leaflet-routeArrowPane-pane {
  pointer-events: auto !important;
}

.leaflet-pane.leaflet-routeHitPane-pane .leaflet-marker-icon.route-arrow-marker,
.leaflet-pane.leaflet-routeArrowPane-pane .leaflet-marker-icon.route-arrow-marker,
.leaflet-marker-icon.route-arrow-marker,
.route-arrow {
  pointer-events: auto !important;
  cursor: pointer;
}

.map-tooltip {
  min-width: 240px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.16);
  white-space: nowrap;
}

.map-tooltip strong,
.map-tooltip span {
  display: block;
}

.map-tooltip strong {
  margin-bottom: 4px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-tooltip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-route-hit-area {
  cursor: pointer;
}

.leaflet-pane.leaflet-routeHitPane-pane .leaflet-marker-icon.map-route-chip-marker,
.leaflet-pane.leaflet-routeArrowPane-pane .leaflet-marker-icon.map-route-chip-marker {
  pointer-events: auto !important;
  cursor: pointer;
}

.map-route-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  max-width: 96px;
  padding: 4px 10px;
  border: 1px solid rgba(217, 111, 85, 0.45);
  border-radius: 999px;
  background: rgba(255, 252, 250, 0.96);
  color: #b84f38;
  box-shadow: 0 6px 18px rgba(23, 32, 28, 0.18);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.map-route-chip.flight::before {
  content: "✈ ";
}

.map-route-chip.rail::before {
  content: "↔ ";
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.map-details {
  display: none !important;
}

.map-details article {
  flex: 1;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-details strong,
.map-details span {
  display: block;
}

.map-details span {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.header-menu-entry {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.header-menu-entry:hover {
  border-color: #b8ddd8;
  background: #f7fbfa;
}

.header-menu-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--teal);
}

.header-menu-link:hover {
  color: var(--teal-dark);
}

.header-menu-link.is-active {
  color: var(--teal-dark);
  font-weight: 700;
}

.account-page-platforms {
  max-width: 720px;
}

.platforms-intro {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #dce9e7;
  border-radius: 14px;
  background: #f7fbfa;
}

.platforms-connected-count {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--teal-dark);
}

.platforms-intro-lead,
.platforms-intro-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.platforms-intro-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.platforms-intro-note code {
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #eef5f4;
}

.platform-auth-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dce9e7;
}

.platform-auth-boundaries-compact {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.platform-auth-boundary-block {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #dce9e7;
}

.platform-auth-boundary-block-wont {
  border-color: #f0ddd8;
  background: #fffaf8;
}

.platform-auth-boundary-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--teal-dark);
}

.platform-auth-boundary-block-wont .platform-auth-boundary-title {
  color: #a04432;
}

.platform-auth-boundary-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.platform-connect-dialog {
  padding: 0;
  border: 0;
  border-radius: 16px;
  max-width: 520px;
  width: calc(100% - 32px);
}

.platform-connect-dialog::backdrop {
  background: rgba(15, 35, 32, 0.45);
}

.platform-connect-panel {
  padding: 20px 22px 18px;
}

.platform-connect-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.platform-connect-head h2 {
  margin: 0;
  font-size: 18px;
}

.platform-connect-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.platform-connect-lead {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.platform-connect-message {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.platform-connect-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.platform-connect-actions .primary-button,
.platform-connect-actions .ghost-button {
  flex: 1;
}

.platforms-page-groups {
  display: grid;
  gap: 16px;
}

.platform-category {
  padding: 14px 16px 12px;
  border: 1px solid #dce9e7;
  border-radius: 14px;
  background: #fff;
}

.platform-category-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.platform-category-title::before {
  content: "[";
}

.platform-category-title::after {
  content: "]";
}

.platform-row-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.platform-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 72px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.platform-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.platform-row-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 15px;
}

.platform-row-name strong {
  font-weight: 700;
}

.platform-row-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.platform-row-status.is-connected {
  color: var(--teal-dark);
}

.platform-row-action {
  justify-self: end;
  min-width: 64px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.platform-manage-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
}

.platform-manage-dialog::backdrop {
  background: rgba(23, 32, 28, 0.42);
}

.platform-manage-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.platform-manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.platform-manage-head h2 {
  margin: 0;
  font-size: 18px;
}

.platform-manage-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.platform-manage-meta {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.platform-manage-meta-row {
  display: grid;
  gap: 4px;
}

.platform-manage-meta dt {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.platform-manage-meta dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.platform-manage-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.platform-manage-actions .primary-button,
.platform-manage-actions .ghost-button {
  min-height: 40px;
  font-size: 13px;
}

.platform-manage-disconnect {
  color: #b54a3a;
  border-color: #efc8c0;
}

.platforms-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.platforms-page-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #dce9e7;
  border-radius: 14px;
  background: #fff;
}

.platforms-page-card.is-connected {
  border-color: #b8ddd8;
  background: #f7fbfa;
}

.platforms-page-card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.platforms-page-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.platforms-page-scope {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.platforms-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.platforms-page-actions .primary-button,
.platforms-page-actions .ghost-button {
  padding: 8px 14px;
  font-size: 13px;
}

.platforms-save-status {
  margin: 14px 2px 0;
  min-height: 20px;
  font-size: 13px;
  color: var(--teal-dark);
}

.account-page-preferences {
  max-width: 640px;
}

.preferences-panel {
  padding: 18px;
  border: 1px solid #dce9e7;
  border-radius: 14px;
  background: #fff;
}

.preferences-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.preferences-panel-head h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.preferences-panel-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.preference-tags-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preference-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 8px 10px 8px 14px;
  border: 1px solid #b8ddd8;
  border-radius: 999px;
  background: #f7fbfa;
  color: var(--teal-dark);
}

.preference-tag-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.preference-tag-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.preference-tag-remove:hover {
  background: #e8f3f1;
  color: var(--teal-dark);
}

.preferences-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.preferences-save-status {
  margin: 14px 2px 0;
  min-height: 20px;
  font-size: 13px;
  color: var(--teal-dark);
}

.account-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 40px;
}

.account-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.account-page-kicker {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.account-page-head h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.account-page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.trips-page-list {
  display: grid;
  gap: 12px;
}

.trips-page-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.trips-page-card.is-current {
  border-color: #9ec5e8;
  background: #f3f9ff;
}

.trips-page-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.trips-page-card-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.trips-page-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.trips-page-card-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.trips-page-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
}

.account-page-auth {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 56px);
  padding-top: 40px;
  padding-bottom: 40px;
}

.auth-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card-head h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.auth-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0 16px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.auth-tab {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--teal);
  box-shadow: 0 1px 4px rgba(23, 32, 28, 0.08);
}

.auth-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 16px;
  padding: 0;
  list-style: none;
}

.auth-step {
  position: relative;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.auth-step.is-active {
  border-color: #b8ddd8;
  background: #f7fbfa;
  color: var(--teal-dark);
}

.auth-step.is-done {
  border-color: #b8ddd8;
  color: var(--teal);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auth-code-row input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.auth-code-button {
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

.auth-code-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-status {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--teal-dark);
  font-weight: 700;
}

.auth-switch {
  margin: 16px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.auth-switch a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.auth-switch a:hover {
  color: var(--teal-dark);
}

.auth-verified-badge {
  margin: 0 0 4px;
  padding: 10px 12px;
  border: 1px solid #b8ddd8;
  border-radius: 10px;
  background: #f7fbfa;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.auth-form-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.auth-back-button,
.auth-form-actions .auth-submit {
  min-height: 42px;
}

.auth-form-actions .auth-submit {
  width: 100%;
  margin-top: 0;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.auth-field input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.auth-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
}

.auth-footnote {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

.account-page-profile {
  max-width: 820px;
}

.profile-completion-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 18px;
  border-bottom: 1px solid #dce9e7;
  background: #f7fbfa;
}

.profile-nudge-copy {
  display: grid;
  gap: 4px;
}

.profile-nudge-copy strong {
  font-size: 14px;
  color: var(--ink);
}

.profile-nudge-copy span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-nudge-action {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

.profile-welcome-banner {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #b8ddd8;
  border-radius: 12px;
  background: #f7fbfa;
}

.profile-welcome-banner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.profile-welcome-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.profile-section-highlight {
  border-color: #b8ddd8;
  background: linear-gradient(180deg, #f7fbfa 0%, #fff 100%);
}

.profile-doc-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.profile-doc-group-priority h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--teal-dark);
}

.profile-traveler-card-self {
  border-color: #b8ddd8;
}

.profile-empty-companions {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.profile-form {
  display: grid;
  gap: 16px;
}

.profile-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-section-head h2 {
  margin: 0;
}

.profile-section-note {
  margin: -4px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-field {
  display: grid;
  gap: 6px;
}

.profile-field-span {
  grid-column: 1 / -1;
}

.profile-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.profile-field input,
.profile-field select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-field input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

.profile-doc-grid,
.profile-traveler-grid {
  display: grid;
  gap: 12px;
}

.profile-doc-card,
.profile-traveler-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.profile-doc-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.profile-traveler-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.profile-remove-traveler {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 8px;
}

.profile-save-status {
  margin: 0;
  font-size: 12px;
  color: var(--teal);
  font-weight: 700;
}

.profile-save-button {
  min-height: 42px;
  padding: 0 18px;
}

@media (max-width: 620px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-completion-nudge {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-nudge-action {
    width: 100%;
  }

  .platform-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name status"
      "action action";
  }

  .platform-row-name {
    grid-area: name;
  }

  .platform-row-status {
    grid-area: status;
    justify-self: end;
  }

  .platform-row-action {
    grid-area: action;
    width: 100%;
    justify-self: stretch;
  }

  .platform-manage-actions {
    grid-template-columns: 1fr;
  }

  .platform-auth-boundaries {
    grid-template-columns: 1fr;
  }

  .flight-explore-toolbar {
    flex-direction: column;
  }

  .flight-explore-start {
    width: 100%;
  }

  .platform-connect-actions {
    flex-direction: column;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .auth-form-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .app-header,
  .planner-layout {
    grid-template-columns: 1fr;
  }

  .app-header {
    height: auto;
    padding: 12px 14px;
  }

  .planner-layout {
    height: calc(100vh - 56px);
    overflow: hidden;
  }

  .itinerary-column {
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
  }

  .map-canvas {
    min-height: 0;
  }

  .chat-column {
    display: none;
  }

  .detail-main {
    grid-template-columns: minmax(140px, 0.4fr) minmax(0, 0.6fr);
  }

  .detail-drawer.detail-poi .detail-main,
  .detail-drawer.detail-meal-signature .detail-main {
    grid-template-columns: minmax(160px, 0.44fr) minmax(0, 0.56fr);
  }

  .detail-drawer.open .detail-poi-hero,
  .detail-drawer.open .detail-hero,
  .detail-drawer.open .travel-detail-hero {
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
  }

  .detail-gallery {
    grid-template-rows: minmax(120px, 1fr) minmax(120px, 1fr);
  }

  .detail-hero {
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
  }

  .header-nav {
    width: 100%;
    justify-content: flex-end;
  }

  .header-menu-panel {
    right: 0;
    left: auto;
  }
}

@media (max-width: 620px) {
  .planner-layout {
    padding: 10px;
  }

  .chat-column,
  .itinerary-column {
    padding: 14px;
  }

  .pane-head,
  .itinerary-toolbar,
  .day-head,
  .timeline-item {
    min-width: 0;
  }

  .day-side {
    display: grid;
    justify-content: start;
  }

  .poi-strip {
    justify-content: start;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    padding-left: 20px;
  }

  .timeline-items::before {
    left: 5px;
  }

  .timeline-item::before {
    left: 0;
  }

  .item-actions,
  .day-head > strong {
    justify-items: start;
    text-align: left;
  }

  .detail-summary-unified {
    grid-template-columns: 1fr;
  }

  .chat-box {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------
   P5.9.5 Mobile / Tablet compatibility

   Trip View keeps the same DOM, map projection and interaction handlers at
   every size. These rules only change layout and hit-area presentation.
   Keep this block together so later pages do not accumulate conflicting
   mobile overrides.
---------------------------------------------------------------------------- */
:where(html, body) {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.trip-view-page,
.trip-view-page .app-shell {
  min-height: 100dvh;
}

.trip-view-page .planner-layout {
  height: calc(100dvh - 56px);
  min-height: 0;
  min-width: 0;
}

.trip-view-page .chat-column,
.trip-view-page .itinerary-column,
.trip-view-page #mapView,
.trip-view-page .trip-content,
.trip-view-page .trip-panel,
.trip-view-page .map-panel,
.trip-view-page .manifest-panel {
  min-width: 0;
}

.trip-view-page .map-toolbar-primary,
.trip-view-page .map-toolbar-primary .map-tabs,
.trip-view-page .map-toolbar-primary .title-actions {
  min-width: 0;
}

.trip-view-page .map-toolbar-primary .map-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.trip-view-page .map-toolbar-primary .map-scope {
  flex: 0 0 auto;
  min-height: 44px;
}

.trip-view-page .title-action,
.trip-view-page .detail-close,
.trip-view-page .detail-nav,
.trip-view-page .detail-map-icon-link {
  min-width: 44px;
  min-height: 44px;
}

.trip-view-page .map-route-sequence {
  min-width: 0;
  overscroll-behavior-x: contain;
}

.trip-view-page .map-canvas,
.trip-view-page .real-map {
  min-width: 0;
}

.trip-view-page .detail-drawer.open {
  min-width: 0;
}

.trip-view-page .detail-card-scroll,
.trip-view-page .detail-drawer.detail-calendar-sync .detail-main,
.trip-view-page .detail-drawer.detail-share .detail-main {
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 961px) and (max-width: 1120px) {
  .trip-view-page .planner-layout {
    grid-template-columns: minmax(290px, 34vw) minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .trip-view-page .chat-column,
  .trip-view-page .itinerary-column {
    padding: 10px;
  }
}

@media (max-width: 960px) {
  .trip-view-page .app-header {
    min-height: 56px;
    height: auto;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .trip-view-page .planner-layout {
    height: calc(100dvh - 56px - env(safe-area-inset-top));
    padding: 10px;
  }

  .trip-view-page .chat-column {
    display: none;
  }

  .trip-view-page .itinerary-column {
    width: 100%;
    overflow: hidden;
    padding: 10px;
  }

  .trip-view-page .map-toolbar-primary {
    align-items: stretch;
  }

  .trip-view-page .map-toolbar-primary .title-actions {
    gap: 4px;
  }

  .trip-view-page .map-toolbar-primary .title-action {
    width: 44px;
    height: 44px;
  }

  .trip-view-page .map-hint {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .trip-view-page .map-hint span {
    flex: 0 0 auto;
  }

  .trip-view-page .map-canvas {
    min-height: clamp(360px, 56dvh, 660px);
  }

  .trip-view-page .detail-drawer.open {
    position: fixed;
    inset: auto 0 0;
    z-index: 1200;
    width: 100%;
    height: min(88dvh, 760px);
    max-height: calc(100dvh - env(safe-area-inset-top));
    border-right: 0;
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 56px rgba(15, 23, 42, 0.22);
  }

  .trip-view-page .detail-drawer.open .detail-head {
    position: relative;
    padding: 12px 14px;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .trip-view-page .detail-drawer.open .detail-head::before {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    content: "";
    transform: translateX(-50%);
  }

  .trip-view-page .detail-drawer.open .detail-card-scroll {
    min-height: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .trip-view-page .detail-drawer.open .detail-main,
  .trip-view-page .detail-drawer.open .detail-summary,
  .trip-view-page .detail-drawer.open .detail-facts {
    min-width: 0;
  }

  .trip-view-page .detail-drawer.detail-card-open .detail-main,
  .trip-view-page .detail-drawer.detail-local .detail-main,
  .trip-view-page .detail-drawer.detail-hotel .detail-main,
  .trip-view-page .detail-drawer.detail-poi .detail-main,
  .trip-view-page .detail-drawer.detail-meal .detail-main,
  .trip-view-page .detail-drawer.detail-meal-signature .detail-main {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .trip-view-page .detail-drawer.open .detail-poi-hero,
  .trip-view-page .detail-drawer.open .detail-hero,
  .trip-view-page .detail-drawer.open .travel-detail-hero {
    width: 100%;
    height: clamp(132px, 24dvh, 220px);
    min-height: 132px;
    max-height: 220px;
  }

  .trip-view-page .detail-drawer.detail-calendar-sync .detail-main,
  .trip-view-page .detail-drawer.detail-share .detail-main {
    padding: 12px 14px calc(20px + env(safe-area-inset-bottom));
  }

  .trip-view-page .enrichment-overview {
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .trip-view-page .app-header {
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .trip-view-page .brand {
    gap: 8px;
  }

  .trip-view-page .brand strong {
    font-size: 15px;
  }

  .trip-view-page .header-nav {
    gap: 0;
  }

  .trip-view-page .header-menu-trigger {
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
  }

  .trip-view-page .planner-layout {
    padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
  }

  .trip-view-page .itinerary-column {
    padding: 8px;
    border-radius: 14px;
  }

  .trip-view-page .map-toolbar-primary {
    gap: 4px;
  }

  .trip-view-page .map-toolbar-primary .title-actions {
    flex: 0 0 auto;
  }

  .trip-view-page .map-toolbar-primary .title-action {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .trip-view-page .map-scope {
    min-width: 44px;
    padding: 0 10px;
    font-size: 12px;
  }

  .trip-view-page .map-canvas {
    min-height: clamp(340px, 52dvh, 520px);
  }

  .trip-view-page .map-search-bar {
    top: 8px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }

  .trip-view-page .map-search-input-wrapper {
    min-height: 44px;
  }

  .trip-view-page .map-route-sequence {
    padding: 8px 6px;
  }

  .trip-view-page .calendar-mode-switch {
    grid-template-columns: 1fr;
  }

  .trip-view-page .calendar-primary-actions,
  .trip-view-page .calendar-management-actions,
  .trip-view-page .share-management-actions {
    grid-template-columns: 1fr;
  }

  .trip-view-page .calendar-primary-actions > *,
  .trip-view-page .calendar-management-actions > *,
  .trip-view-page .share-management-actions > * {
    min-height: 44px;
  }

  .trip-view-page .detail-summary,
  .trip-view-page .detail-facts,
  .trip-view-page .detail-summary-unified {
    grid-template-columns: minmax(0, 1fr);
  }

  .trip-view-page .detail-drawer.open .detail-close {
    width: 44px;
    height: 44px;
  }

  .trip-view-page .detail-drawer.open .detail-section,
  .trip-view-page .detail-drawer.open .detail-evidence-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .trip-view-page .detail-drawer.open .detail-actions,
  .trip-view-page .detail-drawer.open .detail-links,
  .trip-view-page .detail-drawer.open .card-booking-links,
  .trip-view-page .detail-drawer.open .card-search-entries {
    grid-template-columns: minmax(0, 1fr);
  }

  .trip-view-page .detail-drawer.open .detail-actions > *,
  .trip-view-page .detail-drawer.open .detail-links > *,
  .trip-view-page .detail-drawer.open .card-booking-link,
  .trip-view-page .detail-drawer.open .card-search-link {
    min-height: 44px;
  }

  .trip-view-page .detail-drawer.open .detail-card-scroll {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .trip-view-page .map-toolbar-primary .title-action {
    width: 40px;
    min-width: 40px;
  }

  .trip-view-page .title-action svg {
    width: 17px;
    height: 17px;
  }

  .trip-view-page .map-hint span {
    font-size: 10px;
  }
}

/* Share is a read-only projection, but it gets the same touch-first layout
   treatment: the map/list remains one DOM and the drawer owns its scroll. */
.share-view-page,
.share-view-page .share-app-shell,
.share-view-page #shareLoadedView {
  min-height: 100dvh;
}

@media (max-width: 720px) {
  .share-view-page .share-header {
    align-items: flex-start;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }

  .share-view-page .share-header-left {
    min-width: 0;
    gap: 7px;
  }

  .share-view-page .share-title-group,
  .share-view-page .share-trip-title {
    min-width: 0;
  }

  .share-view-page .share-trip-title {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .share-view-page .share-trip-subtitle,
  .share-view-page .share-updated-at {
    display: none;
  }

  .share-view-page .share-header-right {
    flex: 0 0 auto;
  }

  .share-view-page .share-view-toggle {
    min-height: 44px;
  }

  .share-view-page .share-view-btn {
    min-height: 40px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .share-view-page .share-guide {
    padding: 8px 10px;
    font-size: 11px;
  }

  .share-view-page .share-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 8px 10px;
  }

  .share-view-page .share-day-tabs {
    min-width: 0;
    padding-bottom: 3px;
  }

  .share-view-page .share-day-tab {
    min-height: 44px;
    padding: 8px 12px;
  }

  .share-view-page .share-summary-chips {
    overflow-x: auto;
  }

  .share-view-page .share-map-wrapper,
  .share-view-page #shareMap {
    min-height: 0;
  }

  .share-view-page .share-manifest-wrapper {
    padding: 12px 10px calc(20px + env(safe-area-inset-bottom));
  }

  .share-view-page .share-day-card {
    padding: 12px;
  }

  .share-view-page .share-day-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .share-view-page .share-item-card {
    min-height: 56px;
    padding: 10px;
  }

  .share-view-page .share-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(82dvh, 720px);
    max-height: calc(100dvh - env(safe-area-inset-top));
    border-right: 0;
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 56px rgba(15, 23, 42, 0.22);
  }

  .share-view-page .share-drawer-head {
    padding: 14px 14px 10px;
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .share-view-page .share-drawer-close {
    width: 44px;
    height: 44px;
  }

  .share-view-page .share-drawer-body {
    padding: 14px 14px calc(20px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }
}

/* Standalone flight search aggregate page (WeChat share link) */
.flight-search-standalone-body {
  background: #eef3f1;
}

.flight-search-shell {
  min-height: 100vh;
}

.flight-search-header-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.flight-search-root.detail-drawer {
  display: grid;
  position: static;
  inset: auto;
  z-index: 1;
  width: min(1000px, calc(100% - 32px));
  min-height: calc(100vh - 120px);
  margin: 20px auto 32px;
  overflow: auto;
}

.flight-search-query-meta {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.flight-search-sync {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.flight-search-root .detail-head {
  padding-right: 18px;
}

.flight-search-root .flight-explore-toolbar {
  align-items: center;
}

@media (max-width: 720px) {
  .flight-search-root.detail-drawer {
    width: calc(100% - 16px);
    margin: 12px auto 24px;
    inset: auto;
  }
}

/* --------------------------------------
   Dashboard Layout (Phase 1) - World Class Atelier Edition
-------------------------------------- */
.dashboard-shell {
  background: radial-gradient(circle at 50% -15%, rgba(15, 118, 110, 0.15) 0%, transparent 65%),
              radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
              radial-gradient(circle at 10% 40%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
              #eaeceb;
  min-height: 100vh;
}

.dashboard-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.dashboard-hero {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 580px;
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(15, 118, 110, 0.14) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 70%);
  filter: blur(45px);
  z-index: 0;
  pointer-events: none;
  animation: heroAuraPulse 8s ease-in-out infinite alternate;
}

@keyframes heroAuraPulse {
  0% { transform: translateX(-50%) scale(0.92); opacity: 0.7; }
  100% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

.hero-pill-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.2);
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(15, 118, 110, 0.06);
  backdrop-filter: blur(12px);
}

.hero-greeting {
  position: relative;
  z-index: 1;
  font-size: 46px;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: #0f172a;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.hero-subtext {
  position: relative;
  z-index: 1;
  font-size: 16.5px;
  font-weight: 500;
  color: #334155;
  margin: 0 0 36px 0;
  max-width: 600px;
  line-height: 1.65;
  letter-spacing: -0.01em;
}

/* Brainstorm Chat Container & Message Bubbles */
.brainstorm-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 14px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto 28px;
}

.brainstorm-workspace[hidden] {
  display: none;
}

.brainstorm-chat-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  max-height: 480px;
  overflow-y: auto;
  margin: 0;
  padding: 24px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.03);
  text-align: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trip-summary-panel {
  position: sticky;
  top: 14px;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  text-align: left;
}

.trip-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.trip-summary-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.trip-summary-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}

.trip-summary-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid #d7dde5;
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 700;
}

.trip-summary-status.ready {
  border-color: #99d5cc;
  color: #0f766e;
  background: #edf9f6;
}

.trip-summary-list {
  display: grid;
  gap: 0;
  margin: 10px 0 12px;
}

.trip-summary-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f6;
}

.trip-summary-item dt {
  color: #64748b;
  font-size: 12px;
}

.trip-summary-item dd {
  min-width: 0;
  margin: 0;
  color: #172033;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.trip-summary-item dd.pending {
  color: #94a3b8;
  font-weight: 500;
}

.trip-summary-edit-button {
  width: 100%;
  min-height: 34px;
  border: 1px solid #b8c3d1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.trip-summary-editor {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.trip-summary-editor[hidden] {
  display: none;
}

.trip-summary-editor label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.trip-summary-editor input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  background: #fff;
}

.trip-summary-editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trip-summary-editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trip-summary-editor-actions button {
  min-height: 34px;
  border: 1px solid #b8c3d1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.trip-summary-editor-actions button[type="submit"] {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

@media (max-width: 820px) {
  .dashboard-main {
    padding-inline: 16px;
  }

  .brainstorm-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .brainstorm-chat-container {
    order: 2;
    padding: 18px;
  }

  .trip-summary-panel {
    position: static;
    order: 1;
  }

  .trip-summary-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }
}

.brainstorm-chat-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brainstorm-msg {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.brainstorm-msg.user {
  align-items: flex-end;
}

.brainstorm-msg.assistant {
  align-items: flex-start;
}

.brainstorm-msg.user .msg-bubble {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 20px 20px 4px 20px;
  font-size: 15px;
  line-height: 1.55;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.22);
  max-width: 85%;
  word-break: break-word;
}

.brainstorm-msg.assistant .msg-bubble {
  background: #f8fafc;
  color: #0f172a;
  padding: 16px 20px;
  border-radius: 20px 20px 20px 4px;
  border: 1.5px solid #e2e8f0;
  font-size: 15px;
  line-height: 1.68;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  max-width: 90%;
  word-break: break-word;
}

/* Standalone system/operation state on the home page: never an Agent reply.
   Used for validation notes, create progress and failure/retry states. */
.brainstorm-msg.system-state {
  align-items: stretch;
}

.brainstorm-msg.system-state .msg-bubble {
  background: #fffbeb;
  color: #7a5a10;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px dashed #d9a441;
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
  word-break: break-word;
}

.brainstorm-retry-btn {
  margin-top: 10px;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: #fff;
  color: #0f766e;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

/* Creation CTA Action Card */
.create-trip-cta-card {
  margin-top: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(99, 102, 241, 0.08));
  border: 1.5px solid rgba(15, 118, 110, 0.3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.1);
  width: 92%;
}

.create-trip-cta-card .cta-badge {
  font-size: 14px;
  font-weight: 700;
  color: #0f766e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.create-trip-cta-btn {
  width: 100%;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #0f766e 0%, #4338ca 100%);
  border: none;
  color: white;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.create-trip-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.4);
  filter: brightness(1.06);
}

.create-trip-cta-btn:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.trip-create-progress {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  width: min(100%, 590px);
  padding: 20px;
  border: 1px solid #b9ddd7;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(235, 249, 246, 0.98), rgba(244, 247, 255, 0.98));
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.1);
}

.trip-create-orbit {
  position: relative;
  width: 72px;
  height: 72px;
  align-self: start;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.trip-create-orbit::before,
.trip-create-orbit::after,
.trip-create-orbit span,
.trip-create-orbit i,
.trip-create-orbit b {
  position: absolute;
  display: block;
  border-radius: 50%;
  content: "";
}

.trip-create-orbit::before {
  inset: 22px;
  background: #0f766e;
  box-shadow: 0 0 0 8px rgba(15, 118, 110, 0.1);
  animation: tripCreatePulse 1.8s ease-in-out infinite;
}

.trip-create-orbit::after {
  inset: 8px;
  border: 1px dashed rgba(67, 56, 202, 0.44);
  animation: tripCreateSpin 8s linear infinite;
}

.trip-create-orbit span { width: 7px; height: 7px; top: 10px; left: 34px; background: #4338ca; }
.trip-create-orbit i { width: 6px; height: 6px; right: 10px; bottom: 19px; background: #f59e0b; }
.trip-create-orbit b { width: 5px; height: 5px; bottom: 11px; left: 17px; background: #0f766e; }

.trip-create-kicker {
  margin: 1px 0 5px;
  color: #0f766e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.trip-create-progress h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.25;
}

.trip-create-progress-copy > p:not(.trip-create-kicker) {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.trip-create-current {
  margin-top: 13px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
  color: #0f766e;
  font-size: 12px;
  font-weight: 750;
}

.trip-create-stages {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.trip-create-stage {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #94a3b8;
}

.trip-create-stage-dot {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.trip-create-stage strong,
.trip-create-stage small {
  display: block;
}

.trip-create-stage strong { font-size: 12px; line-height: 1.25; }
.trip-create-stage small { margin-top: 2px; font-size: 11px; line-height: 1.35; }

.trip-create-stage.is-active { color: #0f766e; }
.trip-create-stage.is-active .trip-create-stage-dot { border-color: #0f766e; background: #0f766e; }
.trip-create-progress--success { border-color: #99d5cc; }
.trip-create-progress--error { border-color: #f3c2bd; background: #fff8f7; }
.trip-create-progress--error .trip-create-orbit::before { background: #c85a54; box-shadow: 0 0 0 8px rgba(200, 90, 84, 0.1); animation: none; }

@keyframes tripCreateSpin { to { transform: rotate(360deg); } }
@keyframes tripCreatePulse { 50% { transform: scale(0.78); opacity: 0.72; } }

@media (max-width: 640px) {
  .trip-create-progress {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .trip-create-orbit { width: 50px; height: 50px; }
  .trip-create-orbit::before { inset: 16px; }
  .trip-create-orbit::after { inset: 5px; }
  .trip-create-orbit span { top: 6px; left: 23px; }
  .trip-create-orbit i { right: 5px; bottom: 12px; }
  .trip-create-orbit b { bottom: 6px; left: 10px; }
}

/* Travel Mode Interactive Pills */
.travel-mode-pills {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mode-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid #cbd5e1;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-pill:hover {
  background: #ffffff;
  border-color: #0f766e;
  color: #0f766e;
  transform: translateY(-1px);
}

.mode-pill.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

/* Search Form */
.hero-search-form {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.09), 0 0 0 1px rgba(15, 23, 42, 0.02);
  border-radius: 999px;
  padding: 6px 8px 6px 24px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input-wrapper:focus-within {
  border-color: #0f766e;
  box-shadow: 0 24px 56px -12px rgba(15, 118, 110, 0.22), 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.hero-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  color: #0f172a;
  padding: 12px 0;
  font-weight: 500;
}

.hero-search-input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.hero-search-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: white;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

.hero-search-button:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.4);
}

/* Infinite Scrolling Inspiration Marquee (24 Items Pixel-Perfect Loop) */
.hero-marquee-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin-top: 32px;
  overflow: hidden;
  padding: 10px 0;
  mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%);
  contain: inline-size;
}

.hero-marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marqueeScroll 45s linear infinite;
  will-change: transform;
}

.hero-marquee-wrapper:hover .hero-marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hero-marquee-item {
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-marquee-item:hover {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.28);
}

/* Copilot Chat UI Upgrade */
.chat-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 6px 5px 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-box:focus-within {
  border-color: #0f766e;
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.18), 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.chat-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  color: #0f172a;
  padding: 8px 0;
  font-weight: 500;
}

.chat-box button.primary-button {
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  transition: all 0.2s ease;
}

.chat-box button.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.35);
}

.dashboard-recent {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dashboard-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
}

.recent-trips-container {
  display: grid;
  gap: 16px;
}

.dashboard-trip-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-trip-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 18px 40px -10px rgba(15, 118, 110, 0.15), 0 0 0 1px rgba(15, 118, 110, 0.15);
}

.dashboard-trip-link {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.dashboard-trip-link h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  transition: color 0.2s ease;
}

.dashboard-trip-card:hover .dashboard-trip-link h3 {
  color: #0f766e;
}

.dashboard-trip-link p {
  margin: 0;
  font-size: 13.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.dashboard-trip-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.dashboard-trip-action {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  transition: all 0.2s ease;
}

.dashboard-trip-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.35);
}

.dashboard-delete-button {
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-delete-button:hover {
  background: #fff1f2;
  color: #e11d48;
}

.dashboard-more-button {
  justify-self: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.8);
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.dashboard-more-button:hover {
  background: #ffffff;
  color: #0d9488;
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
}enter;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-more-button:hover {
  color: var(--teal);
}

@media (max-width: 640px) {
  .dashboard-page,
  .dashboard-body {
    max-width: 100%;
    overflow-x: clip;
  }

  .dashboard-brand-copy {
    gap: 0 !important;
  }

  .dashboard-brand-tagline {
    display: none !important;
  }

  .dashboard-main {
    padding: 40px 16px;
    gap: 44px;
  }

  .hero-greeting {
    font-size: 28px;
  }

  .dashboard-trip-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-trip-link p {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
}

/* --------------------------------------
   Login Split Layout (Phase 2)
-------------------------------------- */
.login-body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.login-split-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

.login-hero-side {
  flex: 5;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 60px;
}

.login-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 60%);
  display: flex;
  align-items: flex-end;
  padding: 60px;
}

.login-hero-text {
  color: white;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.login-hero-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.login-hero-subtitle {
  font-size: 20px;
  opacity: 0.9;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.login-panel-side {
  flex: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  box-shadow: -10px 0 30px rgba(0,0,0,0.05);
  z-index: 10;
}

.login-panel-content {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.login-brand {
  margin-bottom: 40px;
  font-size: 24px;
}

.login-brand .brand-mark {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.auth-field-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.auth-input-minimal {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 16px;
  transition: all 0.2s ease;
}

.auth-input-minimal:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(8, 124, 114, 0.1);
}

.login-submit {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  border-radius: 12px;
  margin-top: 12px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .login-split-layout {
    flex-direction: column;
  }
  .login-hero-side {
    flex: 3;
    padding: 30px;
  }
  .login-hero-overlay {
    padding: 30px;
  }
  .login-hero-title {
    font-size: 32px;
  }
  .login-panel-side {
    flex: 7;
    border-radius: 24px 24px 0 0;
    margin-top: -24px;
  }
}

/* --------------------------------------
   AI Memory Layout (Phase 3)
-------------------------------------- */
.memory-shell {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.memory-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
}

.memory-head {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease-out;
}

.memory-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.memory-icon {
  font-size: 36px;
}

.memory-head h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.memory-subtitle {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  animation: fadeInUp 0.8s ease-out;
}

.memory-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.memory-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(8, 124, 114, 0.08);
  border-color: rgba(8, 124, 114, 0.2);
}

.memory-card-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.memory-tag-icon {
  font-size: 20px;
}

.memory-tag-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.memory-delete-btn {
  background: none;
  border: none;
  color: #caced1;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.memory-delete-btn:hover {
  color: #ff6b6b;
}

.memory-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------------------
 * 详情小卡片：核实状态区 + AI 导游区 + AI 完善区（轮 3）
 * ------------------------------------------------------------------------- */

/* 核实状态区：按钮即动作，状态落在卡片上 */
.detail-verify-section {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--line, #e5e2dc);
  background: #fafaf7;
}
.verify-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.verify-actions .detail-verify,
.verify-actions .detail-confirm {
  min-height: 36px;
  height: 36px;
  padding-top: 0;
  padding-bottom: 0;
}
.verify-state {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  display: grid;
  gap: 4px;
}
.verify-state strong {
  font-size: 13px;
}
.verify-state.is-verifying {
  background: #f3f1ec;
  color: var(--muted, #6f6b63);
  display: flex;
  align-items: center;
  gap: 8px;
}
.verify-state.is-difference {
  background: #fdf3e7;
  border: 1px solid #f0d9b8;
  color: #7a4f12;
}
.verify-state.is-settled {
  background: #eef7f0;
  border: 1px solid #cfe5d4;
  color: #235a33;
}
.verify-state .verify-source {
  color: inherit;
  opacity: 0.75;
}
.verify-state .verify-source a {
  color: inherit;
}
.verify-adopt {
  justify-self: start;
  margin-top: 4px;
  padding: 5px 12px;
  border: 1px solid #d8a64e;
  border-radius: 8px;
  background: #fff;
  color: #8a5a10;
  cursor: pointer;
  font-size: 12px;
}
.verify-adopt:hover {
  background: #fdf3e7;
}
.verify-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(111, 107, 99, 0.25);
  border-top-color: #6f6b63;
  border-radius: 50%;
  animation: verify-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes verify-spin {
  to { transform: rotate(360deg); }
}

/* AI 导游区（景点卡片） */
.detail-guide-section {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--line, #e5e2dc);
  background: #f4f8f7;
}
.guide-intro {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink, #23201b);
}
.guide-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.guide-btn {
  padding: 5px 12px;
  border: 1px solid var(--line, #e5e2dc);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #23201b);
  font-size: 12px;
  cursor: pointer;
}
.guide-btn:hover {
  border-color: #b8ddd8;
  color: #1f6f64;
}
.guide-extra {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.guide-block {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--muted, #6f6b63);
}
.guide-block strong {
  color: var(--ink, #23201b);
  font-size: 12px;
}

/* AI 完善区：卡片底部小对话 */
.detail-chat-section {
  flex-shrink: 0;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line, #e5e2dc);
  display: grid;
  gap: 8px;
}
.detail-chat-head {
  font-size: 12px;
  color: var(--muted, #6f6b63);
}
.detail-chat-log {
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}
.detail-chat-line {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 92%;
  white-space: pre-wrap;
  word-break: break-word;
}
.detail-chat-line.user {
  justify-self: end;
  background: #1f6f64;
  color: #fff;
  border-bottom-right-radius: 3px;
}
.detail-chat-line.assistant {
  justify-self: start;
  background: #f1efe9;
  color: var(--ink, #23201b);
  border-bottom-left-radius: 3px;
}
.detail-chat-form {
  display: flex;
  gap: 8px;
}
.detail-chat-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line, #e5e2dc);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  color: var(--ink, #23201b);
}
.detail-chat-input:focus {
  outline: none;
  border-color: #1f6f64;
}
.detail-chat-send {
  padding: 0 16px;
  border: 1px solid #1f6f64;
  border-radius: 10px;
  background: #1f6f64;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}
.detail-chat-send:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Plan D：degraded 兜底回复的柔和提示，不渲染为错误卡片 */
.message.assistant.is-degraded {
  border-left: 3px solid #d8a64e;
}
.message.assistant.is-degraded::after {
  content: "⚠ 服务压力较大，本次回复为兜底内容";
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #a97d2f;
}

/* 路线板块：清单里交通行单独成节 */
.route-board {
  margin: 4px 14px 12px;
  border: 1px solid #d8e4e0;
  border-left: 3px solid #1f6f64;
  border-radius: 10px;
  overflow: hidden;
  background: #fbfdfc;
}
.route-board-head {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #1f6f64;
  background: #eef5f3;
}
.route-board .itinerary-table tr[data-title] {
  cursor: pointer;
}
.route-board .itinerary-table tr[data-title]:hover {
  background: #eef5f3;
}

/* P0 Ground Truth: Map Natural Language Search Bar */
.map-canvas {
  position: relative;
}

.map-search-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1000;
  width: 320px;
  max-width: calc(100% - 28px);
  background: #ffffff;
  border: 1px solid var(--line, #e2dacd);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  font-family: inherit;
}

.map-search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 8px;
}

.map-search-icon {
  color: var(--muted, #8c8273);
  flex-shrink: 0;
}

#mapPlaceSearchInput {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink, #23201b);
  outline: none;
  padding: 0;
}

#mapPlaceSearchInput::placeholder {
  color: var(--muted, #a89f91);
}

.map-search-clear {
  border: none;
  background: none;
  font-size: 16px;
  line-height: 1;
  color: var(--muted, #8c8273);
  cursor: pointer;
  padding: 0 4px;
}

.map-search-results {
  border-top: 1px solid var(--line, #e2dacd);
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border-radius: 0 0 12px 12px;
}

.map-search-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f2ece4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.15s ease;
}

.map-search-item:last-child {
  border-bottom: none;
}

.map-search-item:hover {
  background: #f7f3ec;
}

.map-search-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-search-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #23201b);
}

.map-search-item-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 600;
}

.map-search-item-badge.candidate {
  background: #fff3e0;
  color: #e65100;
}

.map-search-item-desc {
  font-size: 11px;
  color: var(--muted, #8c8273);
}

/* Candidate marker style */
.marker-unverified-tag {
  position: absolute;
  top: -8px;
  right: -6px;
  background: #f57c00;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

.marker-unverified-tag.approximate {
  background: #ad6b22;
}

.map-tooltip-unverified {
  max-width: 190px;
}

.map-tooltip-unverified {
  display: inline-block;
  margin-top: 4px;
  color: #e65100;
  font-weight: 600;
  font-size: 11px;
}

.preview-map-marker {
  animation: markerPulse 1.5s infinite alternate;
}

@keyframes markerPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

/* Card Research Rich Enrichment Sections */
.card-synthesis-block,
.card-practical-tips-block,
.card-review-summary-block,
.card-guides-block,
.card-limitations-block,
.card-sources-evaluated-block {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fafaf8;
  border: 1px solid var(--line, #e2ded4);
}

.card-synthesis-heading,
.card-tips-heading,
.card-review-heading,
.card-guides-heading,
.card-limitations-heading,
.card-sources-evaluated-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink, #23201b);
}

.card-synthesis-heading small,
.card-tips-heading small,
.card-review-heading small,
.card-guides-heading small,
.card-sources-evaluated-heading small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted, #8c8273);
}

.card-synthesis-text,
.card-review-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #333;
}

.card-tips-list,
.card-limitations-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
}

.card-tips-list li + li,
.card-limitations-list li + li {
  margin-top: 4px;
}

.card-guide-item {
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #eee;
  margin-bottom: 6px;
}

.card-guide-item:last-child {
  margin-bottom: 0;
}

.card-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}

.card-guide-quote {
  margin: 4px 0;
  font-size: 11px;
  color: #555;
  font-style: italic;
}

.card-guide-footer {
  text-align: right;
}

.guide-source-link,
.source-eval-link {
  font-size: 11px;
  color: var(--teal-dark, #006666);
  text-decoration: none;
  font-weight: 600;
}

.guide-source-link:hover,
.source-eval-link:hover {
  text-decoration: underline;
}

.card-sources-evaluated-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-source-eval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.badge-source-official {
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-source-guide {
  background: #e3f2fd;
  color: #1565c0;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-entity-match {
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
}

.badge-entity-mismatch {
  background: #ffebee;
  color: #c62828;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
}
