/* -------------------------------------------------------------------------
   v44 production port: compact three-zone workbench
   ------------------------------------------------------------------------- */

:root {
  --mw-list-zone: #ece3d5;
  --mw-context-zone: #f4ede2;
  --mw-globe-zone: #e2e7e1;
  --mw-plum: #744e59;
  --mw-brass: #664909;
  --mw-brass-wash: #eee2c9;
  --mw-violet-wash-solid: #e9e0ef;
  --mw-violet-selected: #dfd2eb;
  --mw-sweet-wash: #eadde1;
  --mw-sweet-selected: #e2d0d6;
}

/* -------------------------------------------------------------------------
   v51 production port: stable globe, temporary trip annotations
   ------------------------------------------------------------------------- */

.mw-main {
  position: relative;
}

.mw-globe-routes {
  position: absolute;
  z-index: 8;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(42, 36, 25, .24);
  background: rgba(253, 251, 246, .93);
  box-shadow: 0 14px 34px rgba(42, 36, 25, .13);
  backdrop-filter: blur(10px);
}

.mw-globe-routes[hidden] {
  display: none;
}

.mw-globe-routes button {
  display: grid;
  min-width: 0;
  min-height: 72px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 9px;
  align-content: center;
  padding: 9px 12px;
  border: 0;
  border-right: 1px solid var(--mw-rule);
  background: transparent;
  color: var(--mw-ink);
  text-align: left;
  cursor: pointer;
}

.mw-globe-routes button:last-child {
  border-right: 0;
}

.mw-globe-routes button:hover,
.mw-globe-routes button:focus-visible,
.mw-globe-routes button[aria-current="true"] {
  background: var(--mw-violet-wash-solid);
}

.mw-globe-routes button:focus-visible {
  outline: 2px solid var(--mw-violet-deep);
  outline-offset: -3px;
}

.mw-globe-routes strong {
  overflow: hidden;
  font: 500 17px/1.05 var(--mw-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-globe-routes button > span {
  display: grid;
  justify-items: end;
  color: var(--mw-ink);
  font: 600 9.5px/1.2 var(--mw-mono);
}

.mw-globe-routes .mw-fare-basis,
.mw-globe-routes .mw-fare-taxes {
  font-size: 8.5px;
  font-weight: 400;
}

.mw-globe-routes small {
  grid-column: 1 / -1;
  color: var(--mw-muted);
  font: 10px/1.25 var(--mw-sans);
}

.mw-amelia-brief {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 9px;
  padding: 9px 0 10px;
  border-top: 1px solid var(--mw-ink);
  border-bottom: 1px solid var(--mw-rule);
}

.mw-amelia-brief > div {
  display: flex;
  gap: 7px;
  align-items: center;
}

.mw-amelia-brief > div > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(101, 66, 179, .45);
  border-radius: 50%;
  color: var(--mw-violet-deep);
  font: 500 12px var(--mw-serif);
}

.mw-amelia-brief strong {
  font-size: 11px;
}

.mw-amelia-brief p {
  margin: 0;
  color: var(--mw-muted);
  font-size: 11px;
  line-height: 1.42;
}

.mw-plan-trust {
  margin: 9px 0 0;
  color: var(--mw-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.mw-shell {
  grid-template-rows: 56px minmax(0, 1fr);
}

.mw-header {
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 0;
  padding: 0 24px;
  background: var(--mw-paper);
  backdrop-filter: none;
}

.mw-brand {
  padding-right: 24px;
  font-size: 19px;
}

.mw-nav {
  gap: 22px;
  padding-left: 24px;
}

.mw-nav button {
  min-width: 0;
  padding: 0;
  font-size: 13px;
}

.mw-nav button::after {
  right: 0;
  left: 0;
}

.mw-account {
  min-height: 40px;
  padding-left: 24px;
}

.mw-main {
  grid-template-columns: 430px minmax(0, 1fr);
  overflow: hidden;
}

.mw-content {
  overflow: auto;
  background: var(--mw-list-zone);
}

.mw-globe {
  background: var(--mw-globe-zone);
}

.mw-globe-caption {
  top: 14px;
  left: 16px;
  max-width: min(270px, 64%);
  padding: 7px 9px;
  background: rgba(244, 237, 226, .88);
  backdrop-filter: blur(8px);
}

.mw-globe-caption strong {
  font-size: 22px;
}

.mw-globe-caption span {
  margin-top: 3px;
  font-size: 10.5px;
  line-height: 1.35;
}

.mw-inspector {
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--mw-rule);
  background: var(--mw-context-zone);
}

.mw-inspector[hidden] {
  display: none;
}

.mw-inspector-scroll,
.mw-plan-amelia {
  height: 100%;
  box-sizing: border-box;
  padding: 15px 16px 14px;
  overflow: auto;
}

.mw-inspector-empty {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 28px;
  box-sizing: border-box;
  color: var(--mw-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.mw-inspector-close {
  display: none;
}

.mw-inspector-label {
  margin: 0 0 4px;
  color: var(--mw-muted);
  font-size: 11px;
}

.mw-inspector h2 {
  margin: 0;
  font: 400 28px/.98 var(--mw-serif);
  letter-spacing: -.025em;
}

.mw-inspector-route {
  margin: 4px 0 9px;
  color: var(--mw-muted);
  font: 11px/1.3 var(--mw-mono);
}

.mw-inspector-airport-note {
  margin: 0 0 9px;
  padding: 7px 8px;
  border: 1px solid color-mix(in srgb, var(--mw-amber, #b7791f) 36%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--mw-amber, #b7791f) 9%, transparent);
  color: var(--mw-ink);
  font-size: 10.5px;
  line-height: 1.38;
}

.mw-inspector-fare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: start;
  padding: 7px 0;
  border-top: 1px solid var(--mw-rule);
  border-bottom: 1px solid var(--mw-rule);
}

.mw-inspector-fare .mw-fare-line,
.mw-inspector-fare .mw-fare-basis {
  grid-column: 1;
}

.mw-inspector-fare .mw-fare-line {
  font: 600 12px/1.3 var(--mw-mono);
}

.mw-inspector-signal {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  font-size: 11.5px;
  font-weight: 650;
}

.mw-signal-gold { color: var(--mw-brass); }
.mw-signal-outlier { color: var(--mw-violet-deep); }
.mw-signal-sweet { color: var(--mw-plum); }
.mw-signal-worth { color: var(--mw-muted); }
.mw-signal-verified { color: var(--trust-ok-deep, #315f4a); }
.mw-signal-overcap,
.mw-signal-ideas { color: var(--error, #b4453a); }

.mw-inspector-warning,
.mw-inspector-confirmed,
.mw-inspector-freshness {
  margin: 7px 0 0;
  padding: 7px 8px;
  border: 1px solid var(--mw-rule);
  font-size: 10.5px;
  line-height: 1.4;
}

.mw-inspector-warning {
  border-color: color-mix(in srgb, var(--error, #b4453a) 34%, transparent);
  background: color-mix(in srgb, var(--error, #b4453a) 8%, transparent);
  color: var(--error, #b4453a);
}

.mw-inspector-confirmed {
  border-color: var(--trust-ok-bd, rgba(49, 95, 74, .28));
  background: var(--trust-ok-bg, rgba(49, 95, 74, .08));
  color: var(--trust-ok-deep, #315f4a);
}

.mw-inspector-freshness {
  color: var(--mw-muted);
}

.mw-itinerary {
  display: grid;
  gap: 7px;
  padding: 8px 0;
}

.mw-itin-leg {
  padding: 7px 8px;
  border: 1px solid var(--mw-rule);
  background: rgba(255, 250, 241, .48);
}

.mw-itin-leg-head,
.mw-itin-path {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.mw-itin-leg-head {
  color: var(--mw-muted);
  font-size: 10.5px;
}

.mw-itin-leg-head strong {
  color: var(--mw-ink);
  font-weight: 600;
}

.mw-itin-path {
  align-items: baseline;
  margin-top: 3px;
}

.mw-itin-path b {
  min-width: 0;
  overflow: hidden;
  font: 600 11px/1.25 var(--mw-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-itin-path span,
.mw-itin-leg p,
.mw-itin-leg-fare {
  color: var(--mw-muted);
  font-size: 10.5px;
}

.mw-itin-path span {
  flex: 0 0 auto;
}

.mw-itin-leg p {
  margin: 4px 0 0;
  line-height: 1.3;
}

.mw-itin-leg-fare {
  display: block;
  margin-top: 3px;
  font-family: var(--mw-mono);
}

.mw-trip-facts {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  border-top: 1px solid var(--mw-rule);
}

.mw-trip-facts > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--mw-rule);
}

.mw-trip-facts dt {
  color: var(--mw-muted);
  font-size: 10.5px;
}

.mw-trip-facts dd {
  margin: 0;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.35;
}

.mw-inspector-trust {
  margin: 8px 0;
  color: var(--mw-muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.mw-inspector-actions {
  display: grid;
  gap: 6px;
}

.mw-inspector .mw-button {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  font-size: 11px;
}

.mw-plan-amelia {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mw-plan-amelia > p:not(.mw-inspector-label):not(.mw-inspector-trust) {
  margin: 9px 0 12px;
  color: var(--mw-muted);
  font-size: 12px;
  line-height: 1.45;
}

.mw-amelia-orbit {
  position: relative;
  width: 34px;
  height: 34px;
  margin-bottom: 15px;
  border: 1px solid rgba(101, 66, 179, .38);
  border-radius: 50%;
}

.mw-amelia-orbit::before,
.mw-amelia-orbit span {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.mw-amelia-orbit::before {
  inset: 8px;
  background: var(--mw-violet);
}

.mw-amelia-orbit span {
  top: 1px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: var(--mw-brass);
}

.mw-shell[data-view="explore"] .mw-content,
.mw-shell[data-view="plan"] .mw-content {
  overflow: hidden;
}

.mw-explore,
.mw-plan-view {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: 48px minmax(0, 1fr);
}

.mw-explore > .mw-pilot-note,
.mw-plan-view > .mw-pilot-note {
  display: none;
}

.mw-opening-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  height: 48px;
  min-height: 0;
  box-sizing: border-box;
  align-items: center;
  padding: 5px 12px;
}

.mw-opening-compact > div {
  min-width: 0;
}

.mw-opening-compact h1 {
  overflow: hidden;
  font-size: 22px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-opening-compact > div > p,
.mw-opening-compact > p:not(.mw-kicker) {
  overflow: hidden;
  margin: 2px 0 0;
  font-size: 10.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-sweep-stamp {
  max-width: 150px !important;
  text-align: right;
}

.mw-sweep-stamp span {
  display: block;
}

.mw-explore > .mw-section {
  display: grid;
  min-height: 0;
  grid-template-rows: 34px 32px minmax(0, 1fr) auto;
  padding: 8px 12px 10px;
  overflow: hidden;
}

.mw-explore .mw-mode,
.mw-explore .mw-filters {
  margin: 0;
}

.mw-explore .mw-mode {
  justify-self: start;
}

.mw-explore .mw-filters {
  align-self: end;
  border-right: 0;
  border-left: 0;
}

.mw-explore .mw-mode button,
.mw-explore .mw-filters button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 10.5px;
}

.mw-explore .mw-ledger {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--mw-ink);
}

.mw-explore .mw-row {
  min-height: 65px;
  box-sizing: border-box;
  grid-template-columns: 23px minmax(0, 1fr) minmax(122px, .78fr);
  gap: 8px;
  padding: 6px 8px;
  transition: background-color 130ms ease, box-shadow 130ms ease;
}

.mw-explore .mw-row[data-signal="outlier"] { background: var(--mw-violet-wash-solid); }
.mw-explore .mw-row[data-signal="gold"] { background: var(--mw-brass-wash); }
.mw-explore .mw-row[data-signal="sweet"] { background: var(--mw-sweet-wash); }
.mw-explore .mw-row[data-signal="worth"] { background: rgba(255, 250, 241, .30); }
.mw-explore .mw-row[data-signal="outlier"][aria-current="true"] { background: var(--mw-violet-selected); }
.mw-explore .mw-row[data-signal="gold"][aria-current="true"] { background: #e6d5b3; }
.mw-explore .mw-row[data-signal="sweet"][aria-current="true"] { background: var(--mw-sweet-selected); }

.mw-explore .mw-row:hover,
.mw-explore .mw-row:focus-visible {
  box-shadow: inset 2px 0 var(--mw-ink);
}

.mw-explore .mw-row[aria-current="true"] {
  box-shadow: inset 3px 0 var(--mw-violet-deep);
}

.mw-explore .mw-row[data-signal="gold"][aria-current="true"] {
  box-shadow: inset 3px 0 var(--mw-brass);
}

.mw-explore .mw-row[data-signal="sweet"][aria-current="true"] {
  box-shadow: inset 3px 0 var(--mw-plum);
}

.mw-state-sweet {
  color: var(--mw-plum);
}

.mw-explore .mw-row-number {
  font-size: 9.5px;
}

.mw-explore .mw-row strong {
  font-size: 17px;
}

.mw-explore .mw-row small {
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.2;
}

.mw-explore .mw-row-read {
  font-size: 10.5px;
}

.mw-explore .mw-row-read b {
  font-size: 10.5px;
  line-height: 1.25;
}

.mw-explore .mw-actions {
  margin-top: 8px;
}

.mw-explore .mw-actions .mw-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 10.5px;
}

.mw-plan {
  min-height: 0;
  padding: 10px 12px;
  overflow: auto;
}

.mw-plan .mw-form {
  gap: 8px;
}

.mw-plan .mw-field {
  gap: 4px;
}

.mw-plan .mw-field > span {
  font-size: 10.5px;
}

.mw-plan .mw-field input,
.mw-plan .mw-field select,
.mw-plan .mw-field textarea {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 11.5px;
}

.mw-plan .mw-field textarea {
  min-height: 64px;
  height: 64px;
}

.mw-plan .mw-form-grid {
  gap: 7px 8px;
}

.mw-plan .mw-pay button {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 10.5px;
}

.mw-plan .mw-actions {
  gap: 6px;
  margin-top: 1px;
}

.mw-plan .mw-button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 10.5px;
}

.mw-plan .mw-feedback {
  min-height: 14px;
  margin: 0;
  font-size: 10.5px;
}

.mw-plan .mw-field-note {
  margin: 0;
  color: var(--mw-plum);
  font-size: 10.5px;
  line-height: 1.35;
}

.mw-plan .mw-candidate-section {
  margin-top: 10px;
  padding-top: 10px;
}

.mw-plan .mw-candidate-section h2 {
  font-size: 21px;
}

.mw-plan .mw-candidate {
  padding: 7px 0;
}

.mw-plan .mw-candidate p,
.mw-plan .mw-candidate .mw-data {
  font-size: 10.5px;
}

.mw-active .mw-globe .tp.open {
  z-index: 12;
  top: 12px;
  left: 12px;
  width: min(384px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100% - 24px);
}

.mw-active .mw-globe .tp.open + .mw-globe-caption,
.mw-active .mw-globe:has(.tp.open) .mw-globe-caption {
  opacity: 0;
}

.mw-opening:not(.mw-opening-compact) {
  padding: 22px 24px 17px;
}

.mw-opening:not(.mw-opening-compact) h1 {
  font-size: clamp(38px, 4vw, 56px);
}

.mw-section {
  padding: 18px 24px;
}

.mw-section h2,
.mw-section h3 {
  font-size: clamp(25px, 2.3vw, 34px);
}

.mw-amelia-read {
  margin: 16px 24px 0;
}

.mw-row {
  min-height: 62px;
}

.mw-pilot-note {
  padding: 14px 24px;
}

@media (max-width: 1100px) and (min-width: 701px) {
  .mw-header {
    grid-template-columns: 180px minmax(0, 1fr) auto;
    padding-inline: 18px;
  }

  .mw-nav {
    gap: 15px;
    padding-left: 18px;
  }

  .mw-explore .mw-row {
    grid-template-columns: 20px minmax(0, 1fr) 112px;
  }
}

@media (max-width: 700px) {
  .mw-shell {
    grid-template-rows: 86px minmax(0, 1fr);
  }

  .mw-header {
    display: grid;
    height: 86px;
    min-height: 86px;
    grid-template-columns: 1fr auto;
    grid-template-rows: 43px 43px;
    padding: env(safe-area-inset-top) 12px 0;
  }

  .mw-brand {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
    font-size: 17px;
  }

  .mw-account {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }

  .mw-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    overflow: visible;
  }

  .mw-nav button {
    flex: 1 1 20%;
    min-width: 0;
    padding: 0 4px;
    font-size: 10.5px;
  }

  .mw-nav button::after {
    right: 4px;
    left: 4px;
  }

  .mw-main,
  .mw-shell[data-view="explore"] .mw-main,
  .mw-shell[data-view="plan"] .mw-main {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .mw-content {
    flex: 0 0 auto;
    order: 1;
    overflow: visible !important;
    border-right: 0;
  }

  .mw-globe {
    flex: 0 0 260px;
    order: 2;
    min-height: 260px;
    border-top: 1px solid var(--mw-rule);
  }

  .mw-inspector {
    flex: 0 0 auto;
    order: 3;
    border-top: 1px solid var(--mw-rule);
    border-left: 0;
  }

  .mw-shell[data-view="explore"] .mw-inspector {
    display: none;
  }

  .mw-shell[data-view="explore"][data-detail-open="true"] .mw-inspector {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: min(58dvh, 490px);
    border-top: 1px solid var(--mw-ink);
    background: var(--mw-raised);
    box-shadow: 0 -18px 44px rgba(42, 36, 25, .18);
  }

  .mw-inspector-scroll,
  .mw-plan-amelia {
    height: auto;
    max-height: 100%;
    padding: 13px 16px calc(15px + env(safe-area-inset-bottom));
  }

  .mw-inspector-close {
    display: block;
    float: right;
    min-height: 32px;
    border: 0;
    background: transparent;
    color: var(--mw-muted);
    cursor: pointer;
    font: 600 11px var(--mw-sans);
  }

  .mw-opening-compact {
    height: 48px;
    padding-inline: 12px;
  }

  .mw-opening-compact h1 {
    font-size: 20px;
  }

  .mw-opening-compact > div > p {
    max-width: 220px;
  }

  .mw-sweep-stamp {
    max-width: 112px !important;
    font-size: 9.5px !important;
  }

  .mw-explore > .mw-section {
    grid-template-rows: 34px 32px auto auto;
    padding-inline: 10px;
  }

  .mw-explore .mw-row {
    min-height: 64px;
    grid-template-columns: 19px minmax(0, 1fr) 108px;
    gap: 7px;
    padding-inline: 6px;
  }

  .mw-explore .mw-ledger:not(.is-expanded) > .mw-row:nth-child(4) {
    display: grid;
  }

  .mw-explore .mw-ledger:not(.is-expanded) > .mw-row:nth-child(n+5) {
    display: none;
  }

  .mw-explore .mw-row strong {
    font-size: 16px;
  }

  .mw-explore .mw-row small:nth-of-type(2) {
    display: none;
  }

  .mw-explore .mw-actions {
    display: none;
  }

  .mw-plan {
    padding: 10px 12px;
  }

  .mw-plan .mw-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mw-plan .mw-actions {
    grid-template-columns: 1fr 1fr;
  }

  .mw-plan .mw-actions .mw-button:last-child {
    display: none;
  }

  .mw-plan-amelia {
    min-height: 260px;
  }

  .mw-active .mw-globe .tp.open {
    position: fixed;
    z-index: 100;
    top: calc(94px + env(safe-area-inset-top));
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: none;
  }

  .mw-opening:not(.mw-opening-compact) {
    padding: 16px 18px 13px;
  }

  .mw-opening:not(.mw-opening-compact) h1 {
    font-size: 34px;
  }

  .mw-section {
    padding: 14px 18px;
  }

  .mw-pilot-note {
    padding-inline: 18px;
  }
}

/* The final v51 spatial contract: one stable globe and a temporary annotation. */
@keyframes mw-detail-slide {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes mw-detail-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .mw-shell[data-view="explore"] .mw-main {
    grid-template-columns: clamp(380px, 33.333vw, 480px) minmax(0, 1fr);
  }

  .mw-shell[data-view="plan"] .mw-main {
    grid-template-columns: clamp(360px, 33.333vw, 480px) minmax(0, 1fr);
  }

  .mw-shell[data-view="explore"] .mw-inspector,
  .mw-shell[data-view="plan"] .mw-inspector {
    position: absolute;
    z-index: 30;
    top: 0;
    right: 0;
    bottom: 0;
    width: clamp(360px, 30vw, 440px);
    border-left: 1px solid var(--mw-ink);
    background: rgba(253, 251, 246, .97);
    box-shadow: -18px 0 44px rgba(42, 36, 25, .16);
    backdrop-filter: blur(12px);
    animation: mw-detail-slide 180ms cubic-bezier(.2, .75, .3, 1) both;
  }

  .mw-shell[data-view="plan"] .mw-inspector {
    width: clamp(350px, 29vw, 430px);
  }

  .mw-inspector-close {
    display: block;
    position: sticky;
    z-index: 2;
    top: -7px;
    float: right;
    min-width: 44px;
    min-height: 44px;
    margin: -7px -7px 2px 8px;
    border: 0;
    background: rgba(253, 251, 246, .96);
    color: var(--mw-muted);
    cursor: pointer;
    font: 600 11px var(--mw-sans);
  }
}

@media (max-width: 899px) {
  .mw-main,
  .mw-shell[data-view="explore"] .mw-main,
  .mw-shell[data-view="plan"] .mw-main {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .mw-content {
    flex: 0 0 auto;
    order: 1;
    overflow: visible !important;
    border-right: 0;
  }

  .mw-globe {
    flex: 0 0 340px;
    order: 2;
    min-height: 340px;
    border-top: 1px solid var(--mw-rule);
  }

  .mw-shell[data-view="explore"] .mw-inspector,
  .mw-shell[data-view="plan"] .mw-inspector {
    display: none;
    border-left: 0;
  }

  .mw-shell[data-view="explore"][data-detail-open="true"] .mw-inspector,
  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-inspector {
    position: fixed;
    z-index: 120;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: auto;
    height: min(52dvh, 460px);
    max-height: 56dvh;
    border-top: 1px solid var(--mw-ink);
    border-left: 0;
    background: var(--mw-raised);
    box-shadow: 0 -18px 44px rgba(42, 36, 25, .20);
    animation: mw-detail-rise 180ms cubic-bezier(.2, .75, .3, 1) both;
  }

  .mw-detail-open .mw-main {
    overflow: hidden;
  }

  .mw-inspector-scroll {
    height: 100%;
    max-height: 100%;
    overscroll-behavior: contain;
  }

  .mw-inspector-close {
    display: block;
    position: sticky;
    z-index: 2;
    top: -7px;
    float: right;
    min-width: 44px;
    min-height: 44px;
    margin: -7px -7px 2px 8px;
    border: 0;
    background: rgba(253, 251, 246, .97);
    color: var(--mw-muted);
    cursor: pointer;
    font: 600 11px var(--mw-sans);
  }
}

@media (max-width: 700px) {
  .mw-shell[data-view="plan"] .mw-globe {
    flex-basis: 280px;
    min-height: 280px;
  }

  .mw-shell[data-view="explore"] .mw-globe {
    flex-basis: 260px;
    min-height: 260px;
  }

  .mw-shell[data-view="explore"][data-detail-open="true"] .mw-inspector,
  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-inspector {
    height: min(46dvh, 390px);
    max-height: 52dvh;
  }

  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-inspector {
    height: min(45dvh, 380px);
    max-height: 50dvh;
  }

  .mw-globe-routes {
    right: 8px;
    bottom: 8px;
    left: 8px;
    grid-template-columns: repeat(3, minmax(118px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .mw-globe-routes button {
    min-height: 68px;
    padding: 8px 9px;
    scroll-snap-align: start;
  }

  .mw-globe-routes strong {
    font-size: 15px;
  }

  .mw-amelia-brief {
    grid-template-columns: 76px minmax(0, 1fr);
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mw-shell[data-detail-open="true"] .mw-inspector {
    animation-duration: 1ms;
  }
}

/* -------------------------------------------------------------------------
   v365: Amelia is a persistent desk agent, not a floating AI widget.
   One route-mark launcher opens the existing conversation in a roomy drawer.
   ------------------------------------------------------------------------- */

.mw-header {
  grid-template-columns: 220px minmax(0, 1fr) auto auto;
}

.mw-ask-amelia {
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid var(--mw-rule);
  background: transparent;
  color: var(--mw-ink);
  cursor: pointer;
  font: 600 12.5px/1 var(--mw-sans);
  white-space: nowrap;
}

.mw-ask-amelia:hover,
.mw-ask-amelia:focus-visible,
.mw-ask-amelia[aria-expanded="true"] {
  background: var(--mw-violet-wash-solid);
}

.mw-ask-amelia:focus-visible {
  outline: 2px solid var(--mw-violet-deep);
  outline-offset: -2px;
}

.mw-account {
  padding-left: 16px;
}

.mw-amelia-route {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 15px;
  flex: 0 0 25px;
}

.mw-amelia-route > span {
  position: absolute;
  top: 4px;
  right: 4px;
  left: 4px;
  height: 8px;
  border-top: 1.5px solid var(--mw-violet-deep);
  border-radius: 50% 50% 0 0;
  transform: rotate(-7deg);
  transform-origin: center;
}

.mw-amelia-route::before,
.mw-amelia-route::after {
  position: absolute;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
}

.mw-amelia-route::before {
  bottom: 1px;
  left: 0;
  box-sizing: border-box;
  border: 1.5px solid var(--mw-brass);
  background: var(--mw-paper);
}

.mw-amelia-route::after {
  top: 0;
  right: 0;
  background: var(--mw-violet-deep);
}

.mw-amelia-composer {
  margin-bottom: 10px;
  padding: 11px 12px 10px;
  border-top: 1px solid var(--mw-ink);
  border-right: 1px solid var(--mw-rule);
  border-bottom: 1px solid var(--mw-rule);
  border-left: 2px solid var(--mw-violet-deep);
  background: var(--mw-raised);
  box-shadow: 0 8px 22px rgba(42, 36, 25, .07);
}

.mw-amelia-composer-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.mw-amelia-composer-head > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.mw-amelia-composer-head strong {
  color: var(--mw-ink);
  font: 600 12px/1.2 var(--mw-sans);
}

.mw-amelia-composer-head div > span {
  overflow: hidden;
  color: var(--mw-muted);
  font: 12px/1.25 var(--mw-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-plan .mw-ask-field {
  display: block;
}

.mw-plan .mw-ask-field textarea {
  width: 100%;
  height: 112px;
  min-height: 112px;
  max-height: 170px;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid rgba(42, 36, 25, .28);
  border-radius: 0;
  background: var(--mw-paper);
  color: var(--mw-ink);
  font: 15px/1.48 var(--mw-sans);
  resize: vertical;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.mw-plan .mw-ask-field textarea::placeholder {
  color: var(--mw-muted);
  font-style: normal;
  opacity: .78;
}

.mw-plan .mw-ask-field textarea:focus {
  outline: 0;
  border-color: var(--mw-violet-deep);
  box-shadow: 0 0 0 2px rgba(101, 66, 179, .13);
}

.mw-amelia-composer-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 9px;
}

.mw-amelia-composer .mw-amelia-brief {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--mw-muted);
  font: 12px/1.42 var(--mw-sans);
}

.mw-amelia-composer .mw-amelia-brief strong {
  color: var(--mw-ink);
  font-weight: 650;
}

.mw-plan .mw-ask-primary {
  min-width: 118px;
  min-height: 44px;
  padding: 9px 14px;
  font-size: 12px;
}

.mw-example-link {
  margin: 4px 0 -2px;
  padding: 5px 0 0;
  border: 0;
  background: transparent;
  color: var(--mw-muted);
  cursor: pointer;
  font: 11.5px/1.35 var(--mw-sans);
  text-align: left;
}

.mw-example-link:hover,
.mw-example-link:focus-visible {
  color: var(--mw-violet-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mw-plan .mw-actions {
  grid-template-columns: minmax(0, 1fr);
}

.mw-plan .mw-actions .mw-button:last-child {
  display: inline-flex;
}

@keyframes mw-amelia-drawer-in {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes mw-amelia-sheet-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.mw-amelia-layer {
  position: fixed;
  z-index: 1750;
  inset: 0;
  pointer-events: none;
}

.mw-amelia-layer[hidden] {
  display: none;
}

.mw-amelia-scrim {
  display: none;
}

.mw-amelia-drawer {
  position: absolute;
  top: 68px;
  right: 12px;
  bottom: 12px;
  width: clamp(440px, 38vw, 540px);
  overflow: hidden;
  border: 1px solid rgba(42, 36, 25, .28);
  background: var(--mw-raised);
  box-shadow: 0 24px 64px rgba(42, 36, 25, .23);
  pointer-events: auto;
  animation: mw-amelia-drawer-in 190ms cubic-bezier(.2, .75, .3, 1) both;
}

.mw-amelia-host {
  width: 100%;
  height: 100%;
}

body.mw-active .mw-amelia-host .tp {
  position: static;
  display: flex;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: var(--mw-raised);
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}

body.mw-active .mw-amelia-host .tp-head {
  min-height: 56px;
  padding: 8px 14px;
  background: var(--mw-paper);
}

body.mw-active .mw-amelia-host .tp .tp-title {
  display: block;
  font-size: 19px;
}

body.mw-active .mw-amelia-host .tp .tp-toggle {
  display: none;
}

body.mw-active .mw-amelia-host .tp .tp-new {
  min-height: 38px;
}

body.mw-active .mw-amelia-host .tp .tp-x {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  font-size: 22px;
}

body.mw-active .mw-amelia-host .tp-thread {
  padding: 18px 18px 20px;
  gap: 14px;
}

body.mw-active .mw-amelia-host .tp-composer {
  align-items: end;
  padding: 12px 14px 14px;
  background: var(--mw-paper);
}

body.mw-active .mw-amelia-host .tp-composer #tpInput {
  min-height: 58px;
  max-height: 112px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.42;
}

body.mw-active .mw-amelia-host .tp-composer .tp-send {
  width: 44px;
  height: 44px;
}

@media (max-width: 1100px) and (min-width: 701px) {
  .mw-header {
    grid-template-columns: 180px minmax(0, 1fr) auto auto;
  }

  .mw-ask-amelia {
    margin-left: 10px;
    padding-inline: 12px;
  }
}

@media (max-width: 899px) {
  .mw-amelia-layer {
    pointer-events: auto;
  }

  .mw-amelia-scrim {
    position: absolute;
    display: block;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(42, 36, 25, .28);
  }

  .mw-amelia-drawer {
    top: auto;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    width: auto;
    height: min(72dvh, 640px);
    border-radius: 16px;
    animation-name: mw-amelia-sheet-in;
  }

  body.mw-active .mw-amelia-host .tp-head {
    position: sticky;
    z-index: 3;
    top: 0;
  }

  body.mw-active .mw-amelia-host .tp-composer {
    position: sticky;
    z-index: 3;
    bottom: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 700px) {
  .mw-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .mw-ask-amelia {
    grid-column: 2;
    grid-row: 1;
    min-height: 43px;
    margin: 0;
    padding: 0 11px;
    border-left: 0;
  }

  .mw-account {
    grid-column: 3;
  }

  .mw-plan .mw-ask-field textarea {
    height: 104px;
    min-height: 104px;
    font-size: 16px;
  }

  .mw-amelia-composer-foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .mw-plan .mw-ask-primary {
    width: 100%;
  }

  .mw-plan .mw-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 340px) {
  .mw-ask-amelia {
    width: 44px;
    padding: 0 9px;
  }

  .mw-ask-amelia > span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mw-amelia-drawer {
    animation-duration: 1ms;
  }
}

/* -------------------------------------------------------------------------
   v367: Explore is a conversation, not a trip-intake form
   ------------------------------------------------------------------------- */

.mw-amelia-inline {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-top: 1px solid var(--mw-rule);
  background: var(--mw-raised);
}

.mw-amelia-inline-host {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body.mw-active .mw-amelia-inline-host .tp {
  position: static;
  display: flex;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--mw-raised);
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}

body.mw-active .mw-amelia-inline-host .tp-head {
  order: 0;
  min-height: 44px;
  box-sizing: border-box;
  padding: 7px 13px;
  border-bottom: 1px solid var(--mw-rule);
  background: var(--mw-paper);
}

body.mw-active .mw-amelia-inline-host .tp-title {
  display: block !important;
  font-size: 16px;
}

body.mw-active .mw-amelia-inline-host .tp-toggle,
body.mw-active .mw-amelia-inline-host .tp-x {
  display: none;
}

body.mw-active .mw-amelia-inline-host .tp-new {
  min-height: 34px;
  padding: 6px 2px 6px 10px;
  border: 0;
  border-left: 1px solid var(--mw-rule);
  border-radius: 0;
  color: var(--mw-muted);
  font: 600 10.5px/1.2 var(--mw-sans);
  letter-spacing: 0;
  white-space: nowrap;
}

body.mw-active .mw-amelia-inline-host .tp-asked {
  display: none !important;
}

body.mw-active .mw-amelia-inline-host .tp-composer {
  order: 1;
  align-items: end;
  padding: 12px 13px;
  border-top: 0;
  border-bottom: 1px solid rgba(101, 66, 179, .36);
  background: var(--mw-paper);
}

body.mw-active .mw-amelia-inline-host .tp-composer #tpInput {
  min-height: 72px;
  max-height: 124px;
  padding: 11px 12px;
  border: 1px solid rgba(42, 36, 25, .32);
  border-left: 2px solid var(--mw-violet-deep);
  border-radius: 0;
  background: var(--mw-raised);
  color: var(--mw-ink);
  font: 15px/1.45 var(--mw-sans);
}

body.mw-active .mw-amelia-inline-host .tp-composer #tpInput:focus {
  border-color: var(--mw-violet-deep);
  box-shadow: 0 0 0 2px rgba(101, 66, 179, .12);
}

body.mw-active .mw-amelia-inline-host .tp-composer .tp-send {
  width: 58px;
  height: 42px;
  border-radius: 0;
  background: var(--mw-violet-deep);
  color: #fff;
  font: 650 12px/1 var(--mw-sans);
}

body.mw-active .mw-amelia-inline-host .tp-summary {
  order: 2;
  padding: 8px 13px 0;
  background: var(--mw-raised);
}

body.mw-active .mw-amelia-inline-host .tp-refine {
  order: 3;
  padding: 8px 13px;
  background: var(--mw-raised);
}

body.mw-active .mw-amelia-inline-host .tp-thread {
  order: 4;
  min-height: 0;
  padding: 15px 14px 22px;
  gap: 14px;
  background: var(--mw-raised);
  overscroll-behavior: contain;
}

body.mw-active .mw-amelia-inline-host .tp-msg.user {
  align-self: flex-end;
  max-width: 92%;
  padding: 9px 11px;
  border-left: 2px solid var(--mw-violet-deep);
  border-radius: 0;
  background: var(--mw-violet-wash-solid);
  color: var(--mw-ink);
  font: 14px/1.45 var(--mw-sans);
}

body.mw-active .mw-amelia-inline-host .tp-bot,
body.mw-active .mw-amelia-inline-host .tp-verdict {
  color: var(--mw-ink);
  font-size: 14px;
  line-height: 1.58;
}

body.mw-active .mw-amelia-inline-host .tp-status {
  color: var(--mw-muted);
  font: 12px/1.4 var(--mw-sans);
  letter-spacing: 0;
}

.mw-amelia-inline-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 13px 8px;
  border-top: 1px solid var(--mw-rule);
  background: var(--mw-paper);
  color: var(--mw-muted);
  font: 10.5px/1.35 var(--mw-sans);
}

@media (min-width: 900px) {
  .mw-shell[data-view="plan"] .mw-main {
    grid-template-columns: clamp(430px, 40vw, 560px) minmax(0, 1fr);
  }
}

@media (max-width: 899px) {
  .mw-plan-chat-view {
    height: auto;
    min-height: 0;
  }

  .mw-amelia-inline {
    height: min(70dvh, 620px);
    min-height: 520px;
  }

  body.mw-active .mw-amelia-inline-host .tp-composer #tpInput {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .mw-amelia-inline {
    height: min(68dvh, 590px);
    min-height: 500px;
  }

  .mw-amelia-inline-note {
    display: grid;
    gap: 2px;
  }
}

/* -------------------------------------------------------------------------
   v376: retained member origins stay directly reachable without widening the
   NYC pilot. The selector is part of the workspace header, not the hidden
   legacy topbar, and receives an explicit row on small screens.
   ------------------------------------------------------------------------- */

.mw-header {
  grid-template-columns: 220px minmax(145px, 170px) minmax(0, 1fr) auto auto;
}

.mw-origin {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 2px;
  padding: 0 16px;
  border-left: 1px solid var(--mw-rule);
  color: var(--mw-muted);
  font: 600 9px/1 var(--mw-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mw-origin select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 2px 24px 2px 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: var(--mw-ink);
  cursor: pointer;
  font: 600 12px/1.2 var(--mw-sans);
  letter-spacing: 0;
  text-transform: none;
}

.mw-origin select:focus-visible {
  outline: 2px solid var(--mw-violet-deep);
  outline-offset: 2px;
}

.mw-nav {
  padding-left: 16px;
}

@media (max-width: 1100px) and (min-width: 701px) {
  .mw-header {
    grid-template-columns: 150px minmax(110px, 125px) minmax(0, 1fr) 44px auto;
  }

  .mw-brand {
    padding-right: 14px;
    font-size: 17px;
  }

  .mw-origin {
    padding-inline: 11px;
  }

  .mw-origin span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .mw-nav {
    gap: 10px;
    padding-left: 12px;
  }

  .mw-nav button {
    font-size: 11px;
  }

  .mw-ask-amelia {
    width: 44px;
    margin-left: 0;
    padding: 0 9px;
  }

  .mw-ask-amelia > span:last-child {
    display: none;
  }
}

@media (max-width: 700px) {
  .mw-shell {
    grid-template-rows: 124px minmax(0, 1fr);
  }

  .mw-header {
    box-sizing: border-box;
    height: 124px;
    min-height: 124px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 40px 39px 44px;
  }

  .mw-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .mw-ask-amelia {
    grid-column: 2;
    grid-row: 1;
    min-height: 40px;
  }

  .mw-account {
    grid-column: 3;
    grid-row: 1;
  }

  .mw-origin {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0;
    border-top: 1px solid var(--mw-rule);
    border-left: 0;
  }

  .mw-origin select {
    min-height: 36px;
  }

  .mw-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    padding-left: 0;
  }
}

/* -------------------------------------------------------------------------
   v368: one Amelia destination, editorial conversation, map-first receipts,
   and a clearer rounded composer
   ------------------------------------------------------------------------- */

.mw-ask-amelia[aria-current="page"] {
  background: var(--mw-violet-wash-solid);
  color: var(--mw-violet-deep);
}

.mw-globe-routes {
  grid-template-columns: repeat(var(--mw-route-count, 3), minmax(150px, 1fr));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.mw-amelia-inline {
  border-top: 0;
  background: transparent;
}

body.mw-active .mw-amelia-inline-host .tp {
  background: transparent;
}

body.mw-active .mw-amelia-inline-host .tp-head {
  min-height: 36px;
  justify-content: flex-end;
  padding: 4px 14px 0;
  border-bottom: 0;
  background: transparent;
}

body.mw-active .mw-amelia-inline-host .tp-title {
  display: none !important;
}

body.mw-active .mw-amelia-inline-host .tp-new {
  min-height: 30px;
  margin-left: auto;
  padding: 4px 0 4px 10px;
  border: 0;
  border-left: 0;
  background: transparent;
  color: var(--mw-muted);
  font-size: 10.5px;
}

body.mw-active .mw-amelia-inline-host .tp-new:hover,
body.mw-active .mw-amelia-inline-host .tp-new:focus-visible {
  color: var(--mw-violet-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.mw-active .mw-amelia-inline-host .tp-composer {
  gap: 10px;
  align-items: center;
  margin: 5px 14px 13px;
  padding: 7px 8px 7px 15px;
  border: 1px solid rgba(42, 36, 25, .28);
  border-radius: 18px;
  background: rgba(253, 251, 246, .86);
  box-shadow: 0 5px 18px rgba(42, 36, 25, .055);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

body.mw-active .mw-amelia-inline-host .tp-composer:focus-within {
  border-color: rgba(101, 66, 179, .78);
  background: var(--mw-raised);
  box-shadow: 0 0 0 3px rgba(101, 66, 179, .11), 0 8px 22px rgba(42, 36, 25, .07);
}

body.mw-active .mw-amelia-inline-host .tp-composer #tpInput {
  min-height: 58px;
  max-height: 116px;
  padding: 10px 5px 8px 1px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 15px;
  line-height: 1.45;
}

body.mw-active .mw-amelia-inline-host .tp-composer #tpInput:focus {
  outline: 0;
  box-shadow: none;
}

body.mw-active .mw-amelia-inline-host .tp-composer #tpInput:focus-visible {
  outline: 0;
}

body.mw-active .mw-amelia-inline-host .tp-composer .tp-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font: 600 20px/1 var(--mw-sans);
}

body.mw-active .mw-amelia-inline-host .tp-summary {
  padding: 9px 15px 0;
  background: transparent;
}

body.mw-active .mw-amelia-inline-host .tp-summary .ts-lbl {
  margin-right: 5px;
  color: var(--mw-muted);
  font-family: var(--mw-sans);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

body.mw-active .mw-amelia-inline-host .tp-refine {
  padding: 7px 15px 9px;
  border-top: 0;
  background: transparent;
}

body.mw-active .mw-amelia-inline-host .tp-thread {
  padding: 17px 16px 24px;
  gap: 17px;
  background: transparent;
}

body.mw-active .mw-amelia-inline-host .tp-msg.user {
  max-width: 80%;
  padding: 5px 11px 5px 16px;
  border: 0;
  border-right: 2px solid var(--mw-violet-deep);
  background: transparent;
  text-align: right;
}

body.mw-active .mw-amelia-inline-host .tp-bot,
body.mw-active .mw-amelia-inline-host .tp-verdict {
  max-width: 68ch;
}

body.mw-active .mw-amelia-inline-host .tp-answer-block-action {
  padding: 8px 0 8px 13px;
  border-left-width: 2px;
  background: transparent;
}

body.mw-active .mw-amelia-inline-host .tp-answer-block-action[data-label] {
  padding-top: 27px;
}

body.mw-active .mw-amelia-inline-host .tp-answer-block-action[data-label]::before {
  top: 8px;
  left: 13px;
}

body.mw-active .mw-amelia-inline-host .tp-stack {
  gap: 0;
  border-top: 1px solid var(--mw-rule);
  border-bottom: 1px solid var(--mw-rule);
}

body.mw-active .mw-amelia-inline-host .tp-stack .ticket {
  border-right: 0;
  border-bottom: 1px solid var(--mw-rule);
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

body.mw-active .mw-amelia-inline-host .tp-stack .ticket:last-child {
  border-bottom: 0;
}

body.mw-active .mw-amelia-inline-host .tp-stack-label {
  margin-top: 11px;
  color: var(--mw-ink);
  font-family: var(--mw-sans);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

@media (min-width: 900px) {
  .mw-shell[data-view="plan"] .mw-inspector {
    top: 14px;
    right: 14px;
    bottom: auto;
    width: clamp(286px, 24vw, 344px);
    max-height: calc(100% - 28px);
    border: 1px solid rgba(42, 36, 25, .34);
    background: rgba(253, 251, 246, .96);
    box-shadow: 0 16px 36px rgba(42, 36, 25, .16);
  }

  .mw-shell[data-view="plan"] .mw-inspector-scroll {
    max-height: calc(100vh - 120px);
    padding: 12px 13px 13px;
  }

  .mw-shell[data-view="plan"] .mw-inspector h2 {
    font-size: 31px;
  }
}

@media (max-width: 899px) {
  .mw-globe-routes {
    grid-template-columns: repeat(var(--mw-route-count, 3), minmax(136px, 1fr));
  }

  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-inspector {
    height: min(31dvh, 264px);
    max-height: 33dvh;
  }

  .mw-shell[data-view="plan"].mw-detail-open .mw-main {
    overflow-y: auto;
  }

  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-globe {
    order: 1;
  }

  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-content {
    order: 2;
  }

  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-globe-routes {
    display: none;
  }

  .mw-shell[data-view="plan"] .mw-inspector-scroll {
    padding: 11px 14px calc(12px + env(safe-area-inset-bottom));
  }
}

/* -------------------------------------------------------------------------
   Compact Amelia conversation receipts. Full itinerary and transfer detail
   remain available from the map inspector.
   ------------------------------------------------------------------------- */

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-composer {
  gap: 7px;
  margin: 3px 14px 8px;
  padding: 5px 6px 5px 12px;
  border-radius: 15px;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-composer #tpInput {
  min-height: 42px;
  max-height: 78px;
  padding: 7px 4px 6px 1px;
  font-size: 14px;
  line-height: 1.36;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-composer .tp-send {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-summary {
  padding: 5px 14px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-refine {
  padding: 4px 14px 6px;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-thread {
  gap: 7px;
  padding: 8px 14px 12px;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member {
  min-width: 0;
  padding: 1px 0 4px;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member .jk-intro-txt {
  margin: 0 0 6px;
  color: var(--mw-muted);
  font: 11px/1.3 var(--mw-sans);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member .jk-personal-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member .jk-personal-chip {
  height: 54px;
  min-height: 54px;
  padding: 7px 27px 7px 9px;
  border-color: rgba(101, 66, 179, .28);
  background: rgba(101, 66, 179, .055);
  font: 600 11.5px/1.25 var(--mw-sans);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member .jk-personal-chip-label {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member .jk-personal-chip::after {
  right: 9px;
  font-size: 13px;
}

@media (max-width: 700px) {
  body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member .jk-personal-chips {
    grid-template-columns: none;
    grid-auto-columns: minmax(218px, 82%);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
  }

  body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .jk-intro-member .jk-personal-chip {
    scroll-snap-align: start;
  }
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-bot,
body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-verdict {
  font-size: 12.5px;
  line-height: 1.42;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack {
  display: grid;
  gap: 0;
  border: 0;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-areas:
    "logo identity price"
    "route route route"
    "meta meta meta"
    "trust trust open";
  gap: 4px 9px;
  min-height: 0;
  margin: 0;
  padding: 8px 10px 7px;
  border: 0;
  border-top: 1px solid rgba(42, 36, 25, .24);
  border-radius: 0;
  background: rgba(253, 251, 246, .48);
  box-shadow: none;
  color: var(--mw-ink);
  transition: background-color 140ms ease, border-color 140ms ease;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket.has-airport-note {
  grid-template-areas:
    "logo identity price"
    "route route route"
    "airport airport airport"
    "meta meta meta"
    "trust trust open";
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket:last-of-type {
  border-bottom: 1px solid rgba(42, 36, 25, .24);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-award {
  background: rgba(101, 66, 179, .035);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-cash {
  background: rgba(176, 138, 62, .035);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket:hover,
body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket:focus-visible {
  border-color: rgba(101, 66, 179, .5);
  background: rgba(101, 66, 179, .07);
  outline: 0;
}

.mw-shell[data-view="plan"] .tp-compact-logo {
  grid-area: logo;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  align-self: center;
  border: 1px solid rgba(42, 36, 25, .16);
  border-radius: 7px;
  background: var(--mw-raised);
}

.mw-shell[data-view="plan"] .tp-compact-logo-img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.mw-shell[data-view="plan"] .tp-compact-identity {
  grid-area: identity;
  min-width: 0;
  align-self: center;
}

.mw-shell[data-view="plan"] .tp-compact-identity b,
.mw-shell[data-view="plan"] .tp-compact-price b {
  display: block;
  overflow: hidden;
  color: var(--mw-ink);
  font: 650 12.5px/1.2 var(--mw-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-shell[data-view="plan"] .tp-compact-identity small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--mw-muted);
  font: 8.5px/1.15 var(--mw-mono);
  letter-spacing: .07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.mw-shell[data-view="plan"] .tp-compact-price {
  grid-area: price;
  align-self: center;
  text-align: right;
  white-space: nowrap;
}

.mw-shell[data-view="plan"] .tp-compact-price b {
  font-family: var(--mw-mono);
  font-size: 12.5px;
}

.mw-shell[data-view="plan"] .tp-compact-price small {
  display: block;
  margin-top: 2px;
  color: var(--mw-muted);
  font: 9.5px/1.15 var(--mw-sans);
}

.mw-shell[data-view="plan"] .tp-compact-route {
  grid-area: route;
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  padding-top: 2px;
}

.mw-shell[data-view="plan"] .tp-compact-route b {
  font: 650 11px/1.2 var(--mw-mono);
}

.mw-shell[data-view="plan"] .tp-compact-route small {
  overflow: hidden;
  color: var(--mw-muted);
  font: 11px/1.2 var(--mw-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-shell[data-view="plan"] .tp-compact-meta {
  grid-area: meta;
  overflow: hidden;
  color: var(--mw-ink-soft, var(--mw-muted));
  font: 10px/1.25 var(--mw-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-shell[data-view="plan"] .tp-compact-airport-note {
  grid-area: airport;
  color: var(--mw-amber-deep, #8a5b16);
  font: 600 10px/1.3 var(--mw-sans);
}

.mw-shell[data-view="plan"] .tp-compact-trust {
  grid-area: trust;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  color: var(--mw-muted);
  font: 9.5px/1.2 var(--mw-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mw-shell[data-view="plan"] .tp-compact-trust i::before {
  content: "/";
  margin: 0 6px;
  color: rgba(42, 36, 25, .34);
  font-style: normal;
}

.mw-shell[data-view="plan"] .tp-compact-covered {
  color: var(--mw-green, #2d8a63);
  font-weight: 650;
}

.mw-shell[data-view="plan"] .tp-compact-open {
  grid-area: open;
  align-self: end;
  color: var(--mw-violet-deep);
  font: 650 9.5px/1.2 var(--mw-sans);
  white-space: nowrap;
}

.mw-shell[data-view="plan"] .tp-compact-more {
  width: 100%;
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid rgba(42, 36, 25, .24);
  background: transparent;
  color: var(--mw-violet-deep);
  font: 650 10px/1.2 var(--mw-sans);
  text-align: left;
  cursor: pointer;
}

.mw-shell[data-view="plan"] .tp-compact-provenance {
  padding-top: 1px;
  color: var(--mw-muted);
  font: 9.5px/1.35 var(--mw-sans);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-chips {
  gap: 4px;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-chip {
  min-height: 0;
  padding: 5px 8px;
  font-size: 10px;
}

@media (max-width: 560px) {
  body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 4px 7px;
    padding-inline: 8px;
  }

  .mw-shell[data-view="plan"] .tp-compact-meta,
  .mw-shell[data-view="plan"] .tp-compact-trust {
    white-space: normal;
  }

  .mw-shell[data-view="plan"] .tp-compact-open {
    align-self: start;
  }
}

/* -------------------------------------------------------------------------
   Softer editorial geometry for Amelia. The page keeps one strong structure;
   only interactive and transient layers curve.
   ------------------------------------------------------------------------- */

.mw-shell[data-view="plan"] {
  --mw-soft-sm: 10px;
  --mw-soft-md: 14px;
  --mw-soft-lg: 20px;
  --mw-plan-tray-clearance: 104px;
}

.mw-shell[data-view="plan"] .mw-ask-amelia {
  min-height: 36px;
  margin: 6px 6px 6px 12px;
  padding: 0 14px;
  border-left: 0;
  border-radius: 999px;
}

.mw-shell[data-view="plan"] .mw-opening-compact {
  border-bottom-color: rgba(42, 36, 25, .14);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-composer {
  border-radius: 20px;
  box-shadow:
    0 8px 24px rgba(42, 36, 25, .065),
    inset 0 1px 0 rgba(255, 255, 255, .7);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-summary:not(:empty) {
  margin: 0;
  padding: 5px 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack {
  gap: 6px;
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket,
body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-ticket:last-of-type {
  border: 1px solid rgba(42, 36, 25, .16);
  border-radius: 3px var(--mw-soft-md) var(--mw-soft-md) 3px;
  box-shadow: 0 3px 10px rgba(42, 36, 25, .035);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-award {
  background: rgba(246, 241, 231, .88);
  border-color: rgba(101, 66, 179, .2);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-stack .tp-compact-cash {
  background: rgba(253, 251, 246, .76);
  border-color: rgba(176, 138, 62, .22);
}

body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-chip {
  border-radius: var(--mw-soft-sm);
}

.mw-shell[data-view="plan"] .mw-globe-caption {
  border: 0;
  border-left: 2px solid rgba(101, 66, 179, .52);
  border-radius: 0 var(--mw-soft-md) var(--mw-soft-md) 0;
  background: rgba(244, 237, 226, .86);
  box-shadow: 0 7px 20px rgba(42, 36, 25, .07);
}

.mw-shell[data-view="plan"] .mw-globe-routes {
  border-radius: var(--mw-soft-md);
  box-shadow: 0 12px 30px rgba(42, 36, 25, .11);
}

.mw-shell[data-view="plan"] .mw-globe-routes button:first-child {
  border-radius: calc(var(--mw-soft-md) - 1px) 0 0 calc(var(--mw-soft-md) - 1px);
}

.mw-shell[data-view="plan"] .mw-globe-routes button:last-child {
  border-radius: 0 calc(var(--mw-soft-md) - 1px) calc(var(--mw-soft-md) - 1px) 0;
}

.mw-shell[data-view="plan"] .mw-inspector .mw-button {
  border-radius: var(--mw-soft-sm);
}

@media (min-width: 900px) {
  .mw-shell[data-view="plan"] .mw-main {
    margin: 8px 10px 10px;
    border: 1px solid rgba(42, 36, 25, .16);
    border-radius: 22px;
    background: var(--mw-paper);
    box-shadow: 0 12px 34px rgba(42, 36, 25, .055);
  }

  .mw-shell[data-view="plan"] .mw-inspector {
    bottom: var(--mw-plan-tray-clearance);
    max-height: none;
    border-radius: var(--mw-soft-lg);
  }
}

@media (max-width: 899px) {
  .mw-shell[data-view="plan"][data-detail-open="true"] .mw-inspector {
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    border: 1px solid rgba(42, 36, 25, .22);
    border-radius: var(--mw-soft-lg);
  }
}

@media (max-width: 560px) {
  body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-msg.user {
    display: block;
    flex: 0 0 auto;
    max-width: 88%;
    max-height: 54px;
    overflow: hidden;
  }

  body.mw-active .mw-shell[data-view="plan"] .mw-amelia-inline-host .tp-answer-block-decision .tp-flow-group {
    font-size: 12px;
    line-height: 1.38;
  }

  .mw-shell[data-view="plan"] .tp-compact-meta,
  .mw-shell[data-view="plan"] .tp-compact-trust {
    white-space: nowrap;
  }
}
