/* ==========================================================
   Where's Andy's Jersey?
   Broadcast-graphics look: ink bars with cut corners over a pale
   map, stitched jersey-number patches for every stop.
   ========================================================== */

@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap;
  src: url("../vendor/fonts/barlow-condensed-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../vendor/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../vendor/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../vendor/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #0f1722;
  --ink-2: #1b2a3f;
  --chalk: #eef1f4;
  --crimson: #d8283c;
  --gold: #f2b705;
  --blue: #2f8fe0;
  --muted: #a9b6c8;
  --stitch: #3a4d6a;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dock-h: 96px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--body); background: var(--ink); color: var(--chalk); overflow: hidden; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

#map { position: fixed; inset: 0; background: #dde5ea; }
.map-error { max-width: 60ch; margin: 22vh auto 0; padding: 0 24px; color: var(--ink); font-size: 17px; line-height: 1.5; }

/* ---------- masthead: wordmark + score bug + filters ---------- */
.masthead {
  position: fixed; z-index: 1200; top: 14px; left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  pointer-events: none;
}
.masthead > * { pointer-events: auto; }

.brand { display: flex; align-items: stretch; flex-wrap: wrap; filter: drop-shadow(0 6px 14px rgba(8, 14, 24, .35)); }

.wordmark {
  margin: 0; display: flex; flex-direction: column;
  background: var(--ink); color: var(--chalk);
  padding: 8px 28px 9px 16px; border-left: 6px solid var(--crimson);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; line-height: .9;
}
.wordmark .small { font-size: clamp(15px, 2.2vw, 20px); letter-spacing: .05em; }
.wordmark .big { font-size: clamp(34px, 5vw, 50px); }

.scorebug {
  display: flex; align-items: center; gap: 20px;
  margin-left: -12px; padding: 6px 22px 6px 28px;
  background: var(--chalk); color: var(--ink);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%);
}
.stat { display: flex; flex-direction: column; line-height: 1; }
.stat b { font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(26px, 3.4vw, 34px); font-variant-numeric: tabular-nums; }
.stat span { margin-top: 2px; font-size: 12px; color: #44546a; }

.actions { display: flex; align-items: flex-start; gap: 6px; }
.gallery-wrap { filter: drop-shadow(0 6px 14px rgba(8, 14, 24, .35)); }
.filters { position: relative; filter: drop-shadow(0 6px 14px rgba(8, 14, 24, .35)); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  background: var(--ink); color: var(--chalk); border: 0; cursor: pointer;
  padding: 11px 20px 11px 26px; font-size: 15px; font-weight: 700;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
}
.chip:hover { background: var(--ink-2); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 12px; }
.count[hidden] { display: none; }

.panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(300px, calc(100vw - 28px));
  display: grid; gap: 14px; padding: 18px 16px 16px;
  background: var(--ink); color: var(--chalk);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.panel[hidden] { display: none; }
.field { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.field select {
  width: 100%; min-height: 40px; padding: 6px 10px;
  background: var(--ink-2); color: var(--chalk); border: 1px solid var(--stitch); border-radius: 0;
  font: inherit; font-size: 15px;
}
.check { display: flex; align-items: center; gap: 10px; min-height: 28px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--crimson); }
.linklike { justify-self: start; padding: 0; background: none; border: 0; color: var(--gold); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike[hidden] { display: none; }

.legend { list-style: none; margin: 2px 0 0; padding: 14px 0 0; border-top: 2px dashed var(--stitch); display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 16px; height: 16px; }
.sw-stop { border-radius: 50%; background: var(--crimson); }
.sw-office { border-radius: 50%; background: var(--gold); }
.sw-hub { width: 13px; height: 13px; margin: 0 2px; background: var(--blue); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }

/* ---------- dock: last seen + timeline + replay ---------- */
.dock {
  position: fixed; z-index: 1200; left: 14px; right: 14px; bottom: 28px;
  display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: 12px 18px 12px 20px;
  background: var(--ink); color: var(--chalk);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.lastseen {
  all: unset; box-sizing: border-box; cursor: pointer; min-width: 0;
  display: grid; gap: 2px; padding: 2px 4px 2px 12px; border-left: 4px solid var(--crimson);
}
.lastseen:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ls-label { font-size: 12px; color: var(--muted); }
.ls-place { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-date { font-size: 13px; color: var(--muted); }

.track { min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 8px 6px 22px; scrollbar-width: thin; scrollbar-color: var(--stitch) transparent; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; width: 100%; min-width: max-content; display: flex; justify-content: space-between; gap: 12px; }
.timeline::before { content: ""; position: absolute; left: 14px; right: 14px; top: 50%; border-top: 2px dashed var(--stitch); transform: translateY(-1px); }
.timeline li { position: relative; }
.yr { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; }

.play {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px;
  background: var(--crimson); color: #fff; border: 0; cursor: pointer;
  padding: 12px 26px 12px 22px; font-size: 15px; font-weight: 700;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.play:hover { background: #e23a4e; }
.play:disabled { background: var(--stitch); color: var(--muted); cursor: default; }
.play.paused { background: var(--gold); color: var(--ink); }
.play.paused:hover { background: #ffd23d; }

/* ---------- jersey-number patches (map markers, timeline, popups) ---------- */
.patch, .tick {
  --p: var(--crimson); --t: #fff;
  position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--p); color: var(--t);
  font-family: var(--display); font-style: italic; font-weight: 700; font-size: 17px; line-height: 1;
}
.patch::after, .tick::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1.5px dashed currentColor; opacity: .75; pointer-events: none; }
.patch.office, .tick.office { --p: var(--gold); --t: var(--ink); }

.patch.on-map { width: 32px; height: 32px; box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(8, 14, 24, .4); }
.tick { z-index: 1; padding: 0; border: 0; cursor: pointer; box-shadow: 0 0 0 4px var(--ink); transition: transform .12s ease; }
.tick:hover { transform: scale(1.12); }
.tick.active { box-shadow: 0 0 0 4px var(--ink), 0 0 0 7px var(--gold); }
.tick:disabled { opacity: .25; cursor: default; transform: none; }
.tick:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }

.jersey-pin { width: 36px; height: 48px; filter: drop-shadow(0 3px 5px rgba(8, 14, 24, .45)); }
.pulse { animation: pulse 2.2s ease-in-out infinite; transform-origin: center; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.hub-pin { filter: drop-shadow(0 2px 3px rgba(8, 14, 24, .5)); }

/* ---------- popup cards ---------- */
.leaflet-popup-content-wrapper { padding: 0; background: transparent; border-radius: 0; box-shadow: none; filter: drop-shadow(0 8px 18px rgba(8, 14, 24, .45)); }
.leaflet-popup-content { margin: 0 !important; width: min(340px, calc(100vw - 48px)) !important; }
.leaflet-popup-tip { background: var(--ink); box-shadow: none; }

.card { background: var(--ink); color: var(--chalk); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
.card .photo { position: relative; }
.card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ink-2); }
.card .photo .patch { position: absolute; left: 16px; bottom: -27px; width: 54px; height: 54px; font-size: 30px; box-shadow: 0 0 0 4px var(--ink); }
.card .body { padding: 38px 22px 20px; }
.card h3 { margin: 0; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 36px; line-height: 1; }
.card .place { margin: 10px 0 0; font-size: 16px; font-weight: 700; color: var(--gold); }
.card .date { margin: 3px 0 12px; font-size: 14px; color: var(--muted); }
.card .blurb { margin: 0; font-size: 16px; line-height: 1.5; }
.card .badge { display: inline-block; margin-top: 10px; padding: 3px 11px; background: var(--gold); color: var(--ink); font-size: 13px; font-weight: 700; }
.card .more { margin: 12px 0 0; }
.leaflet-container .card a { color: var(--chalk); font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* photo gallery (stops with several photos) */
.card.gallery img { aspect-ratio: 3 / 2; object-position: 50% 12%; }
.card.gallery .blurb { font-size: 15px; line-height: 1.45; }
.card .nav { position: absolute; top: 50%; width: 42px; height: 42px; margin-top: -21px; padding: 0 0 4px; border: 2px solid #fff; border-radius: 50%; background: rgba(15, 23, 34, .72); color: #fff; font: 700 30px/1 var(--body); cursor: pointer; }
.card .nav:hover, .card .nav:focus-visible { background: var(--crimson); outline: none; }
.card .nav.prev { left: 10px; }
.card .nav.next { right: 10px; }
.card .count-chip { position: absolute; top: 8px; right: 26px; padding: 2px 10px; background: rgba(15, 23, 34, .78); color: #fff; font-size: 13px; font-weight: 700; border-radius: 12px; }
.card .caption { margin: 12px 0 0; padding-left: 12px; border-left: 3px solid var(--gold); min-height: 4.5em; font-size: 16px; font-style: italic; line-height: 1.5; }
.card .blurb + .caption { margin-top: 10px; }

.card.hub .body { padding: 18px 22px 20px; border-top: 4px solid var(--blue); }
.card.hub h3 { font-size: 28px; }

/* ---------- Leaflet controls, restyled ---------- */
.leaflet-bar { border: 0; border-radius: 0; box-shadow: 0 4px 12px rgba(8, 14, 24, .3); }
.leaflet-bar a, .leaflet-bar a:hover { background-color: var(--ink); color: var(--chalk); border-bottom: 1px solid var(--stitch); border-radius: 0; }
.leaflet-bar a:hover { background-color: var(--ink-2); }
.leaflet-bottom.leaflet-right .leaflet-control-zoom { margin-bottom: calc(var(--dock-h) + 40px); }
.leaflet-control-attribution { background: rgba(238, 241, 244, .88) !important; font-size: 11px; }
.leaflet-tooltip { background: var(--ink); color: var(--chalk); border: 0; border-radius: 0; box-shadow: none; font-size: 13px; font-weight: 700; padding: 5px 9px; }
.leaflet-tooltip-top::before { border-top-color: var(--ink); }


/* ---------- gallery pop-out: "The Story" + "The Gallery" ---------- */
.gdialog {
  width: min(1180px, calc(100vw - 24px)); height: min(780px, calc(100vh - 24px)); max-width: none; max-height: none;
  padding: 0; border: 0; background: transparent; color: var(--chalk); overflow: visible;
}
.gdialog::backdrop { background: rgba(8, 14, 24, .62); }
.gdialog[open] { display: block; }
.gframe {
  position: relative; height: 100%; display: grid; grid-template-columns: minmax(250px, 2fr) 3fr; gap: 14px;
  padding: 16px; background: var(--ink);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.gpane { min-height: 0; display: flex; flex-direction: column; padding: 18px 18px 16px; background: var(--ink-2); border: 2px dashed var(--stitch); border-radius: 12px; }
.gh { margin: 0; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 34px; line-height: 1; }
.gclose {
  position: absolute; top: 6px; right: 8px; z-index: 2; width: 38px; height: 38px; padding: 0 0 3px;
  background: transparent; border: 0; color: var(--chalk); font: 400 30px/1 var(--body); cursor: pointer;
}
.gclose:hover { color: var(--gold); }

/* story */
.gstory { overflow: auto; }
.story-body { margin-top: 12px; font-size: 15px; line-height: 1.65; }
.story-body .kicker { margin: 0 0 10px; color: var(--gold); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.story-body p { margin: 0 0 12px; }
.story-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 14px; padding: 14px 0; border-top: 2px dashed var(--stitch); border-bottom: 2px dashed var(--stitch); }
.story-numbers div { display: flex; flex-direction: column; line-height: 1; }
.story-numbers b { font-family: var(--display); font-style: italic; font-size: 30px; font-variant-numeric: tabular-nums; }
.story-numbers span { margin-top: 3px; font-size: 12px; color: var(--muted); }
.story-trail { margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.story-trail li { margin: 0 0 4px; }
.story-trail b { color: var(--chalk); }
.story-link { display: inline-block; margin-top: 4px; padding: 9px 16px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%); }
.story-link:hover { background: #ffd23d; }

/* gallery */
.ghead { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 16px; margin-right: 36px; }
.gcount { margin-left: auto; font-size: 13px; color: var(--muted); }
.ggrid { flex: 1; min-height: 0; margin-top: 14px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); grid-auto-rows: 118px; gap: 8px; align-content: start; padding: 2px 4px 2px 2px; }
.gthumb { position: relative; padding: 0; border: 0; background: var(--ink); cursor: pointer; overflow: hidden; }
.gthumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transition: transform .25s ease; }
.gthumb:hover img, .gthumb:focus-visible img { transform: scale(1.06); }
.gthumb .gtag { position: absolute; left: 0; bottom: 0; right: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 700; text-align: left; color: #fff; background: linear-gradient(transparent, rgba(8, 14, 24, .85)); opacity: 0; transition: opacity .2s; }
.gthumb:hover .gtag, .gthumb:focus-visible .gtag { opacity: 1; }
.gthumb:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

.gviewer { flex: 1; min-height: 0; margin-top: 12px; display: flex; flex-direction: column; }
.gviewer[hidden], .ggrid[hidden] { display: none; }
.gstage { position: relative; flex: 1; min-height: 120px; overflow: hidden; background: var(--ink); }
.gstage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gv-caption { margin: 12px 0 0; padding-left: 12px; border-left: 3px solid var(--gold); font-size: 16px; font-style: italic; line-height: 1.5; }
.gv-meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.gv-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gv-pos { min-width: 54px; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gbtn { min-height: 38px; padding: 6px 14px; background: var(--ink); color: var(--chalk); border: 2px solid var(--stitch); font: 700 14px var(--body); cursor: pointer; }
.gbtn:hover, .gbtn:focus-visible { border-color: var(--gold); }
.gbtn-hot { margin-left: auto; background: var(--crimson); border-color: var(--crimson); color: #fff; }
.gbtn-hot:hover, .gbtn-hot:focus-visible { background: #ef3d52; border-color: #fff; }

@media (max-width: 820px) {
  .gdialog { width: calc(100vw - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); }
  .gframe { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 10px; overflow: auto; }
  .gstory { max-height: 42vh; padding: 14px; }
  .gpane.ggallery { padding: 14px; }
  .gh { font-size: 28px; }
  .story-numbers b { font-size: 26px; }
  .ggrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); grid-auto-rows: 96px; }
  .gv-caption { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .gthumb img { transition: none; } }
@media (max-height: 860px) { /* shorter screens: slightly tighter card so it clears the top and bottom bars */
  .card.gallery img { aspect-ratio: 16 / 10; }
  .card h3 { font-size: 32px; }
  .card .body { padding-top: 36px; padding-bottom: 16px; }
  .card .blurb, .card.gallery .blurb { font-size: 14.5px; line-height: 1.4; }
  .card .caption { font-size: 15px; min-height: 4.2em; }
}
@media (max-height: 860px) and (max-width: 520px) { /* phones */
  .card.gallery img { aspect-ratio: 16 / 9; }
}
@media (max-height: 700px) { /* very short screens: wide photo, and the text scrolls inside the card */
  .card.gallery img { aspect-ratio: 2 / 1; }
  .card .body { max-height: calc(100vh - 480px); max-height: calc(100dvh - 480px); min-height: 90px; overflow-y: auto; }
}


/* ---------- "Are you Andy?" greeting ---------- */
.idialog { width: min(700px, calc(100vw - 24px)); max-width: none; padding: 0; border: 0; background: transparent; color: var(--chalk); overflow: visible; }
.idialog::backdrop { background: rgba(8, 14, 24, .74); backdrop-filter: blur(4px); }
.icard {
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; text-align: center;
  padding: 34px 36px 30px; background: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
  border-top: 8px solid var(--crimson);
}
.iask[hidden], .ijoke[hidden] { display: none; }

/* the question */
.intro-art { display: grid; place-items: center; height: 230px; }
.intro-jersey { width: 160px; height: 213px; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .5)); animation: float 3.2s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
.ititle { margin: 14px 0 0; font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(48px, 11vw, 76px); line-height: .95; }
.isub { margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.ibtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 26px; }
.ibtn { min-height: 58px; min-width: 150px; padding: 12px 30px; background: var(--ink-2); color: var(--chalk); border: 2px solid var(--stitch); font: 700 20px var(--body); cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.ibtn:hover, .ibtn:focus-visible { border-color: var(--gold); transform: translateY(-2px); }
.ibtn-hot { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.ibtn-hot:hover, .ibtn-hot:focus-visible { background: #ef3d52; border-color: #fff; }

/* the joke: a MISSING poster */
.ihi { margin: 0 0 14px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: clamp(34px, 7vw, 46px); line-height: 1; }
.poster {
  position: relative; margin: 0 auto; max-width: 520px; padding: 30px 28px 0; background: #f3eedf; color: var(--ink);
  transform: rotate(-1.2deg); box-shadow: 0 10px 26px rgba(0, 0, 0, .45); animation: slap .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes slap { from { opacity: 0; transform: rotate(5deg) scale(1.35); } to { opacity: 1; transform: rotate(-1.2deg) scale(1); } }
.tape { position: absolute; top: -12px; width: 86px; height: 26px; background: rgba(242, 183, 5, .55); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.tape-l { left: -22px; transform: rotate(-38deg); }
.tape-r { right: -22px; transform: rotate(38deg); }
.p-missing { margin: 0; font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(60px, 15vw, 96px); line-height: .85; color: var(--crimson); }
.p-name { margin: 2px 0 0; font-family: var(--display); font-style: italic; font-weight: 700; text-transform: uppercase; font-size: clamp(24px, 5.5vw, 34px); letter-spacing: .04em; }
.p-art { display: grid; place-items: center; margin: 10px 0 4px; }
.p-art svg { width: 104px; height: 139px; filter: grayscale(1) contrast(1.25); mix-blend-mode: multiply; opacity: .82; }
.p-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0 0; padding: 14px 0 0; border-top: 3px double var(--ink); text-align: left; font-size: 15px; line-height: 1.4; }
.p-facts dt { font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .06em; padding-top: 2px; color: #44546a; }
.p-facts dd { margin: 0; }
.p-reward { margin: 14px 0 0; padding: 8px 10px; background: var(--ink); color: var(--chalk); font-size: 15px; }
.p-reward b { color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.p-tabs { display: grid; grid-template-columns: repeat(5, 1fr); margin: 20px -28px 0; padding: 0; list-style: none; border-top: 2px dashed var(--ink); }
.p-tabs li {
  height: 150px; padding: 10px 6px; border-left: 2px dashed var(--ink);
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; justify-content: center; text-align: center; /* centred along and across the tab */
  font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: .01em;
}

@media (max-width: 560px) {
  .icard { padding: 30px 18px 26px; }
  .intro-art { height: 190px; }
  .intro-jersey { width: 130px; height: 173px; }
  .poster { padding: 26px 18px 0; }
  .p-tabs { margin: 18px -18px 0; }
  .p-tabs { margin-top: 12px; }
  .p-tabs li { height: 130px; padding: 8px 4px; font-size: 15px; }
  .p-art { margin: 4px 0 0; }
  .p-art svg { width: 70px; height: 93px; }
  .p-facts { margin-top: 8px; padding-top: 10px; font-size: 14px; }
  .p-facts dd { margin-bottom: 5px; }
  .p-reward { margin-top: 8px; font-size: 14px; }
  .ihi { margin-bottom: 10px; }
  .ibtns { margin-top: 16px; }
  .p-facts { grid-template-columns: 1fr; gap: 0; }
  .ibtn { min-width: 0; flex: 1 1 140px; }
}
@media (max-height: 880px) { /* short screens: a more compact poster so the buttons stay in view */
  .icard { padding-top: 22px; padding-bottom: 20px; }
  .intro-art { height: 170px; }
  .intro-jersey { width: 118px; height: 157px; }
  .ihi { margin-bottom: 8px; }
  .poster { padding-top: 20px; padding-bottom: 14px; }
  .p-missing { font-size: clamp(50px, 12vw, 70px); }
  .p-art svg { width: 64px; height: 85px; }
  .p-art { margin: 4px 0 0; }
  .p-facts { margin-top: 8px; padding-top: 10px; gap: 4px 16px; font-size: 14px; }
  .p-reward { margin-top: 10px; }
  .p-tabs { display: none; }
  .ibtns { margin-top: 16px; }
  .ibtn { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-jersey, .poster { animation: none; }
  .ibtn { transition: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .masthead { top: 10px; left: 10px; right: 10px; }
  .scorebug { gap: 14px; padding-right: 18px; }
  .dock { left: 10px; right: 10px; bottom: 26px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 12px 10px 14px; }
  .lastseen { grid-column: 1 / -1; }
  .play span { display: none; }
  .play { padding: 12px 22px 12px 20px; }
}
@media (max-width: 520px) {
  .brand { max-width: calc(100vw - 130px); }
  .scorebug { flex-basis: 100%; margin: -3px 0 0; padding: 6px 20px 6px 16px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  .tick { transition: none; }
}

/* ---------- flying jersey (replay) ---------- */
.flyer { pointer-events: none; }
.flyer-body { width: 44px; height: 58px; transform-origin: 50% 60%; will-change: transform; filter: drop-shadow(0 2px 2px rgba(8, 14, 24, .3)); }
.flyer-art { display: block; width: 100%; height: 100%; }
.flyer-shadow { position: absolute; left: 6px; right: 6px; bottom: -6px; height: 12px; border-radius: 50%; background: rgba(8, 14, 24, .35); filter: blur(3px); }
