/* Today's Expedition. Built on the arcade shell (arcade.css) and the hub's helpers (hub.css). */
.td-head { padding-block: 26px 4px; }
.td-head h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin-top: 8px; }
.td-pip { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: center; max-width: 760px; margin: 12px 0 4px; }
.td-pip-face { width: 76px; height: 76px; }
.td-pip-face svg { width: 100%; height: 100%; display: block; }
.td-pip-say { position: relative; margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line); box-shadow: var(--shadow); font-size: 1.05rem; line-height: 1.5; }
.td-pip-say::before { content: ''; position: absolute; left: -8px; top: 22px; width: 13px; height: 13px; background: var(--panel); border-left: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); transform: rotate(45deg); }
.td-pip-say b { font-family: var(--f-display); }
.td-notice { margin: 12px 0 0; padding: 6px 14px; border-radius: 12px; background: color-mix(in srgb, #F2B134 20%, var(--panel)); border: 1.5px solid color-mix(in srgb, #F2B134 55%, transparent); font-weight: 600; max-width: 760px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 44px; }
.td-notice a { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; font-weight: 800; color: var(--ink); }
.td-notice a svg { width: 18px; height: 18px; }
.td-warn { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--try-bg); color: var(--ink); max-width: 760px; }

/* the map and the route side by side; stacked on smaller screens */
.td-trip { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 18px; }
.td-mapfig { margin: 0; scroll-margin-top: 72px; }
/* on wide screens the map stays in view beside the route */
@media (min-width: 961px) and (min-height: 700px) { .td-mapcol { position: sticky; top: 76px; } }
.tdm-title { margin: 0 0 8px; color: var(--ink-2); font-size: .95rem; }
.tdm-title b { color: var(--ink); font-family: var(--f-display); font-size: 1.05rem; }
.td-mapnote { margin: 8px 2px 0; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.td-q { display: inline-grid; place-items: center; width: 22px; height: 16px; border-radius: 50%; border: 1.5px dashed #A8936A; background: #FFFDF6; color: #5F5236; font: 800 .72rem var(--f-ui); vertical-align: 1px; }
.td-mapwrap { border-radius: 24px; overflow: hidden; border: 2px solid #A8936A; box-shadow: var(--shadow-lift); background: #BCDDE6; }
.td-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.td-side-h { font-size: 1.35rem; }
div.td-side-h { display: grid; gap: 2px; } div.td-side-h h2 { font-size: 1.35rem; } div.td-side-h p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.td-route { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.td-stop { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px 12px 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.td-stop.next { box-shadow: 0 0 0 3px var(--accent-2), var(--shadow-lift); }
.td-stop.done { background: color-mix(in srgb, var(--good-bg) 60%, var(--panel)); }
.td-pin { position: absolute; top: -8px; left: -8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 72%, #000); color: #fff; font: 800 .88rem var(--f-display); border: 2px solid var(--panel); }
.td-stop.done .td-pin { background: var(--good); }
.td-stop-art { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--sky) 80%, #fff), var(--sky)); box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--accent) 35%, transparent); }
.td-stop-art svg { width: 60px; height: 60px; display: block; margin-top: 6px; }
.td-stop-body { display: grid; gap: 2px; min-width: 0; }
.td-kicker { font: 800 .68rem var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.td-stop-body b { font-family: var(--f-display); font-size: 1.2rem; line-height: 1.12; }
.td-stop-host { font-size: .86rem; color: var(--ink-2); font-weight: 600; }
.td-stop-meta { color: var(--ink-3); font-size: .88rem; }
.td-stop .td-go { min-height: 46px; padding: 0 16px; font-size: .98rem; }
.td-stop .td-go:not(.ar-btn-quiet) { background: var(--panel); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.td-route.is-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.td-route.is-compact .td-stop { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
.td-route.is-compact .td-stop-art { width: 48px; height: 48px; } .td-route.is-compact .td-stop-art svg { width: 46px; height: 46px; }
.td-route.is-compact .td-kicker, .td-route.is-compact .td-stop-host { display: none; }
.td-route.is-compact .td-stop-body b { font-size: 1.05rem; }
.td-route.is-compact .td-go { grid-column: auto; min-height: 44px; padding: 0 12px; font-size: .92rem; }
.td-cta .ar-btn { width: 100%; }
.td-cta-note { display: block; margin-top: 8px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.td-going { color: var(--try); font-weight: 700; }
.td-cta-head { margin-top: 14px; max-width: 520px; }
.td-cta-band { margin-bottom: 10px; }
.td-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.td-stars i { width: 22px; height: 22px; color: color-mix(in srgb, var(--ink-3) 35%, transparent); }
.td-stars i.on { color: #E8A317; }
.td-stars svg { width: 100%; height: 100%; display: block; }
.td-band { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; color: var(--ink-2); }
.td-band > span { flex-basis: 100%; }
.td-band .hub-chip { min-height: 44px; }
.td-bandnow { margin: 0; color: var(--ink-2); }
.td-bandhint { flex-basis: 100%; color: var(--ink-2); font-size: .86rem; }
.td-link { border: 0; background: none; padding: 0 6px; color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; cursor: pointer; min-height: 44px; min-width: 44px; }

/* the finish: flag, stamps, card */
.td-finish { display: grid; gap: 12px; padding: 20px; border-radius: 26px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.td-finish h2 { font-size: 1.55rem; }
.td-finish-sub { margin: -4px 0 0; color: var(--ink-2); }
.td-stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.td-stamp { display: grid; justify-items: center; gap: 2px; padding: 8px 6px 10px; border: 2.5px dashed var(--accent); border-radius: 12px; background: #FFFDF6; color: #1C1F26; transform: rotate(-2deg); text-align: center; }
.td-stamp:nth-child(2) { transform: rotate(1.6deg); } .td-stamp:nth-child(3) { transform: rotate(-.8deg); }
.td-stamp-face { width: 66px; height: 66px; }
.td-stamp-face svg { width: 100%; height: 100%; display: block; }
.td-stamp-t { font: 800 .92rem var(--f-display); }
.td-stamp .td-stars i { width: 18px; height: 18px; }
.td-stamp .td-stars i:not(.on) { color: rgba(23, 50, 74, .2); }
.td-finish.is-pending .td-stamp { visibility: hidden; }
/* while Pip walks, a button over the waiting stamps lets a child skip ahead */
.td-stampbox { position: relative; }
.td-skipwalk { position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content; max-width: 100%; min-height: 48px; }
.td-finish:not(.is-pending) .td-skipwalk { display: none; }
/* the stamps land one by one; they grow into place (never larger than they end up, never see-through) */
.td-finish.is-live .td-stamp { animation: tdStamp .45s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(.15s + var(--i) * .22s); }
@keyframes tdStamp { from { transform: scale(.35) rotate(-12deg); } }
.td-share { display: grid; gap: 10px; }
.td-card { margin: 4px 0 0; padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, #FFF8E8, #F6EBD2); color: #17324A; border: 2px solid #17324A; box-shadow: 4px 4px 0 #17324A; max-width: 460px; text-align: left; }
.td-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.td-card-top b { font: 800 1.2rem var(--f-display); }
.td-card-top span { font-size: .84rem; font-weight: 600; opacity: .85; }
.td-card-stops { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 8px; }
.td-card-stops li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; background: rgba(255, 255, 255, .65); border-left: 5px solid var(--accent); }
.td-card-em svg { width: 34px; height: 34px; display: block; }
.td-card-t { font-weight: 800; font-size: .95rem; text-align: left; }
.td-card .td-stars i { width: 20px; height: 20px; }
.td-card .td-stars i:not(.on) { color: rgba(23, 50, 74, .22); }
.td-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: #3D4F60; }
.td-share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.td-copied { min-height: 1.2em; margin: 0; font-weight: 700; color: #156B42; }
/* the darker green keeps the message above 4.5:1 on the light card; Night keeps its own green */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .td-copied { color: var(--good); } }
:root[data-theme="dark"] .td-copied { color: var(--good); }
.td-sharetext { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); font: 700 1rem var(--f-math); white-space: pre-line; overflow-wrap: anywhere; user-select: all; }
.td-preview img { display: block; width: min(100%, 300px); height: auto; border-radius: 14px; box-shadow: var(--shadow); }
.td-preview p { margin: 8px 0 0; font-size: .88rem; color: var(--ink-2); }
.td-again { margin-top: 30px; display: grid; gap: 14px; }

/* postcards */
.td-cards { margin-top: 40px; }
.td-sec-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.td-sec-h h2 { font-size: 1.5rem; }
.td-sec-h p { margin: 0; color: var(--ink-2); }
.td-album-intro { margin: 8px 0 0; color: var(--ink-2); max-width: 70ch; }
.td-hosts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.td-host { width: 100%; height: 100%; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); text-align: center; transition: transform .15s ease, border-color .15s; }
.td-host:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.td-host[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 18%, transparent); }
.td-host-face { position: relative; width: 66px; height: 66px; padding: 3px; border-radius: 8px; background: #FFFDF6; border: 2.5px dashed #C8A96A; }
.td-host-face svg { width: 100%; height: 100%; display: block; }
.td-host.empty .td-host-face svg { filter: brightness(0); opacity: .2; }
.td-host-n, .td-host-q { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; font: 800 .8rem var(--f-ui); border: 2px solid var(--panel); }
.td-host-n { background: #F2B134; color: #1C1F26; }
.td-host-q { background: var(--panel-2); color: var(--ink-2); }
.td-host-t { display: grid; gap: 1px; line-height: 1.15; }
.td-host { position: relative; }
.td-host-new { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 999px; background: #B4432A; color: #fff; font: 800 .66rem var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.td-host.is-new { border-color: #C8512E; }
.td-newcount { color: #A63B22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .td-newcount { color: #FF9A7A; } }
:root[data-theme="dark"] .td-newcount { color: #FF9A7A; }
.td-pc.got.is-new { box-shadow: 0 0 0 3px #C8512E, var(--shadow); }
.td-host-t b { font-family: var(--f-display); font-size: .95rem; }
.td-host-t small { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.td-hostpanel { margin-top: 14px; padding: 16px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: 80px; }
.td-hostpanel-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.td-hostpanel-h > div { display: grid; gap: 2px; min-width: 0; flex: 1 1 200px; }
.td-hostpanel-h b { font-family: var(--f-display); font-size: 1.15rem; }
.td-hostpanel-h span { color: var(--ink-2); font-size: .9rem; }
.td-hostpanel-face { width: 60px; height: 60px; flex: none; }
.td-hostpanel-face svg { width: 100%; height: 100%; display: block; }
.td-hostlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink); font-weight: 800; font-size: .92rem; text-decoration: none; }
.td-pcs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.td-pc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border-radius: 10px; font-size: .92rem; line-height: 1.42; }
.td-pc.got { color: #3E3424; background: repeating-linear-gradient(-45deg, #FFF8E8 0 12px, #FBF1DA 12px 24px); border: 1px solid #E7D7AE; box-shadow: var(--shadow); }
.td-pc.got:nth-child(odd) { transform: rotate(-.7deg); } .td-pc.got:nth-child(even) { transform: rotate(.6deg); }
.td-pc.got .td-pc-body span { font-style: italic; }
.td-pc.todo { grid-template-columns: minmax(0, 1fr); padding: 8px 12px; font-size: .86rem; line-height: 1.35; background: transparent; border: 1.5px dashed var(--line); color: var(--ink-2); }
.td-pc.todo p { margin: 0; } .td-pc.todo b { color: var(--ink); }
.td-pc-stamp { width: 58px; height: 58px; padding: 3px; background: #fff; border: 2.5px dashed #C8A96A; border-radius: 6px; }
.td-pc-stamp svg { width: 100%; height: 100%; display: block; }
.td-pc-body { display: grid; gap: 3px; }
.td-pc-body b { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.td-pc.got .td-pc-body b { color: #6B5B3A; }

/* the logbook */
.td-log { margin-top: 40px; }
.td-log-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.td-log-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.td-log-date { min-width: 130px; color: var(--ink-2); }
.td-log-date b { font-family: var(--f-display); color: var(--ink); margin-right: 4px; }
.td-log-stops { display: inline-flex; flex-wrap: wrap; gap: 12px; }
.td-log-stop { display: inline-flex; align-items: center; gap: 4px; }
.td-log-em svg { width: 28px; height: 28px; display: block; }
.td-log-n { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: .88rem; }
.td-log-n svg { width: 15px; height: 15px; color: #E8A317; }
.td-log-flag { margin-left: auto; color: var(--ink-2); font-size: .9rem; font-style: italic; }
.td-empty { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }
.td-more { margin-top: 6px; }
.td-thumbs-h { font-size: 1.1rem; margin-top: 18px; }
.td-thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.td-thumb { margin: 0; }
.td-thumb-map { border-radius: 14px; overflow: hidden; border: 1.5px solid #A8936A; box-shadow: var(--shadow); }
.td-thumb figcaption { margin-top: 6px; font-size: .86rem; color: var(--ink-2); }
.td-thumb figcaption b { color: var(--ink); }
.td-about { margin-top: 30px; }

@media (max-width: 960px) {
  .td-trip { grid-template-columns: 1fr; gap: 18px; }
  .td-route.is-compact { grid-template-columns: 1fr; }
  .td-hosts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .td-host { grid-template-columns: 52px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; padding: 8px 10px; }
  .td-host-face { width: 52px; height: 52px; }
}
/* short screens (a laptop under its browser bar): a tighter header, and the way in leads the route */
@media (max-height: 760px) and (min-width: 561px) {
  .td-head { padding-top: 18px; }
  .td-head h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
  .td-pip { grid-template-columns: 60px minmax(0, 1fr); margin-top: 8px; } .td-pip-face { width: 60px; height: 60px; }
  .td-pip-say { font-size: 1rem; padding: 9px 14px; }
  .td-trip { margin-top: 12px; }
}
@media (max-width: 560px) {
  .td-head { padding-top: 18px; }
  .td-pip { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
  .td-pip-face { width: 58px; height: 58px; }
  .td-pip-say { font-size: .98rem; padding: 10px 12px; }
  .td-mapwrap { border-radius: 18px; }
  .td-stop { grid-template-columns: 52px minmax(0, 1fr); padding: 12px; }
  .td-stop-art { width: 52px; height: 52px; } .td-stop-art svg { width: 50px; height: 50px; }
  .td-stop .td-go { grid-column: 2; justify-self: start; min-height: 44px; }
  .td-stop:not(.done) .td-stop-meta:not(:has(.td-going)) { display: none; }
  .td-route.is-compact .td-stop { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .td-route.is-compact .td-stop-art { width: 44px; height: 44px; }
  .td-route.is-compact .td-go { grid-column: auto; justify-self: end; }
  .td-finish { padding: 16px; }
  .td-stamp-face { width: 54px; height: 54px; }
  .td-share-row .ar-btn { flex: 1 1 100%; }
  .td-log-flag { margin-left: 0; flex-basis: 100%; font-size: .86rem; }
  .td-log-row { gap: 4px 10px; padding: 8px 12px; } .td-log-date { min-width: 0; } .td-log-stops { gap: 8px; } .td-log-em svg { width: 24px; height: 24px; }
}
@media (max-width: 360px) { .td-hosts { grid-template-columns: 1fr 1fr; gap: 8px; } .td-host { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
@media (prefers-reduced-motion: reduce) { .td-pc.got, .td-stamp { transform: none !important; } .td-finish.is-live .td-stamp { animation: none; } .td-host { transition: none; } }
:root[data-motion="reduced"] .td-finish.is-live .td-stamp { animation: none; }
:root[data-motion="reduced"] .td-pc.got, :root[data-motion="reduced"] .td-stamp { transform: none !important; }
