/* The postcard look: navy ink on cream paper, one stamp red for the chosen trip and the one action. */
:root {
  --paper: #f4f2ea; --land: #f8f6ef; --card: #fbfaf5; --ink: #1d2a4a; --ink2: #4f5a74; --muted: #7f8597;
  --rule: rgba(29, 42, 74, .22); --rule2: rgba(29, 42, 74, .1); --red: #b8322a; --green: #2f6b3a;
  --serif: Fraunces, Georgia, serif; --sans: Inter, -apple-system, system-ui, sans-serif; --hand: Caveat, cursive;
  --r: 4px; --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 12px/1.35 var(--sans); font-variant-numeric: tabular-nums; overflow: hidden; }
button { font: inherit; color: inherit; }

/* Frame: the map fills the page; the airmail border folds away at globe zoom. */
.pc-map { position: fixed; inset: 0; z-index: 0; isolation: isolate; cursor: grab; touch-action: none; }
.pc-map:active { cursor: grabbing; }
.pc-stripes { position: fixed; inset: 0; padding: 10px; pointer-events: none; z-index: 15;
  background: repeating-linear-gradient(-45deg, var(--red) 0 16px, var(--paper) 16px 24px, var(--ink) 24px 40px, var(--paper) 40px 48px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transition: padding .9s var(--ease), opacity .7s ease; }
.pc-stripes.bare { padding: 0; opacity: 0; }
.maplibregl-ctrl-attrib { font-size: 10px; background: rgba(251, 250, 245, .8) !important; }

/* Map labels and place marks */
.pc-lbl { pointer-events: none; font: 600 9.5px var(--serif); letter-spacing: .34em; color: var(--ink); text-shadow: 0 0 3px var(--land), 0 0 6px var(--land); white-space: nowrap; }
.pc-lbl.sea { font: italic 400 16px var(--serif); letter-spacing: .14em; text-shadow: 0 0 3px var(--paper), 0 0 6px var(--paper), 0 0 9px var(--paper); }
.pc-lbl.city { font: 600 21px var(--serif); letter-spacing: 0; text-shadow: 0 0 3px var(--land), 0 0 5px var(--land), 0 0 9px var(--land); }
.pc-lbl.hub { font: 600 9px var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.pc-vehicle { height: 34px; width: auto; pointer-events: none; }
/* A city's engraved drawing (chart.landmark, style 'drawing'): it stands up from its base, and lies down again. */
.pc-lm { pointer-events: none; }
.pc-lm img { display: block; width: 100%; height: auto; transform-origin: 50% 100%; transform: scaleY(.04); opacity: 0;
  transition: transform 350ms cubic-bezier(.4, 0, 1, 1), opacity 300ms; filter: drop-shadow(0 0 3px var(--land)) drop-shadow(0 0 6px var(--land)); }
.pc-lm.up img { transform: none; opacity: 1; transition: transform 900ms cubic-bezier(.34, 1.4, .5, 1), opacity 400ms; }
@media (prefers-reduced-motion: reduce) { .pc-lm img, .pc-lm.up img { transition: none; } }
/* The route card beside the vehicle on a hovered route: the time there, the leg, how far along. Fixed width, so it never jumps as the pointer moves. */
/* The 3D layer (deck.gl) sits under the map's labels, dots and the route card: a model never hides a name. */
.deck-widget-container { z-index: 1; }
.maplibregl-canvas-container .maplibregl-marker { z-index: 2; }
.pc-where { position: absolute; left: 0; top: 0; z-index: 3; width: 236px; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--rule);
  border-radius: var(--r); padding: 9px 11px 8px; box-shadow: 0 1px 0 var(--rule2); font: 12px/1.35 var(--sans); font-variant-numeric: tabular-nums; }
.pc-where[hidden] { display: none; }
.pc-where .pcw-t { display: flex; align-items: baseline; gap: 8px; }
.pc-where .pcw-t b { font: 600 19px/1 var(--serif); }
.pc-where .pcw-t span { color: var(--ink); }
.pc-where .pcw-who { color: var(--ink2); margin-top: 3px; }
.pc-where .pcw-row { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); margin-top: 6px; }
.pc-where .pcw-row + .pcw-bar { margin-top: 5px; }
.pc-where .pcw-bar { height: 3px; background: var(--rule2); border-radius: 2px; overflow: hidden; }
.pc-where .pcw-bar i { display: block; height: 100%; background: var(--red); }
.pc-where .pcw-bar + .pcw-row { margin-top: 4px; }
.pc-lbl.hub.on { opacity: 1; color: var(--red); }
.pc-leg { pointer-events: none; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--red);
  box-shadow: inset 0 0 0 1.5px var(--red); font: 700 10px/1 var(--sans); font-variant-numeric: tabular-nums; }
.z-far .pc-leg { visibility: hidden; }
.pc-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--land); border: 1.5px solid var(--ink); display: grid; place-items: center; pointer-events: none; }
.pc-dot::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.pc-hub { width: 7px; height: 7px; border-radius: 50%; background: var(--land); border: 1.1px solid var(--ink); pointer-events: none; }
.pc-hub.on { background: var(--red); border-color: var(--red); }
.z-far .pc-lbl, .z-far .pc-hub, .z-far .pc-dot { visibility: hidden !important; }
.z-mid .pc-lbl:not(.city):not(.sea), .z-mid .pc-hub:not(.on) { visibility: hidden !important; }
.z-city .pc-lbl:not(.city) { visibility: hidden !important; }

/* Surfaces */
.pc-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); position: relative;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 12px 26px -18px rgba(20, 30, 50, .5); }
.pc-card::after { content: ""; position: absolute; inset: 4px; border: 1px solid var(--rule2); border-radius: 2px; pointer-events: none; }
.pc-eyebrow { font: 600 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.pc-halo { text-shadow: 0 0 3px var(--paper), 0 0 6px var(--paper), 0 0 10px var(--paper); }
.pc-title { position: fixed; left: 36px; top: 28px; z-index: 10; pointer-events: none; }
.pc-title h1 { margin: 0; font: 700 42px/1 var(--serif); letter-spacing: -.015em; }
.pc-title .sub { margin-top: 10px; padding-top: 7px; border-top: 1px solid var(--ink); box-shadow: 0 -3px 0 -2px var(--ink);
  font: 600 10px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--ink2); display: inline-block; }
.pc-price { font: 600 34px/1.1 var(--serif); }
.pc-price small { display: block; font: 500 12px var(--sans); color: var(--ink2); margin-top: 2px; }
.pc-hand { font: 500 21px/1 var(--hand); }

/* Chips and switches */
.pc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-chips + .pc-chips { margin-top: 8px; }
.pc-chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--rule2); font: 500 12px var(--sans); color: var(--ink2); transition: background .15s, color .15s, box-shadow .15s; }
.pc-chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.pc-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.pc-chip[aria-pressed="true"], .pc-chip[aria-checked="true"] { background: rgba(29, 42, 74, .07); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--ink); }
.pc-chip .box { width: 10px; height: 10px; border-radius: 2px; box-shadow: inset 0 0 0 1.2px currentColor; display: grid; place-items: center; }
.pc-chip[aria-checked="true"] .box { background: var(--ink); box-shadow: none; }
.pc-chip[aria-checked="true"] .box::after { content: ""; width: 5px; height: 3px; border: solid var(--card); border-width: 0 0 1.4px 1.4px; rotate: -45deg; translate: 0 -1px; }

/* The one action: a red airmail band. */
.pc-book { all: unset; cursor: pointer; position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--red); color: #fbf6ec;
  font: 600 15px var(--sans); letter-spacing: .02em; }
.pc-book::before { content: ""; position: absolute; left: 0; right: 0; top: -5px; height: 5px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 8px, transparent 8px 12px, var(--ink) 12px 20px, transparent 20px 24px); opacity: .9; }
.pc-book:hover { background: #a42b24; }
.pc-book:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pc-book span { flex: 1; }
.pc-book b { font: 600 15px var(--serif); padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .35); }
.pc-book.busy b { display: none; }
.pc-book.pay { background: var(--green); } .pc-book.pay:hover { background: #255830; }

/* Tooltip */
.pc-tip { position: fixed; pointer-events: none; background: var(--card); color: var(--ink2); border: 1px solid var(--rule); box-shadow: 0 1px 0 var(--rule2);
  font: 12px/1.45 var(--sans); font-variant-numeric: tabular-nums; padding: 8px 11px; border-radius: var(--r);
  max-width: 300px; opacity: 0; transition: opacity .12s; z-index: 40; }
.pc-tip b { font-weight: 600; color: var(--ink); }

/* Text in SVG views */
.pc-caps { font: 600 9.5px var(--sans); letter-spacing: .16em; fill: var(--ink); }
.pc-caps.big { font-size: 10.5px; letter-spacing: .22em; }
.pc-caps.muted { fill: var(--muted); }
.pc-tick { font: 400 9.5px var(--sans); fill: var(--muted); } .pc-tick.strong { font-weight: 600; fill: var(--ink2); }
.pc-note { font: italic 400 10.5px var(--serif); fill: var(--ink); }
.pc-pill { font: 600 10.5px var(--sans); fill: var(--card); }
.pc-trow { cursor: pointer; }
.pc-trow text { font: 400 11px var(--sans); }

/* Cells: a small meter of lit squares */
.pc-cells { display: inline-flex; gap: 1px; flex-wrap: wrap; }
.pc-cells i { width: 6px; height: 7px; background: var(--rule2); border-radius: 1px; }
.pc-cells i.on { background: var(--red); }
.pc-cells.ink i.on { background: var(--ink); }

/* Sheet: checkout and other dialogs. A plain paper card over a dimmed map; it rises in and fades out. */
.pc-sheetbg { position: fixed; inset: 0; z-index: 30; background: rgba(29, 42, 74, .22); display: grid; place-items: center; padding: 16px;
  animation: pc-dim .2s ease both; }
.pc-sheetbg[hidden] { display: none; }
.pc-sheet { width: min(600px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px 32px 22px; border: 0; border-radius: 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 30px 70px -30px rgba(20, 30, 50, .55); animation: pc-rise .32s var(--ease) both; }
.pc-sheet::after { display: none; }
@keyframes pc-dim { from { opacity: 0; } }
@keyframes pc-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.pc-sheet h2 { margin: 6px 0 4px; font: 600 24px/1.2 var(--serif); letter-spacing: -.01em; text-wrap: balance; padding-right: 32px; }
.pc-sheet .sub { color: var(--muted); font-size: 12px; }
.pc-co { position: relative; }
.pc-co-x { all: unset; cursor: pointer; position: absolute; right: -10px; top: -10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--ink2); }
.pc-co-x:hover, .pc-co-x:focus-visible { background: var(--rule2); }
.pc-co svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Tickets: one line each. The fine print opens under its own line. */
.pc-co-list { list-style: none; margin: 20px 0 0; padding: 0; }
.pc-co-list li { border-top: 1px solid var(--rule2); }
.pc-co-list summary, .pc-co-list .pc-co-sum { display: grid; grid-template-columns: 22px 92px 1fr auto 16px; column-gap: 12px; row-gap: 3px; align-items: baseline; padding: 13px 0; list-style: none; }
.pc-co-list summary { cursor: pointer; }
.pc-co-list summary::-webkit-details-marker { display: none; }
.pc-co-list .pc-co-ic { color: var(--ink2); align-self: center; grid-row: span 2; }
.pc-co-list .pc-co-day { color: var(--ink2); font-size: 12px; }
.pc-co-list .pc-co-tm { font-size: 14px; color: var(--ink2); min-width: 0; }
.pc-co-list .pc-co-tm b { color: var(--ink); font-weight: 600; }
.pc-co-list .pc-co-tm i { font-style: normal; color: var(--muted); margin: 0 7px; }
.pc-co-list sup { font-size: 9px; margin-left: 1px; color: var(--muted); }
.pc-co-list .pc-co-pr { font: 600 14px var(--sans); text-align: right; white-space: nowrap; }
.pc-co-list .pc-co-dash { color: var(--muted); font-weight: 400; }
.pc-co-list .pc-co-by { grid-column: 3 / 5; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-co-list .pc-co-chev { color: var(--muted); align-self: center; grid-row: 1 / span 2; grid-column: 5; transition: transform .2s var(--ease); }
.pc-co-list details[open] .pc-co-chev { transform: rotate(90deg); }
.pc-co-list summary:hover .pc-co-chev, .pc-co-list summary:focus-visible .pc-co-chev { color: var(--ink); }
.pc-co-list .pc-co-fine { margin: -4px 0 14px 34px; padding: 10px 12px; border-radius: 8px; background: rgba(29, 42, 74, .045); color: var(--ink2); font-size: 12px; line-height: 1.5; }

/* What the person pays on the way, apart from the booking: quiet. */
.pc-co-aside { border-top: 1px solid var(--rule2); padding: 11px 0 2px; font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.pc-co-aside > span { font: 600 10px var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.pc-co-aside .cap::first-letter { text-transform: uppercase; }
.pc-co-aside div { display: flex; justify-content: space-between; gap: 16px; }

/* The total: one figure; what it leaves out sits under it, small. */
.pc-co-total { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--ink); }
.pc-co-total > span { color: var(--ink2); font-size: 13px; }
.pc-co-total b { font: 600 26px/1 var(--serif); }
.pc-co-total small { grid-column: 1 / -1; justify-self: end; margin-top: 6px; color: var(--muted); font-size: 12px; }

.pc-co-go, .pc-agent .paid { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; margin-top: 20px; padding: 14px; border-radius: 10px;
  background: var(--red); color: #fff; font: 600 14px var(--sans); text-align: center; transition: filter .15s, transform .15s; }
.pc-co-go:hover, .pc-agent .paid:hover { filter: brightness(1.08); }
.pc-co-go:active { transform: scale(.99); }
.pc-co-go[disabled], .pc-agent .paid[disabled] { opacity: .5; cursor: default; filter: none; }
.pc-co-how { margin: 9px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.pc-co-more { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }
.pc-co-more summary { cursor: pointer; list-style: none; display: inline-block; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.pc-co-more summary::-webkit-details-marker { display: none; }
.pc-co-more p { margin: 8px 0 0; text-align: left; line-height: 1.5; color: var(--ink2); }

/* The agent's progress: a short timeline, newest last, the live step in red. */
.pc-agent { margin: 18px 0 0; padding: 4px 0 0 14px; border-left: 2px solid var(--rule2); display: grid; gap: 7px; font-size: 12px; }
.pc-agent[hidden] { display: none; }
.pc-agent div { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; color: var(--ink2); }
.pc-agent b { font-weight: 600; color: var(--ink); }
.pc-agent div:last-of-type b { color: var(--red); }
.pc-agent div:last-of-type b::before { content: "● "; animation: pc-blink 1.2s ease-in-out infinite; }
.pc-agent div.done b::before, .pc-agent div.failed b::before { animation: none !important; }
.pc-agent i { font-style: normal; color: var(--muted); font-size: 12px; }
.pc-agent .paid { margin-top: 8px; background: var(--green); }
.pc-co.busy .pc-co-go, .pc-co.busy .pc-co-how { display: none; }
.pc-agent .paidnote { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
@keyframes pc-blink { 50% { opacity: .25; } }

/* Intro and globe zoom: the HUD settles in after the camera, and steps aside on the globe. */
.pc-hud { transition: opacity .9s var(--ease) var(--d, 0s), translate 1.1s var(--ease) var(--d, 0s); }
body.intro .pc-hud { opacity: 0; translate: 0 18px; }
body.far .pc-hud { opacity: 0; translate: 0 18px; pointer-events: none; transition-delay: 0s; }
body.far .pc-map { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .pc-hud, .pc-stripes { transition: none !important; } }
.reduced .pc-hud, .reduced .pc-stripes, .reduced * { transition: none !important; animation: none !important; }
/* A phone checkout: the direction sits on its own line, so a ticket name gets the full width. */
@media (max-width: 600px) { .pc-sheetbg { place-items: end stretch; padding: 0; } .pc-sheet { width: 100%; max-height: 92vh; padding: 22px 18px 18px; border-radius: 16px 16px 0 0; }
  .pc-co-list summary, .pc-co-list .pc-co-sum { grid-template-columns: 20px 1fr auto 14px; column-gap: 10px; } .pc-co-list .pc-co-day { grid-column: 2; } .pc-co-list .pc-co-tm { grid-column: 2 / 4; grid-row: 2; } .pc-co-list .pc-co-by { grid-column: 2 / 4; grid-row: 3; } .pc-co-list .pc-co-ic { grid-row: span 3; } .pc-co-list .pc-co-pr { grid-column: 3; grid-row: 1; } .pc-co-list .pc-co-chev { grid-column: 4; grid-row: 1 / span 3; } .pc-co-list .pc-co-fine { margin-left: 0; } .pc-agent div { grid-template-columns: 1fr auto; } .pc-agent div span { grid-column: 1 / -1; } }
