:root {
  --ink: #F6F2E8;
  --ink-raised: #FFFFFF;
  --ink-raised-2: #EFE9DB;
  --hairline: #DAD2BE;
  --parchment: #201B12;
  --parchment-dim: #6B6352;
  --gold: #96701F;
  --brick: #A14B3A;
  --sage: #4F6144;
  --teal: #2F6E6E;
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
}
:root { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-padding-top: calc(124px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0; background: var(--ink); color: var(--parchment);
  font-family: var(--font-body); line-height: 1.5;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 18px; }

header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; max-width: 640px; margin: 0 auto;
}
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 19px; display: flex; align-items: baseline; gap: 7px; text-decoration: none; }
.wordmark .sub { font-family: var(--font-body); font-size: 11px; color: var(--parchment-dim); font-weight: 500; }
/* Logo is 334x100; on narrow phones it shrinks (keeping its ratio) to leave room for the menu button. */
.header-logo { display: block; line-height: 0; flex: 0 1 334px; min-width: 0; }
.header-logo img { width: 100%; max-width: 334px; height: auto; border-radius: 6px; }
.header-row .menu-btn, .header-row .chip { flex: none; margin-left: 12px; }
.icon-btn, .menu-btn {
  background: none; border: 1px solid var(--hairline); color: var(--parchment);
  width: 38px; height: 38px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.owned-badge { cursor: default; color: var(--sage); border-color: var(--sage); }
.icon-btn svg, .menu-btn svg { width: 18px; height: 18px; }

nav.drawer {
  position: fixed; inset: 0; z-index: 50; background: var(--ink);
  padding: env(safe-area-inset-top, 0px) 18px env(safe-area-inset-bottom, 0px);
  transform: translateX(100%); transition: transform 0.28s ease; overflow-y: auto;
}
nav.drawer.open { transform: translateX(0); }
.drawer-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hairline); margin-bottom: 8px; }
.drawer-list { list-style: none; margin: 0; padding: 8px 0 40px; }
.drawer-list li a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--hairline); text-decoration: none; font-size: 16px; }
.ext-icon { display: inline-block; width: 14px; height: 14px; margin-left: 4px; vertical-align: -1px; opacity: 0.75; }
.drawer-list .eyebrow { padding: 22px 4px 8px; font-size: 12px; color: var(--gold); font-weight: 600; }

.breadcrumb { padding: 14px 0 0; font-size: 12.5px; color: var(--parchment-dim); display: flex; gap: 6px; flex-wrap: wrap; line-height: 1.6; }
.breadcrumb a { text-decoration: none; color: var(--parchment-dim); }
.breadcrumb .current { color: var(--parchment); }

.hero, .tour-hero, .show-hero { padding: 36px 0 28px; position: relative; overflow: hidden; }
.hero h1, .tour-hero h1, .show-hero h1 {
  font-family: var(--font-display); font-weight: 500; line-height: 1.1; margin: 0 0 10px; position: relative;
}
.hero h1 { font-size: clamp(30px, 8vw, 42px); max-width: 11ch; }
.tour-hero h1 { font-size: clamp(28px, 7.5vw, 38px); }
.show-hero h1 { font-size: clamp(24px, 6.5vw, 32px); }
.hero p.lede, .tour-hero p.desc, .show-hero .subtitle {
  font-size: 15px; color: var(--parchment-dim); max-width: 44ch; margin: 0 0 20px;
}

.tour-badge, .show-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--teal);
  border: 1px solid var(--teal); border-radius: 100px; padding: 3px 10px; margin-bottom: 14px;
}

.search-box { position: relative; display: flex; align-items: center; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 12px; padding: 4px 4px 4px 14px; }
.search-box input { flex: 1; background: none; border: none; color: var(--parchment); font-size: 15px; font-family: var(--font-body); padding: 11px 6px; outline: none; }
.search-box input::placeholder { color: var(--parchment-dim); }
.search-box button { background: var(--gold); color: var(--ink); border: none; border-radius: 9px; padding: 10px 16px; font-weight: 600; font-size: 14px; font-family: var(--font-body); cursor: pointer; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 12px; }
.chip { flex: none; font-size: 13px; padding: 7px 13px; border-radius: 100px; border: 1px solid var(--hairline); color: var(--parchment-dim); white-space: nowrap; text-decoration: none; }
/* Artist buttons on the home page: each line centred, wrapping only if a
   line is wider than the screen. */
.chip.active { border-color: var(--gold); color: var(--gold); }

section { padding: 28px 0; border-top: 1px solid var(--hairline); }
section:first-of-type { border-top: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 15px; gap: 10px; }
.section-head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 500; margin: 0; }
.section-head a.see-all { font-size: 13px; color: var(--gold); text-decoration: none; white-space: nowrap; }
.result-count { font-size: 13px; color: var(--parchment-dim); }

.otd-card, .source-card, .stat {
  background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 14px; padding: 16px;
}
/* No gap existed between multiple recordings of the same date before this --
   .source-card had no margin at all, so they rendered flush against each
   other. Scoped to .source-card specifically rather than added to the
   shared rule above, so .otd-card and .stat (which sit in different
   layouts, e.g. .stat inside a grid with its own gap) aren't affected. */
.source-card {
  margin-bottom: 16px;
}
.source-card:last-child {
  margin-bottom: 0;
}
/* Video recordings: pictures from videopics/, two per row, each scaled to fit
   its half of the card. */
.video-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.video-pics a { display: block; }
/* Show-photos thumbnail under the previous/next buttons: one 75px-tall image. */
.thumb-groups { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.video-pics.photo-thumb { display: block; margin: 0; }
.photo-caption { display: block; margin-top: 4px; font-size: 12px; color: var(--parchment-dim); text-align: center; }
.video-pics.photo-thumb a { display: flex; flex-direction: column; align-items: center; cursor: zoom-in; }
.video-pics.photo-thumb a[hidden] { display: none; }
.video-pics.photo-thumb img { width: auto; height: 75px; }
.video-pics img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--hairline); background: var(--ink-raised-2); }

/* Pop-up picture viewer (a <dialog>, driven by the script in layout.php). */
.lightbox { border: none; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.88); }
.lb-frame { position: relative; display: block; line-height: 0; }
.lb-credit { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 10px; border-radius: 100px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; line-height: 1.4; text-align: right; }
.lb-credit[hidden] { display: none; }
.lb-img { display: block; max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6); }
.lb-btn { position: fixed; background: rgba(0, 0, 0, 0.55); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%; width: 44px; height: 44px; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 3px; }
.lb-btn:hover { background: rgba(0, 0, 0, 0.8); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
.lb-count { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }

/* Per-recording comments / show memories: capped at 10 lines (10 x the 1.6
   line-height, in the element's own 13px font) and scrollable for the rest. */
.rec-text-block { margin-top: 12px; }
.rec-text-label { font-size: 11.5px; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.rec-text {
  font-size: 14px; line-height: 1.6; color: var(--parchment-dim);
  max-height: calc(10 * 1.6em); overflow-y: auto;
  background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 10px; padding: 8px 12px;
  overflow-wrap: anywhere;
}
/* Same text colour and size as the track listing (.setlist): stored legacy
   markup (<font color>, inline styles, <b>) must not override it. */
.rec-text *, .rec-text a { color: inherit !important; font-size: inherit !important; }
/* A recording reached through its direct link (#recording-N) gets a gold
   outline so it's obvious which one the link points at. */
.source-card:target {
  border-color: var(--gold);
}
.otd-date { font-family: var(--font-display); font-size: 15px; color: var(--gold); margin: 0 0 10px; }
.otd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.otd-list li { display: flex; gap: 12px; font-size: 14px; align-items: baseline; }
.otd-list .yr { font-weight: 600; min-width: 40px; }
.otd-list .where { color: var(--parchment-dim); }

.era-rail { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 10px; }
.era-card { flex: none; width: 150px; border-radius: 14px; padding: 16px; border: 1px solid var(--hairline); text-decoration: none; color: var(--parchment); background: linear-gradient(160deg, var(--ink-raised-2), var(--ink-raised)); }
.era-card .years { font-size: 12px; color: var(--parchment-dim); margin-bottom: 26px; }
.era-card .name { font-family: var(--font-display); font-size: 17px; font-weight: 500; line-height: 1.2; }

/* Artist label at the top of an era card: same size/font as the tour name
   (.name), in gold so the two read as different things. */
.era-card .name.artist { color: var(--gold); margin-bottom: 10px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat .num { font-family: var(--font-display); font-size: 21px; }
.stat .label { font-size: 11.5px; color: var(--parchment-dim); margin-top: 2px; }

.setlist-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 12px; padding: 13px 16px; color: var(--parchment); font-family: var(--font-body); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.setlist-toggle svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.setlist-toggle.open svg { transform: rotate(180deg); }
.setlist-body { display: none; background: var(--ink-raised); border: 1px solid var(--hairline); border-top: none; border-radius: 0 0 12px 12px; margin-top: -1px; padding: 4px 16px 14px; }
.setlist-body.open { display: block; }
.setlist-body ol, .setlist ol { margin: 10px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--parchment-dim); }
.setlist ol { font-size: 14px; }
.setlist li { padding: 7px 0; border-bottom: 1px solid var(--hairline); list-style: decimal; }
.setlist li:last-child { border-bottom: none; }
.encore-label { display: block; font-size: 11.5px; color: var(--gold); margin: 14px 0 2px; font-weight: 600; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.filter-bar .search-input { flex: 1; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; color: var(--parchment); font-family: var(--font-body); font-size: 14px; }
.filter-bar select { background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 10px; color: var(--parchment); font-family: var(--font-body); font-size: 13px; padding: 0 10px; }

.show-card { display: block; text-decoration: none; color: var(--parchment); background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.show-top { display: flex; gap: 14px; }
.media-icons { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; color: var(--gold); }
.media-icon svg { display: block; width: 20px; height: 20px; }
.show-date { flex: none; width: 52px; text-align: center; background: var(--ink-raised-2); border-radius: 9px; padding: 7px 4px; }
.show-date .d { font-family: var(--font-display); font-size: 18px; line-height: 1; }
.show-date .m { font-size: 10.5px; color: var(--parchment-dim); text-transform: uppercase; margin-top: 2px; }

/* A solid gold date badge means "at least one recording exists for this
   date" -- deliberately bold rather than a subtle tint, since the whole
   point is scanning a list of 100+ dates at a glance and immediately
   picking out which ones have something to listen to. */
.show-date.cancelled .d, .show-date.cancelled .m { text-decoration: line-through; text-decoration-thickness: 2px; }
.show-date.has-recording { background: var(--gold); }
.show-date.has-recording .d { color: var(--ink); }
.show-date.has-recording .m { color: var(--ink); opacity: 0.72; }
.show-info { flex: 1; min-width: 0; }
.show-venue { font-weight: 600; font-size: 14.5px; margin: 0 0 2px; }
.show-place { font-size: 12.5px; color: var(--parchment-dim); margin: 0; }
.show-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 100px; border: 1px solid var(--hairline); color: var(--parchment-dim); }
.tag.sbd, .source-tag.sbd { color: var(--sage); border-color: var(--sage); }
.tag.broadcast, .source-tag.broadcast { color: var(--teal); border-color: var(--teal); }
.tag.video, .source-tag.video { color: var(--gold); border-color: var(--gold); }

.load-more, .pagination a { width: 100%; display: block; text-align: center; text-decoration: none; background: none; border: 1px solid var(--hairline); color: var(--parchment); border-radius: 10px; padding: 13px; font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; }

.artist-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.artist-card { background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--parchment); }
.artist-card .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink-raised-2); border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 15px; color: var(--gold); margin-bottom: 12px; }
.artist-card .name { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.artist-card .latest { font-size: 12px; color: var(--parchment-dim); }

.news-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.news-item:last-child { border-bottom: none; }
.news-date { flex: none; width: 50px; font-size: 12px; color: var(--gold); padding-top: 2px; font-weight: 600; }
.news-item h4 { font-size: 14.5px; font-weight: 600; margin: 0 0 4px; }
.news-item p { font-size: 13px; color: var(--parchment-dim); margin: 0; }

.community { background: var(--ink-raised); border-radius: 16px; padding: 22px 18px; }
.community h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin: 0 0 8px; }
.community p { font-size: 14px; color: var(--parchment-dim); margin: 0 0 16px; max-width: 42ch; }
.btn-outline { display: inline-block; border: 1px solid var(--gold); color: var(--gold); text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: 9px; }

.nav-prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pn-link { text-decoration: none; color: var(--parchment); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; }
.pn-link .pn-label { font-size: 10.5px; color: var(--parchment-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.pn-link .pn-value { font-size: 13px; font-weight: 600; margin-top: 2px; }
.pn-link.next { text-align: right; }

.source-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.source-name { font-weight: 600; font-size: 15px; }
.source-tag { flex: none; font-size: 11px; padding: 3px 9px; border-radius: 100px; font-weight: 600; border: 1px solid var(--hairline); color: var(--parchment-dim); }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; margin-bottom: 12px; }
.source-grid dt { color: var(--parchment-dim); font-size: 11.5px; margin: 0; }
.source-grid dd { margin: 1px 0 0; font-weight: 500; }
.rating { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--parchment-dim); }
.rating .stars { color: var(--gold); letter-spacing: 1px; }
.source-note { font-size: 12.5px; color: var(--parchment-dim); margin-top: 10px; border-top: 1px solid var(--hairline); padding-top: 10px; }

.photo-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 0 18px; }

/* Unconditional and deliberately loud (gold, 10px) rather than gated behind
   a hover/pointer media query -- two attempts at hiding this on touch and
   showing it only for a "real mouse" didn't actually show up in testing on
   a real Windows Chrome setup, so this drops that condition rather than
   keep guessing why it wasn't matching. Always-visible is a safe fallback:
   it's a normal, accepted pattern on touch too (plenty of sites show a
   scroll hint on horizontal card rows), just not strictly necessary there. */
.chip-row, .era-rail, .photo-row {
  scrollbar-width: auto;
  scrollbar-color: var(--gold) var(--ink-raised-2);
}
.chip-row::-webkit-scrollbar, .era-rail::-webkit-scrollbar, .photo-row::-webkit-scrollbar {
  height: 10px;
}
.chip-row::-webkit-scrollbar-thumb, .era-rail::-webkit-scrollbar-thumb, .photo-row::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 100px;
  border: 2px solid var(--ink-raised-2);
}
.chip-row::-webkit-scrollbar-track, .era-rail::-webkit-scrollbar-track, .photo-row::-webkit-scrollbar-track {
  background: var(--ink-raised-2);
  border-radius: 100px;
}
/* Touch-only devices (no mouse or trackpad of any kind: a touch laptop keeps its\n   normal scrollbar): phones draw their own overlay scrollbar, which hides until
   you swipe and cannot be forced visible with CSS. So on touch screens the
   native bar is switched off and a small always-visible indicator (built by
   the script in layout.php, one under each scrolling row) takes its place. */
.scroll-indicator { display: none; }
/* Artist buttons on the home page: space between the row and the tour cards. */
.artist-row { margin-top: 0; margin-bottom: 24px; }
@media (hover: none) and (pointer: coarse) and (not (any-hover: hover)) {
  .chip-row, .era-rail, .photo-row { scrollbar-width: none; }
  .chip-row::-webkit-scrollbar, .era-rail::-webkit-scrollbar, .photo-row::-webkit-scrollbar { display: none; }
  .scroll-indicator { display: block; position: relative; height: 12px; margin: 6px 0 12px; touch-action: none; cursor: pointer; background: var(--ink-raised-2); border-radius: 100px; }
  .scroll-indicator[hidden] { display: none; }
  /* On touch the indicator sits between the row and the cards, so the gap moves below it. */
  .artist-row { margin-bottom: 0; }
  .artist-row + .scroll-indicator { margin-bottom: 24px; }
  /* Keeps the same gap on wide tablets where the row fits and needs no scrolling. */
  .artist-row + .scroll-indicator[hidden] { display: block; visibility: hidden; }
  .scroll-indicator > span { position: absolute; top: 0; bottom: 0; left: 0; min-width: 24px; background: var(--gold); border-radius: 100px; }
}
.photo-tile { flex: none; width: 120px; height: 84px; border-radius: 10px; background: var(--ink-raised-2); border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; color: var(--parchment-dim); font-size: 11px; text-align: center; padding: 6px; }

.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.comment:last-child { border-bottom: none; }
.comment .avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink-raised-2); border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 12.5px; color: var(--gold); }
.comment-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; }
.comment-name { font-weight: 600; font-size: 13.5px; }
.comment-date { font-size: 11.5px; color: var(--parchment-dim); }
.comment-text { font-size: 13.5px; color: var(--parchment-dim); margin: 0; }
.comment-form { margin-top: 14px; }
.comment-form textarea, .comment-form input[type=text] { width: 100%; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 10px; color: var(--parchment); font-family: var(--font-body); font-size: 13.5px; padding: 10px 12px; margin-bottom: 8px; }
.comment-form textarea { min-height: 64px; resize: vertical; }
.comment-form button { background: var(--gold); color: var(--ink); border: none; border-radius: 9px; padding: 9px 16px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.form-error { color: var(--brick); font-size: 12.5px; margin: -4px 0 8px; }

footer { padding: 28px 0 40px; border-top: 1px solid var(--hairline); }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--parchment-dim); margin-bottom: 18px; }
.foot-links a { text-decoration: none; }
.foot-social { display: flex; gap: 12px; margin-bottom: 18px; }
.foot-social a { width: 34px; height: 34px; border: 1px solid var(--hairline); border-radius: 9px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.foot-social svg { width: 15px; height: 15px; }
.copyright { font-size: 12px; color: var(--parchment-dim); }

@media (min-width: 640px) {
  .wrap { padding: 0 24px; }
  .hero h1 { max-width: 14ch; }
  .source-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Desktop: wider page (the 640px column is a phone layout). The header row
   and the page content widen together so they stay lined up. */
@media (min-width: 1024px) {
  .wrap, .header-row { max-width: 1120px; }
  .header-row { padding-left: 24px; padding-right: 24px; }
  .hero h1 { max-width: 20ch; }
  .hero p.lede, .tour-hero p.desc, .show-hero .subtitle { max-width: 70ch; }
  .search-box { max-width: 640px; }
  .nav-prev-next { max-width: 640px; }
  .source-grid { grid-template-columns: repeat(4, 1fr); }
  .artist-grid { grid-template-columns: repeat(4, 1fr); }

  /* Flyout menu: only as wide as its widest item, docked to the right edge. */
  nav.drawer { left: auto; width: max-content; min-width: 280px; max-width: 100vw; padding-left: 28px; padding-right: 28px; border-left: 1px solid var(--hairline); box-shadow: -12px 0 32px rgba(0,0,0,.35); }
  .drawer-list li a, .drawer-list .submenu summary { white-space: nowrap; }
  .drawer-top { gap: 40px; }
}

/* Radio Show Guide: David Dunnington's legacy document (templates/radio-guide-content.html)
   restyled with the site's colours and fonts. The old markup uses <font>, <b>,
   <p> and tables with no classes, so it is styled by tag within .guide. */
.guide { max-width: 820px; padding: 12px 0 48px; font-size: 15px; line-height: 1.65; color: var(--parchment-dim); overflow-wrap: anywhere; }
.guide p { margin: 0 0 12px; }
.guide a[href] { color: var(--gold); text-underline-offset: 2px; }
.guide b, .guide strong { color: var(--parchment); font-weight: 600; }
.guide i, .guide em { font-style: italic; }
.guide font { color: inherit; font-family: inherit; }
.guide font[size] { display: inline-block; margin-top: 18px; font-family: var(--font-display); font-size: 21px; font-weight: 500; color: var(--gold); letter-spacing: 0.02em; }
.guide ul, .guide ol { margin: 8px 0 14px; padding-left: 22px; }
.guide li { margin: 3px 0; }
.guide pre { overflow-x: auto; margin: 10px 0 14px; padding: 12px 14px; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 10px; font-size: 12.5px; line-height: 1.5; color: var(--parchment-dim); }
.guide table { width: 100% !important; border-collapse: collapse; margin: 12px 0; }
.guide td { padding: 7px 14px 7px 0; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.guide img { display: inline-block; max-width: 100%; }

.guide-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 8px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }
.guide-cover { width: 73px; height: auto; border-radius: 10px; border: 1px solid var(--hairline); }
.guide-head h1 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 6vw, 36px); line-height: 1.15; color: var(--parchment); }
.guide-head p { margin: 0 0 4px; font-size: 13px; }

/* One show: the small radio icon plus its "1. Venue, date" heading. */
.guide b.rs-title { display: block; margin: 38px 0 12px; padding-top: 24px; border-top: 1px solid var(--hairline); font-family: var(--font-display); font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--parchment); }
.guide .rs-icon { width: 20px; height: 30px; margin-right: 10px; vertical-align: middle; border-radius: 4px; }
/* Cue sheet PDF links. */
.guide .rs-cue { width: 18px; height: 18px; margin: 0 4px 2px 0; vertical-align: middle; }

/* Drawer sub menu (Articles and reviews) */
.drawer-list .submenu summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--hairline); font-size: 16px; cursor: pointer; list-style: none; }
.drawer-list .submenu summary::-webkit-details-marker { display: none; }
.drawer-list .submenu summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--parchment-dim); border-bottom: 2px solid var(--parchment-dim); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
.drawer-list .submenu[open] summary::after { transform: rotate(-135deg); }
.drawer-list .submenu ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.drawer-list .submenu li a { font-size: 14px; color: var(--parchment-dim); padding: 11px 4px; }

/* Search button feedback while a search is running */
.search-box button.busy { opacity: .85; cursor: progress; }
.search-box button.busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: search-spin .7s linear infinite; }
@keyframes search-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .search-box button.busy::before { animation-duration: 2s; } }

/* Show list "Filter" menu */
.filter-menu { position: relative; flex: none; }
.filter-menu summary { display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 14px; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 10px; color: var(--parchment); font-size: 14px; cursor: pointer; list-style: none; white-space: nowrap; user-select: none; }
.filter-menu summary::-webkit-details-marker { display: none; }
.filter-menu summary svg { width: 15px; height: 15px; }
.filter-menu summary.active, .filter-menu[open] summary { border-color: var(--gold); color: var(--gold); }
.filter-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 6px; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.filter-check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--parchment); cursor: pointer; }
.filter-check:hover { background: var(--ink-raised-2); }
.filter-check input { width: 16px; height: 16px; accent-color: var(--gold); flex: none; margin: 0; }
.filter-actions { display: flex; align-items: center; gap: 14px; padding: 8px 12px 6px; margin-top: 4px; border-top: 1px solid var(--hairline); }
.filter-apply { background: var(--gold); color: var(--ink); border: none; border-radius: 8px; padding: 8px 16px; font-weight: 600; font-size: 13px; font-family: var(--font-body); cursor: pointer; }
.filter-clear { font-size: 13px; color: var(--parchment-dim); text-decoration: none; }
.filter-clear:hover { color: var(--gold); }

/* Themed 404 page (templates/not-found.php) */
.not-found { text-align: center; padding: 56px 0 48px; }
.nf-code { font-family: var(--font-display); font-weight: 600; font-size: clamp(88px, 28vw, 168px); line-height: 1; letter-spacing: 0.02em; color: var(--gold); opacity: .9; }
.not-found h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 6vw, 36px); line-height: 1.15; margin: 10px 0 12px; }
.not-found .lede { max-width: 46ch; margin: 0 auto 26px; color: var(--parchment-dim); font-size: 15px; line-height: 1.6; }
.not-found .search-box { max-width: 560px; margin: 0 auto; text-align: left; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.nf-btn { padding: 10px 18px; border: 1px solid var(--hairline); border-radius: 100px; font-size: 14px; text-decoration: none; color: var(--parchment-dim); background: var(--ink-raised); }
.nf-btn:hover { border-color: var(--gold); color: var(--gold); }
.nf-btn.primary { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.nf-btn.primary:hover { color: var(--ink); opacity: .9; }

/* Show page: how long ago the show was, on its own row between the date and the previous / next buttons */
.show-hero .show-ago { margin: -8px 0 18px; font-size: 14px; color: var(--gold); }

/* Home page: "Upcoming shows" list beside the title and search (desktop only, 1024px and wider) */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.upcoming { display: none; background: var(--ink-raised); border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 14px 4px; }
.upcoming h2 { margin: 0 0 2px; font-family: var(--font-display); font-weight: 500; font-size: 16px; }
.upcoming ul { list-style: none; margin: 0; padding: 0; }
.upcoming li + li { border-top: 1px solid var(--hairline); }
.upcoming li a { display: flex; gap: 12px; align-items: center; padding: 6px 0; text-decoration: none; color: var(--parchment); }
.upcoming li a:hover .up-venue { color: var(--gold); }
.up-date { flex: none; width: 46px; text-align: center; line-height: 1.05; }
.up-date .d { display: block; font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.up-date .m { display: block; font-size: 10px; color: var(--parchment-dim); text-transform: uppercase; letter-spacing: .4px; }
.up-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.up-venue { font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sub { display: flex; gap: 8px; align-items: center; font-size: 11.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.up-artist { font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .3px; font-size: 10.5px; }
.up-country { color: var(--parchment-dim); }
.up-country img { display: inline-block; width: 14px; height: 10px; object-fit: cover; vertical-align: middle; margin-right: 4px; border-radius: 2px; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: stretch; }
  /* Title and intro stay at the top; the search box drops to the bottom, level with the end of the Upcoming shows card. */
  .hero-main { display: flex; flex-direction: column; }
  .hero-main .search-box { margin-top: auto; }
  .hero-main p.lede { margin-bottom: 20px; }
  .upcoming { display: block; }
}

/* Previous / next tour buttons under the tour page breadcrumb */
/* Full width (the 640px cap on .nav-prev-next is for the show page), so Next sits at the right edge. */
.tour-nav { display: flex; justify-content: space-between; gap: 10px; max-width: none; margin-top: 14px; }
.tour-nav .pn-link { flex: 0 1 auto; max-width: calc(50% - 5px); min-width: 0; }
.tour-nav .pn-link.next { margin-left: auto; text-align: right; }

.up-empty { margin: 4px 0 10px; font-size: 13px; color: var(--parchment-dim); }

/* Selected chips (source chips on the tour page, artist chips on the home page) are filled so it's clear what is on. */
.source-chips .chip, .artist-row .chip { transition: background .12s, color .12s; }
.source-chips .chip.active, .artist-row .chip.active { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.source-chips .chip:not(.active):hover, .artist-row .chip:not(.active):hover { border-color: var(--gold); color: var(--gold); }
.source-summary { margin: -4px 0 14px; font-size: 13px; color: var(--parchment-dim); }
.source-summary strong { color: var(--parchment); font-weight: 600; }
.source-summary a { color: var(--gold); text-underline-offset: 2px; }

/* Round "x" button inside search boxes (added by the script in layout.php) */
.clearable-wrap { position: relative; display: flex; flex: 1; min-width: 0; align-items: center; }
.clearable-wrap input[type="text"] { flex: 1; width: 100%; min-width: 0; padding-right: 36px; }
.clear-btn { display: none; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0; align-items: center; justify-content: center; border: none; border-radius: 50%; background: var(--hairline); color: var(--parchment-dim); cursor: pointer; }
.clear-btn svg { width: 12px; height: 12px; }
.clear-btn:hover, .clear-btn:focus-visible { background: var(--gold); color: var(--ink); outline: none; }
.clearable-wrap.has-text .clear-btn { display: flex; }
/* The shared .search-box button style (gold submit button) must not apply to the clear button. */
.search-box .clear-btn { padding: 0; font-size: inherit; border-radius: 50%; background: var(--hairline); color: var(--parchment-dim); }
.search-box .clear-btn:hover, .search-box .clear-btn:focus-visible { background: var(--gold); color: var(--ink); }

/* Date range beside the tour title */
.tour-hero h1 .tour-dates { font-family: var(--font-body); font-size: 0.5em; font-weight: 500; color: var(--parchment-dim); white-space: nowrap; letter-spacing: 0; }
