.outing-card {
  container-type: inline-size;
  width: 100%;
  margin: 10px 0 22px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.outing-card-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(16px, 2cqi, 24px);
  padding: clamp(14px, 2.6cqi, 30px);
}
.outing-card-head { min-width: 0; border: 0; }
.outing-card .outing-dismiss {
  position: absolute;
  inset-block-start: clamp(10px, 2cqi, 24px);
  inset-inline-end: clamp(10px, 2cqi, 24px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font: 500 26px/1 system-ui, sans-serif;
  cursor: pointer;
}
.outing-card .outing-dismiss:hover { color: var(--accent); border-color: currentColor; }
.outing-dismiss ~ .outing-card-head { min-height: 44px; padding-inline-end: 52px; }
.outing-eyebrow {
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 6px;
}
.outing-card .outing-card-head h3, .outing-map-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(23px, 2.75vw, 34px);
  line-height: 1.18;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.outing-distance-comparison { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.outing-feedback { max-width: 78ch; margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.outing-figures { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.outing-figure { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--accent); font-size: 14px; line-height: 1.4; }
.outing-stops {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.outing-stops > li { display: grid; min-width: 0; gap: 8px; }
.outing-stage {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.outing-stage .outing-stage-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
}
.outing-stage-number {
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: 0 0 28px;
  color: white; background: #245a78;
  border-radius: 50%; font: 700 13px/1 system-ui,sans-serif;
}
.outing-stops > li:nth-child(2) .outing-stage-number { background: #9e4d32; }
.outing-stops > li:nth-child(3) .outing-stage-number { background: #57725e; }
.outing-stop {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}
.outing-photo {
  position: relative;
  isolation: isolate;
  width: clamp(82px, 21vw, 105px);
  height: 87px;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
}
.outing-photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.outing-photo .photo-zoom { align-items: flex-start; justify-content: flex-end; padding: 4px; }
.outing-photo .photo-zoom svg { width: 18px; height: 18px; padding: 3px; }
.outing-photo-kind {
  position: absolute;
  inset: auto 0 0;
  padding: 3px 4px;
  color: #fff;
  background: #142e45c9;
  font: 500 10px/1.25 system-ui, sans-serif;
  pointer-events: none;
  z-index: 2;
}
.outing-stop-copy { flex: 1; min-width: 0; display: grid; align-content: center; gap: 3px; }
.outing-stop-title { display:flex; align-items:center; justify-content:space-between; gap:6px; }
.outing-stop-title > .social-share-trigger { flex:none; }
.outing-stop-area, .outing-stop-age, .outing-walk {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.outing-stop-label { color: var(--ink); font-size: 15px; line-height: 1.25; font-weight: 740; overflow-wrap: anywhere; }
.outing-atmosphere { display: block; margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.outing-stop-price {
  justify-self: start;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.outing-stop .outing-stop-name, .outing-map-legend .outing-map-name {
  padding: 3px 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-align: left;
  overflow-wrap: anywhere;
}
button:is(.outing-stop-name, .outing-map-name) { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
button:is(.outing-stop-name, .outing-map-name):hover { color: var(--accent); text-decoration-color: currentColor; }
.outing-walk { display: inline-flex; align-items: center; gap: 5px; margin-inline: 8px; font-weight: 650; }
.outing-walk svg, .outing-route-open svg, .outing-figure svg {
  flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round;
}
.outing-card :is(.outing-route-open, .outing-route-choose) {
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 23px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.outing-card .outing-route-choose { background: var(--surface); color: var(--accent); }
.outing-route-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.outing-card :is(.outing-route-open, .outing-route-choose):hover { box-shadow: inset 0 0 0 1px currentColor; }
.outing-card button:focus-visible, .outing-map-dialog button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.outing-missing {
  margin: 0; padding: 10px 13px 15px;
  color: var(--muted); font-size: 14px; line-height: 1.45;
}
.outing-alternatives { border-top: 1px solid var(--line); }
.outing-alternatives > summary, .outing-previous > summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; min-height: 44px; padding: 8px 14px;
  color: var(--accent); font-size: 13px; font-weight: 650; line-height: 1.3;
  list-style: none; cursor: pointer;
}
.outing-alternatives summary::-webkit-details-marker,
.outing-previous summary::-webkit-details-marker { display: none; }
.outing-alternatives > summary::after, .outing-previous > summary::after {
  content: ''; flex: none; width: 7px; height: 7px; margin-right: 4px;
  border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg);
}
.outing-alternatives[open] > summary::after, .outing-previous[open] > summary::after { transform: rotate(225deg); }
.outing-alternatives > summary:hover, .outing-previous > summary:hover { background: var(--surface-soft); }
.outing-alternatives > summary:focus-visible, .outing-previous > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.outing-alternative-list { padding: 0 12px 4px; }
.outing-alternative { padding: 9px 0; gap: 9px; border-top: 1px solid var(--line); }
.outing-alternative .outing-photo { width: 62px; height: 62px; }
.outing-alternative .outing-stop-name { font-size: 15px; }
.outing-previous { margin: 12px 0; }
.outing-previous > summary { justify-content: start; border: 1px solid var(--line); border-radius: 10px; }
@container (min-width: 560px) {
  .outing-stops, .outing-route-options { grid-column: 1 / -1; }
  .outing-stops { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .outing-stage > .outing-stop { display: grid; gap: 9px; align-content: start; }
  .outing-stage > .outing-stop .outing-photo { width: 100%; height: clamp(128px, 17cqi, 175px); }
  .outing-stage > .outing-stop .outing-photo-kind { inset: auto auto 5px 5px; border-radius: 3px; padding: 3px 5px; }
}
@container (min-width: 760px) {
  .outing-card[data-complete="true"] .outing-card-body { grid-template-columns: minmax(0, 1fr) auto; }
  .outing-card[data-complete="true"] .outing-dismiss ~ .outing-card-head { padding-inline-end: 0; }
  .outing-dismiss ~ .outing-route-actions { margin-inline-end: 52px; }
  .outing-route-actions { grid-column:2; grid-row:1; align-self:start; }
}
@container (min-width: 800px) {
  .outing-stops:not([data-count="2"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.outing-map-dialog {
  box-sizing: border-box;
  width: min(680px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: clamp(15px, 3vw, 25px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 16px 70px #10233238;
}
.outing-map-dialog::backdrop { background: #0c1b2ab8; }
.outing-map-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 0; }
.outing-map-head > div { flex:1; min-width:0; overflow-wrap:anywhere; }
.outing-map-head > button { flex:none; }
.outing-map-long .outing-map-head { position: sticky; top: 0; z-index: 2; padding-bottom: 6px; background: var(--bg); }
.outing-map-close {
  min-width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: inherit; font-size: 26px; line-height: 1; cursor: pointer;
}
.outing-map .centre-map-surface { height: clamp(180px, 42dvh, 380px); margin: 15px 0 12px; }
.outing-map-long .centre-map-surface { min-height: 220px; }
.outing-map .centre-map-pin.outing-map-pin { width: 34px; height: 34px; font-size: 15px; }
.outing-map-number, .outing-map .outing-map-pin { background: #245a78; color: white; }
.outing-map-number[data-index="2"], .outing-map .outing-map-pin[data-index="2"] { background: #9e4d32; }
.outing-map-number[data-index="3"], .outing-map .outing-map-pin[data-index="3"] { background: #57725e; }
.outing-map-track { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.outing-map-anchors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.outing-map-anchors line { stroke: var(--muted); stroke-width: 1px; }
.outing-map-anchors circle { fill: var(--muted); stroke: var(--surface); stroke-width: 1px; }
.outing-map-track polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.outing-map-track .track-halo { stroke: var(--surface); stroke-width: 6px; }
.outing-map-track .track-path { stroke: var(--accent); stroke-width: 3px; }
.outing-map-legend {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 8px 16px; list-style: none; margin: 0; padding: 0;
}
.outing-map-legend li { display: flex; gap: 9px; align-items: flex-start; min-width: 0; }
.outing-map-legend[data-count="3"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.outing-map-number {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px;
  margin-top: 4px; border-radius: 50%; color: #fff; font: 700 12px/1 system-ui;
}
.outing-map-address { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }

.outing-route-options { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.outing-route-option { padding: 14px; border-top: 1px solid var(--line); }
.outing-route-option > p { margin: 6px 0; line-height: 1.5; overflow-wrap: anywhere; }
.outing-route-option button { margin-top: 12px; }

/* The public itinerary follows the same colour palette as the place detail. */
dialog#detail:has(.shared-itinerary) {
  width: min(840px, calc(100% - 36px));
  max-width: none;
  max-height: min(92dvh, calc(var(--dock-visible-height, 100dvh) - 12px));
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
#detail:has(.shared-itinerary) > .detailtop {
  padding: 16px clamp(18px, 4vw, 34px) 12px;
  border-bottom: 1px solid var(--line);
}
#detail:has(.shared-itinerary) > .detailtop h3 {
  font-size: clamp(23px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -.045em;
}
#detail > .detail-content:has(> .shared-itinerary) { padding: 0; }
.shared-itinerary {
  padding: 0 clamp(18px, 4vw, 34px) clamp(22px, 4vw, 34px);
  overflow-wrap: anywhere;
}
.shared-masthead, .shared-route-summary, .shared-stop-meta {
  display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
}
.shared-masthead { padding: 12px 0 0; }
#detail .detail-content > .shared-masthead { padding: 12px var(--venue-pad, 18px) 0; }
#detail .shared-masthead .brand {
  width: auto; min-height: 40px; display: inline-flex; align-items: center; gap: 0;
  color: var(--ink); font-size: 18px; font-weight: 760; line-height: 1; letter-spacing: -.055em;
  text-decoration: none;
}
#detail .shared-masthead .brandmark {
  display: grid; place-items: center; width: 27px; height: 27px; margin-inline-end: 7px;
  border-radius: 8px; background: var(--warm); color: var(--on-warm);
}
#detail .shared-masthead .brandmark svg { width: 19px; height: 19px; }
#detail .shared-language, #detail .shared-back {
  min-height: 42px; padding: 5px 8px; color: var(--accent); border: 0; background: transparent;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
}
#detail .shared-language { margin-inline-start: auto; }
#detail .shared-back { text-align: start; }
.shared-route-summary { justify-content: space-between; margin: 3px 0 15px; }
.shared-route-summary p { margin: 0; color: var(--muted); font-size: 14px; }
.shared-stops { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.shared-stop {
  display: grid; align-items: start; overflow: hidden; min-width: 0;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.shared-stop:has(.shared-stop-photo) { grid-template-columns: minmax(0, 34%) minmax(0, 1fr); }
.shared-stop-photo {
  position: relative; align-self: stretch; min-width: 0; min-height: 168px;
  margin: 0; overflow: hidden; background: var(--surface-soft);
}
.shared-stop-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.shared-stop-photo > figcaption {
  position: absolute; bottom: 6px; left: 6px; max-width: calc(100% - 12px);
  padding: 3px 7px; border-radius: 6px; background: rgb(10 24 34 / 86%); color: white;
  font-size: 11px; line-height: 1.4; pointer-events: none;
}
.shared-stop-copy { padding: clamp(13px, 2vw, 20px); min-width: 0; }
.shared-stop-meta { color: var(--muted); font-size: 12px; line-height: 1.4; gap: 4px 9px; }
.shared-stop-number {
  border-radius: 5px; padding: 3px 7px; background: var(--warm-surface); color: var(--warm);
  font-weight: 720;
}
.shared-stop-copy h4 { margin: 8px 0; color: var(--ink); font-size: clamp(19px, 2.25vw, 24px); line-height: 1.22; letter-spacing: -.035em; }
.shared-stop-summary { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.55; }
.shared-stop-address { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.shared-stop-address svg { flex: none; align-self: flex-start; width: 14px; height: 14px; margin-top: 2px; }
#detail a.shared-stop-link {
  display: inline-flex; align-items: center; gap: 5px; min-height: 42px; margin-top: 4px;
  color: var(--accent); font-size: 14px; font-weight: 700; text-underline-offset: 3px;
}
@media (max-width: 600px) {
  dialog#detail:has(.shared-itinerary) {
    width: 100%; height: calc(var(--dock-visible-height,100dvh) - max(6px, env(safe-area-inset-top)));
    max-height: none; margin: auto 0 0; border: 0; border-radius: 18px 18px 0 0;
  }
  #detail:has(.shared-itinerary) > .detailtop { padding-block: 9px; }
  .shared-stops { gap: 12px; }
  .shared-stop:has(.shared-stop-photo) { grid-template-columns: 1fr; }
  .shared-stop-photo { min-height: 0; aspect-ratio: 2.5; }
  .shared-masthead { padding-top: 6px; gap: 3px 6px; }
  .shared-route-summary { margin-block: 2px 12px; }
}
