:root {
  --page: #d8d5cf;
  --panel: #efece6;
  --panel-soft: #e6e3dc;
  --white: #f7f5f1;
  --ink: #3e3b36;
  --muted: #918d84;
  --faint: #aaa69d;
  --hairline: rgba(62, 59, 54, 0.11);
  --shadow: rgba(40, 38, 35, 0.13);
  --r-xl: 44px;
  --r-md: 25px;
  --r-sm: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  padding: 12px;
  color: var(--ink);
  background: linear-gradient(180deg, #dbd8d2, #d3d0c9);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.035'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.share-shell { width: min(1040px, 100%); margin: 0 auto; position: relative; z-index: 1; }
.share-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(8px, 2vw, 18px);
}
.brand-chip, .copy-link, .home-button {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.brand-chip:hover, .copy-link:hover, .home-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px var(--shadow); }
.brand-chip img { width: 18px; height: 18px; object-fit: contain; }
.copy-link.copied { background: #33312d; color: #f4f2ee; }
.share-actions { display: flex; align-items: center; gap: 10px; }
.expiry-timer {
  width: fit-content;
  margin: 10px auto 0;
  padding: 5px 9px;
  border: 1px solid rgba(62, 59, 54, .09);
  border-radius: 999px;
  background: rgba(247, 245, 241, .5);
  color: rgba(62, 59, 54, .64);
  font-size: 10.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  white-space: nowrap;
}
.expiry-timer::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 6px 1px 0; border-radius: 50%; background: currentColor; opacity: .55; }

.share-panel {
  min-height: calc(100vh - 138px);
  padding: clamp(34px, 6vw, 74px) clamp(18px, 6vw, 76px) clamp(50px, 8vw, 92px);
  border-radius: var(--r-xl);
  background: var(--panel);
  overflow: hidden;
}
.share-heading { text-align: center; max-width: 760px; margin: 0 auto clamp(44px, 7vw, 76px); }
.tag {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 6px 14px rgba(62, 59, 54, .07);
  font-size: 11px;
  font-weight: 600;
  transform: rotate(-1.5deg);
}
h1 { margin: 25px 0 0; font-size: clamp(30px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; overflow-wrap: anywhere; }
.share-date { margin: 16px 0 0; color: var(--muted); font-size: 12px; }

.messages { width: min(760px, 100%); margin: 0 auto; display: grid; gap: 34px; }
.message { min-width: 0; animation: rise .7s var(--ease) both; }
.message-delay-1 { animation-delay: 35ms; } .message-delay-2 { animation-delay: 70ms; }
.message-delay-3 { animation-delay: 105ms; } .message-delay-4 { animation-delay: 140ms; }
.message-delay-5 { animation-delay: 175ms; } .message-delay-6 { animation-delay: 210ms; }
.message-delay-7 { animation-delay: 245ms; } .message-delay-8 { animation-delay: 280ms; }
.message-delay-9 { animation-delay: 315ms; } .message-delay-10 { animation-delay: 350ms; }
.message-user { justify-self: end; width: min(88%, 620px); }
.user-bubble {
  padding: 13px 16px;
  border: 1px solid var(--hairline);
  border-radius: 17px;
  background: rgba(247, 245, 241, .82);
  box-shadow: 0 12px 30px -24px rgba(40, 38, 35, .35);
}
.message-author { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 12px; font-weight: 600; }
.author-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #3e3b36; color: #f7f5f1; font-size: 10px; }
.author-model { display: block; color: var(--muted); font-size: 10px; font-weight: 400; }
.message-time { margin-top: 8px; color: var(--faint); font-size: 10px; }
.message-user .message-time { text-align: right; }

.markdown { font-size: 14px; line-height: 1.78; overflow-wrap: anywhere; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3 { text-align: left; letter-spacing: -.018em; line-height: 1.25; margin: 1.55em 0 .55em; }
.markdown h1 { font-size: 1.8em; }
.markdown h2 { font-size: 1.45em; }
.markdown h3 { font-size: 1.18em; }
.markdown p, .markdown ul, .markdown ol, .markdown blockquote, .markdown pre, .markdown table { margin: 0 0 1.05em; }
.markdown a { color: #5f6f8c; text-underline-offset: 3px; }
.markdown blockquote { border-left: 3px solid #b9b4a9; padding-left: 15px; color: #777269; }
.markdown code { font: .92em ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(62, 59, 54, .065); border-radius: 5px; padding: .15em .35em; }
.markdown pre, .code-card pre, .diff-card pre { overflow: auto; padding: 17px; border-radius: 14px; background: #33312d; color: #f4f2ee; font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.markdown pre code { padding: 0; background: none; color: inherit; }
.markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.markdown th, .markdown td { padding: 8px 11px; border-bottom: 1px solid var(--hairline); text-align: left; }
.markdown img, .media-image { display: block; width: 100%; max-height: 680px; object-fit: contain; border-radius: 20px; background: var(--panel-soft); }
.attachment-figure { text-align: center; }
.attachment-image { display: block; width: auto; max-width: 100%; max-height: 520px; margin: 0 auto; object-fit: contain; border-radius: 20px; background: var(--panel-soft); }

.rich-block { margin: 18px 0; }
.rich-card { border: 1px solid var(--hairline); border-radius: var(--r-md); background: rgba(247, 245, 241, .66); padding: 18px; overflow: hidden; }
.rich-title { margin: 0 0 13px; font-size: 13px; font-weight: 650; }
.section-card summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.section-card[open] summary { margin-bottom: 14px; }
.media-caption { margin: 9px 3px 0; color: var(--muted); font-size: 11px; }
.media-video, .media-audio { display: block; width: 100%; border-radius: 18px; background: #282622; }
.media-audio { border-radius: 999px; }
.media-shell { transition: transform .42s var(--ease), filter .42s var(--ease); transform-origin: center; will-change: transform, filter; }
.media-shell:hover { transform: translateY(-4px); filter: drop-shadow(0 18px 22px rgba(40, 38, 35, .16)); }
.media-open { display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 20px; background: transparent; cursor: zoom-in; overflow: hidden; transform: translateZ(0); }
.media-open img, .media-shell video { transition: transform .55s var(--ease), filter .42s ease; transform-origin: center; }
.media-open:hover img { transform: scale(1.035); filter: saturate(1.08) contrast(1.02); }
.media-open:focus-visible { outline: 3px solid rgba(89, 111, 143, .5); outline-offset: 4px; }
.markdown-image-open { margin: 1.15em 0; }
.attachment-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; }
.attachment-meta { min-width: 0; }
.attachment-name { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-type { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.attachment-arrow { font-size: 18px; color: var(--muted); }
.asset-grid { display: grid; gap: 12px; margin-top: 16px; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; color: var(--muted); font-size: 10px; }
.legend-toggle { border: 0; border-radius: 999px; padding: 5px 8px; color: inherit; background: rgba(62, 59, 54, .05); font: inherit; cursor: pointer; }
.legend-toggle[aria-pressed="false"] { opacity: .38; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; margin-right: 5px; }
.series-color-0 { --series: #596f8f; } .series-color-1 { --series: #b26d62; }
.series-color-2 { --series: #71876b; } .series-color-3 { --series: #9a7a50; }
.series-color-4 { --series: #7d6e91; } .series-color-5 { --series: #4f8582; }
.series-swatch { background: var(--series); }
.rich-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rich-unit { color: var(--muted); font-size: 10px; font-weight: 500; }
.infographic-card { padding: 20px; }
.native-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line { stroke: rgba(62, 59, 54, .09); stroke-width: 1; }
.chart-grid text { fill: var(--muted); font: 9px "Poppins", sans-serif; text-anchor: end; }
.chart-axis { stroke: rgba(62, 59, 54, .24); stroke-width: 1; }
.chart-x-label { fill: var(--muted); font: 9px "Poppins", sans-serif; text-anchor: middle; }
.chart-series { opacity: 1; transition: opacity .28s ease; }
.chart-series.series-hidden { opacity: .06; pointer-events: none; }
.chart-line { fill: none; stroke: var(--series); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--white); stroke: var(--series); stroke-width: 2.5; transition: r .22s var(--ease), fill .22s ease; }
.chart-dot:hover { r: 7; fill: var(--series); }
.chart-bar { fill: var(--series); opacity: .86; transform-box: fill-box; transform-origin: bottom; transition: opacity .2s ease, transform .25s var(--ease); }
.chart-bar:hover { opacity: 1; transform: scaleY(1.015); }
.bar-chart { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(72px, 120px) 1fr auto; gap: 9px; align-items: center; font-size: 10.5px; }
.bar-row:hover .bar-fill { filter: saturate(1.35); }
.bar-track { height: 10px; border-radius: 999px; background: rgba(62, 59, 54, .08); overflow: hidden; }
.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; }
.bar-value { color: var(--muted); font-variant-numeric: tabular-nums; }
.route-list, .checklist { display: grid; gap: 9px; }
.route-map-engine { width: 100%; height: 300px; margin: 3px 0 20px; overflow: hidden; border: 1px solid rgba(62, 59, 54, .09); border-radius: 16px; background: #ddd9d1; z-index: 0; }
.leaflet-container { position: relative; overflow: hidden; outline: 0; font: 10px/1.5 "Poppins", sans-serif; }
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-map-pane { z-index: 400; } .leaflet-tile-pane { z-index: 200; } .leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; } .leaflet-marker-pane { z-index: 600; } .leaflet-tooltip-pane { z-index: 650; } .leaflet-popup-pane { z-index: 700; }
.leaflet-marker-icon, .leaflet-marker-shadow { display: block; }
.leaflet-container img.leaflet-tile { max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0; border: 0; }
.leaflet-tile { filter: saturate(.58) contrast(.9) brightness(1.04); }
.leaflet-control-container { position: relative; z-index: 800; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 12px; } .leaflet-bottom { bottom: 8px; } .leaflet-left { left: 12px; } .leaflet-right { right: 12px; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-bar { overflow: hidden; border: 1px solid rgba(62,59,54,.15); border-radius: 10px; box-shadow: 0 5px 14px rgba(40,38,35,.12); }
.leaflet-bar a { display: grid; width: 28px; height: 28px; place-items: center; border-bottom: 1px solid rgba(62,59,54,.12); background: rgba(247,245,241,.94); color: var(--ink); text-decoration: none; font: 18px/1 sans-serif; }
.leaflet-bar a:last-child { border-bottom: 0; }
.leaflet-control-attribution { padding: 2px 6px; border-radius: 6px; background: rgba(247,245,241,.78); color: rgba(62,59,54,.62); }
.leaflet-control-attribution a { color: inherit; }
.leaflet-left .leaflet-control { float: left; clear: both; } .leaflet-right .leaflet-control { float: right; clear: both; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.route-marker { display: grid; width: 24px; height: 24px; place-items: center; border: 3px solid #f7f5f1; border-radius: 50%; background: #3e3b36; color: #f7f5f1; box-shadow: 0 5px 12px rgba(40,38,35,.24); font-size: 9px; font-weight: 700; }
.leaflet-tooltip { position: absolute; padding: 5px 8px; border: 1px solid rgba(62,59,54,.12); border-radius: 8px; background: rgba(247,245,241,.94); box-shadow: 0 5px 14px rgba(40,38,35,.12); color: var(--ink); white-space: nowrap; pointer-events: none; }
.route-map-loading { height: 100%; display: grid; place-items: center; color: var(--muted); }
.route-stop a { color: inherit; text-underline-offset: 3px; }
.route-stop { position: relative; padding-left: 25px; }
.route-stop::before { content: ""; position: absolute; left: 4px; top: .45em; width: 9px; height: 9px; border: 2px solid #777269; border-radius: 50%; background: var(--white); }
.route-stop:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 16px; bottom: -12px; width: 1px; background: #c7c2b8; }
.route-day, .item-note { color: var(--muted); font-size: 10px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check-row input { margin-top: 3px; accent-color: #3e3b36; }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice { padding: 7px 11px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--white); color: var(--muted); font-size: 11px; }
.choice.selected { background: #3e3b36; color: #f7f5f1; }
.unavailable { color: var(--muted); font-size: 12px; }

.loading-state, .error-state { min-height: 55vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.loading-state p, .error-state p { max-width: 45ch; color: var(--muted); font-size: 13px; line-height: 1.7; }
.axiom-loader { font-size: 36px; animation: breathe 1.5s ease-in-out infinite alternate; }
.error-state h1 { max-width: 620px; }
.home-button { margin-top: 18px; background: #33312d; color: #f4f2ee; }
footer { display: flex; justify-content: space-between; gap: 14px; padding: 18px 26px 10px; color: var(--muted); font-size: 10.5px; }
footer a { color: inherit; text-decoration: none; }

body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  padding: 28px;
  background: rgba(28, 27, 25, .84);
  backdrop-filter: blur(22px) saturate(.8);
  animation: lightbox-in .28s ease both;
}
.lightbox-stage { min-width: 0; max-width: min(1400px, 100%); max-height: calc(100vh - 56px); margin: auto; display: grid; justify-items: center; gap: 12px; }
.lightbox-stage img { display: block; max-width: 100%; max-height: calc(100vh - 105px); object-fit: contain; border-radius: 18px; box-shadow: 0 34px 100px rgba(0, 0, 0, .42); animation: lightbox-image-in .42s var(--ease) both; }
.lightbox-stage figcaption { max-width: 70ch; color: rgba(255, 255, 255, .72); font-size: 11px; text-align: center; }
.lightbox-control { z-index: 2; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; color: #fff; background: rgba(255,255,255,.09); font: 26px/1 -apple-system, sans-serif; cursor: pointer; transition: transform .25s var(--ease), background .25s ease; }
.lightbox-control:hover { transform: scale(1.08); background: rgba(255,255,255,.17); }
.lightbox-close { position: absolute; top: 22px; right: 22px; font-size: 23px; }
.lightbox-previous { justify-self: start; }
.lightbox-next { justify-self: end; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes breathe { to { opacity: .35; transform: rotate(8deg) scale(.94); } }
@keyframes lightbox-in { from { opacity: 0; } }
@keyframes lightbox-image-in { from { opacity: 0; transform: scale(.965) translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media (max-width: 620px) {
  :root { --r-xl: 31px; --r-md: 20px; }
  body { padding: 8px; }
  .share-topbar { min-height: 60px; }
  .share-panel { padding-left: 15px; padding-right: 15px; }
  .message-user { width: 94%; }
  .bar-row { grid-template-columns: 76px 1fr; }
  .bar-value { display: none; }
  footer { align-items: flex-start; flex-direction: column; padding-left: 16px; }
  .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 16px 8px; }
  .lightbox-control { width: 36px; height: 36px; }
}
