/* ── reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── design tokens — vintage palette from the old sites ────────────────── */
:root {
  /* backgrounds */
  --bg:        #111111;
  --bg2:       #1b1b1b;
  --bg3:       #222222;
  --bg-nav:    rgba(14, 14, 14, 0.90);

  /* borders */
  --border:    #2e2e2e;
  --border-hi: rgba(204, 204, 51, 0.22);

  /* text */
  --text:      #b4b4b4;   /* #a1a1a1 from old CSS, slightly lifted */
  --text-mid:  #787878;
  --text-dim:  #484848;

  /* accent colours straight from style 3.css */
  --lime:      #cccc33;   /* h1 colour, hover, borders */
  --sky:       #66ccff;   /* link colour */
  --green:     #66cc40;
  --amber:     #f4bf26;
  --red:       #f45026;

  /* map gold — keep for the D3 route map */
  --gold:      #e8b830;

  /* layout */
  --radius:    4px;
  --max:       960px;
  --nav-h:     42px;
  --nav-top:   calc(var(--nav-h) + 24px);
}

/* ── base ──────────────────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
main { animation: fadeIn .3s ease both; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Tahoma, Verdana, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
  word-break: break-word;
}

a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--lime); }
img { display: block; max-width: 100%; }

/* ── nav bar ───────────────────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 200;
}

nav {
  width: 100%;
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--sky);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #c8c8c8;
  flex-shrink: 0;
  line-height: 1;
  text-decoration: none;
  transition: color .15s;
}
.nav-logo:hover { color: var(--lime); }
.nav-logo-mark { width: 26px; height: 21px; flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links a {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-mid);
  transition: color .15s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a:hover          { color: var(--lime); }
.nav-links a:focus-visible  { color: var(--lime); outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 2px; }
.nav-links a[aria-current="page"] { color: var(--sky); }

/* ── main & footer ─────────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: var(--nav-top) 16px 48px;
}

/* ── subscribe strip ────────────────────────────────────────────────────── */
.subscribe-strip {
  border-top: 1px solid var(--sky);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(102,204,255,.05), transparent);
  padding: 22px 20px;
  text-align: center;
}
.subscribe-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  max-width: 600px;
  margin: 0 auto;
}
.subscribe-strip-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.subscribe-strip-text strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sky);
}
.subscribe-strip-text span {
  font-size: 10px;
  color: var(--text-mid);
  letter-spacing: .03em;
}
.footer-sub-form {
  display: flex;
  gap: 6px;
}
.footer-sub-form input[type="email"] {
  background: var(--bg2);
  border: 1px solid var(--sky);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 11px;
  padding: 6px 12px;
  outline: none;
  width: 200px;
  transition: border-color .15s;
}
.footer-sub-form input[type="email"]:focus { border-color: var(--lime); }
.footer-sub-form button {
  background: none;
  border: 1px solid var(--sky);
  border-radius: var(--radius);
  color: var(--sky);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.footer-sub-form button:hover  { background: var(--sky); color: var(--bg); border-color: var(--sky); }
.footer-sub-msg                { font-size: 10px; width: 100%; text-align: center; }
.footer-sub-msg.ok             { color: var(--green); }
.footer-sub-msg.err            { color: var(--red); }

footer {
  text-align: center;
  padding: 12px 16px 14px;
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--text-dim);
}

/* ── greg mascot easter egg ─────────────────────────────────────────────── */
.greg-mascot {
  position: fixed;
  bottom: -80px;
  right: 18px;
  width: 64px;
  height: 64px;
  z-index: 300;
  cursor: pointer;
  transition: bottom .4s cubic-bezier(.34,1.56,.64,1);
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(102,204,255,.4));
}
.greg-mascot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.greg-mascot.peek  { bottom: 0; opacity: 1; }
.greg-mascot.visible { bottom: 8px; opacity: 1; }
.greg-mascot-tip {
  position: fixed;
  bottom: 76px;
  right: 14px;
  background: var(--bg2);
  border: 1px solid var(--sky);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-size: 9px;
  color: var(--sky);
  letter-spacing: .04em;
  display: none;
  z-index: 301;
  white-space: nowrap;
}
.greg-mascot.visible + .greg-mascot-tip { display: block; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 44px 0 28px;
}
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #d8d8d8;
}
.hero-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-mid);
  letter-spacing: .04em;
}
.hero-countdown {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: .02em;
}
.btn {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 18px;
  border: 1px solid var(--lime);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lime);
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--lime); color: var(--bg); }

/* ── hero photo ─────────────────────────────────────────────────────────── */
.hero-photo-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  height: 70vh;
  overflow: hidden;
  margin-bottom: 8px;
}
.hero-photo-wrap > a {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.hero-photo-wrap:hover .hero-photo-img { transform: scale(1.02); }

/* ── sections ──────────────────────────────────────────────────────────── */
.section { margin-top: 40px; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-dim);
}
.see-all {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: .04em;
}
.see-all:hover { color: var(--lime); }

/* ── photo grid ────────────────────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 3px;
}
.photo-grid--album {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 3px;
}
.photo-cell {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg3);
  cursor: pointer;
  display: block;
}
.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
  transition: transform .3s, opacity .2s;
}
.photo-cell:hover img,
.photo-cell:focus img { transform: scale(1.04); opacity: 1; }
.photo-cell:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }

/* ── album grid ────────────────────────────────────────────────────────── */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.album-grid--full {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.album-card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.album-card:hover,
.album-card:focus-visible { border-color: var(--lime); outline: none; }
.album-cover {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg3);
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .8;
  transition: opacity .2s, transform .3s;
}
.album-card:hover .album-cover img { opacity: 1; transform: scale(1.03); }
.album-cover--empty { background: linear-gradient(135deg, #151515, #202020); }
.album-info {
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.album-title { font-size: 12px; font-weight: 700; color: #cccccc; }
.album-meta  { font-size: 10px; color: var(--text-mid); }
.album-desc  { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.album-count { font-size: 9px;  color: var(--text-dim); margin-top: 3px; }

/* ── sub-album section headers ─────────────────────────────────────────── */
.sub-album-header {
  margin: 30px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--sky);
}
.sub-album-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--lime);
}
.sub-album-meta {
  display: flex;
  gap: 10px;
  margin-top: 3px;
  font-size: 9px;
  color: var(--text-dim);
}
.sub-album-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-mid);
}
.sub-album-header--nested {
  margin-left: 16px;
  border-bottom-style: dotted;
  opacity: .85;
}

/* ── article list ──────────────────────────────────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 2px; }
.article-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.article-row:hover,
.article-row:focus-visible { border-color: var(--lime); outline: none; }
.article-title  { font-size: 13px; font-weight: 700; color: #cccccc; display: block; }
.article-desc   { font-size: 11px; color: var(--text-mid); display: block; margin-top: 2px; }
.article-date   { font-size: 10px; color: var(--text-dim); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

/* ── page header ───────────────────────────────────────────────────────── */
.page-header {
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #d0d0d0;
  margin-top: 6px;
}
.back {
  font-size: 11px;
  color: var(--text-dim);
  display: inline-block;
  margin-bottom: 5px;
}
.back:hover { color: var(--lime); }
.page-meta {
  display: flex;
  gap: 12px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-mid);
}
.gpx-dl {
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.gpx-dl:hover { color: var(--lime); border-color: var(--lime); }
.page-desc {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-mid);
  max-width: 600px;
}
.stats-desc { margin-top: 16px; }

/* ── stats panel ────────────────────────────────────────────────────────── */
.stats-panel {
  margin: 18px 0 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* total bar — shown when multiple days */
.stats-total-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  padding: 8px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-mid);
}
.stats-total-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-dim);
  margin-right: 4px;
}
.stats-total-item strong { color: var(--lime); font-weight: 700; }

/* per-day list */
.stats-days-list {
  display: flex;
  flex-direction: column;
}
.stats-day {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.stats-day:last-child { border-bottom: none; }
.stats-day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.stats-day-title { font-size: 11px; color: #ccc; font-weight: 600; }
.stats-day-date  { font-size: 10px; color: var(--text-dim); white-space: nowrap; }

/* stats number grid inside each day */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 8px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 12px;
  border-right: 1px solid var(--border);
}
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child  { border-right: none; }
.stat-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--lime);
  line-height: 1.2;
}
.stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
  margin-top: 2px;
}

.chart-ele {
  display: block;
  width: 100%;
  height: 80px;
  border-radius: 2px;
  background: var(--bg3);
}

/* ── prose ─────────────────────────────────────────────────────────────── */
.article-wrap {
  max-width: 660px;
  margin: 0 auto;
}
.prose {
  font-size: 14px;
  line-height: 1.8;
}
.prose h1, .prose h2, .prose h3 {
  color: #d0d0d0;
  margin: 1.6em 0 .5em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.prose h1 { font-size: 14px; color: var(--lime); border-bottom: 1px dashed var(--sky); padding-bottom: 3px; }
.prose h2 { font-size: 12px; color: var(--lime); }
.prose h3 { font-size: 11px; }
.prose p  { margin-bottom: 1em; }
.prose a  { color: var(--sky); }
.prose a:hover { color: var(--lime); }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: .3em; }
.prose blockquote {
  border-left: 2px solid var(--lime);
  padding-left: 1em;
  color: var(--text-mid);
  margin: 1.2em 0;
}
.prose code {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: .85em;
  background: var(--bg3);
  padding: .1em .35em;
  border-radius: 3px;
  color: var(--sky);
}
.prose pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1em;
  overflow-x: auto;
  margin-bottom: 1em;
}
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose hr { border: none; border-top: 1px dashed var(--border); margin: 2em 0; }

/* ── lightbox ──────────────────────────────────────────────────────────── */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 4, .96);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb[hidden] { display: none; }
.lb-img-wrap {
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
  transition: opacity .2s ease;
}
.lb-close, .lb-prev, .lb-next, .lb-fs, .lb-share, .lb-info-btn {
  position: absolute;
  background: none;
  border: none;
  color: var(--lime);
  cursor: pointer;
  padding: 10px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(0,0,0,.9), 0 2px 8px rgba(0,0,0,.8);
  transition: opacity .4s ease, color .15s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover,
.lb-fs:hover, .lb-share:hover, .lb-info-btn:hover,
.lb-close:focus-visible, .lb-prev:focus-visible, .lb-next:focus-visible,
.lb-fs:focus-visible, .lb-share:focus-visible, .lb-info-btn:focus-visible {
  opacity: 0.75;
  outline: none;
}
.lb-close    { top: 14px; right: 16px; font-size: 20px; }
.lb-prev     { left:  8px; top: 50%; transform: translateY(-50%); font-size: 64px; }
.lb-next     { right: 8px; top: 50%; transform: translateY(-50%); font-size: 64px; }
.lb-fs       { top: 14px; right: 48px;  font-size: 18px; }
.lb-share    { top: 14px; right: 82px;  font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.lb-info-btn { top: 14px; left: 16px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.lb-info-btn.active { color: var(--lime); opacity: 1; }
.lb-info-btn svg { width: 18px; height: 18px; }

.lb-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(4,4,4,.88) 30%);
  padding: 48px 20px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  transform: translateY(100%);
  transition: transform .28s ease;
  pointer-events: none;
}
.lb-info.lb-info--open { transform: translateY(0); pointer-events: auto; }
.lb-info-field  { display: flex; flex-direction: column; gap: 3px; flex: 1; align-items: center; padding: 0 12px; }
.lb-info-field + .lb-info-field { border-left: 1px solid rgba(204,204,51,.2); }
.lb-info-label  { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.lb-info-value  { font-size: 12px; color: var(--text); }
.lb-info-empty  { font-size: 11px; color: var(--text-dim); align-self: center; }

.lb-controls-hidden .lb-close,
.lb-controls-hidden .lb-prev,
.lb-controls-hidden .lb-next,
.lb-controls-hidden .lb-fs,
.lb-controls-hidden .lb-share,
.lb-controls-hidden .lb-info-btn { opacity: 0; pointer-events: none; }
.lb-counter {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--text-dim);
}

/* ── map page — full width override ───────────────────────────────────── */
.map-main { max-width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; }

/* ── section anchor links ──────────────────────────────────────────────── */
.section-anchor {
  margin-left: 8px;
  font-size: 13px;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity .15s;
  text-decoration: none;
}
.sub-album-title:hover .section-anchor { opacity: 1; }

/* ── section preview (album overview page) ─────────────────────────────── */
.section-link {
  color: inherit;
  text-decoration: none;
}
.section-link:hover { color: var(--lime); }

.section-hero-link {
  display: block;
  text-decoration: none;
  overflow: hidden;
}
.section-hero {
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  background: var(--bg3);
}
.section-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .88;
  transition: transform .35s, opacity .2s;
}
.section-hero-link:hover .section-hero img { transform: scale(1.03); opacity: 1; }

.photo-grid--preview {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 3px;
  margin-top: 3px;
}

.section-view-all {
  padding: 8px 0 4px;
  font-size: 11px;
}
.section-view-all a {
  color: var(--text-mid);
  text-decoration: none;
}
.section-view-all a:hover { color: var(--lime); }

/* ── GPX route map ──────────────────────────────────────────────────────── */
.map-wrap {
  position: relative;
  margin: 12px 0 16px;
  border-radius: var(--radius);
}
#album-map, #section-map, .map-container {
  width: 100%;
  height: 380px;
  max-height: 60vh;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
}

/* day chips overlaid at bottom of map */
.map-day-list {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 28px 8px 8px;
  background: linear-gradient(transparent, rgba(6,11,20,0.88));
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 401;
  pointer-events: none;
}
.map-day-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 7px;
  background: rgba(8,14,26,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid var(--day-color, #4a9eff);
  border-radius: 3px;
  font-size: 10px;
  color: #8aaccc;
  cursor: pointer;
  pointer-events: all;
  transition: background .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
  line-height: 1.3;
}
.map-day-chip:hover {
  background: rgba(15,26,46,0.95);
  color: #c8d8e8;
  box-shadow: 0 0 0 1px var(--day-color, #4a9eff) inset;
}
.map-day-chip.active {
  background: rgba(18,32,54,0.97);
  color: #dde8f0;
  box-shadow: 0 0 0 1px var(--day-color, #4a9eff) inset;
}
.map-day-km  { font-weight: 700; color: #ccc; }
.map-day-date { font-size: 9px; opacity: .7; }

/* stats + chart — compact strip directly below the map */
.day-chart-wrap {
  margin: -8px 0 16px;
  background: rgba(4,9,18,0.82);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid var(--detail-color, #66ccff);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 7px 12px 8px;
}
.day-chart-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.detail-title { font-size: 10px; font-weight: 700; color: #d0dce8; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-date  { font-size: 9px; color: var(--text-dim); flex-shrink: 0; }
.detail-close { background: none; border: none; color: #556; font-size: 11px; cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0; }
.detail-close:hover { color: #aaa; }
.gpx-dl-sm {
  font-size: 9px; color: var(--sky); border: 1px solid var(--sky);
  border-radius: 3px; padding: 1px 6px; text-decoration: none;
  flex-shrink: 0; opacity: 0.75; transition: opacity .15s;
}
.gpx-dl-sm:hover { opacity: 1; }

/* grouped stats row: journey | speed | elevation */
.day-stats-row {
  display: flex;
  align-items: stretch;
  margin-bottom: 7px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.stat-group {
  flex: 1;
  display: flex;
  gap: 0;
  border-right: 1px solid var(--border);
  padding-right: 12px;
}
.stat-group:last-child { border-right: none; padding-right: 0; }
.stat-group .stat-item {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  padding: 4px 4px;
  border-right: 1px solid var(--border);
}
.stat-group .stat-item:last-child  { border-right: none; }
.stat-group .stat-value { font-size: 12px; font-weight: 700; color: var(--lime); white-space: nowrap; }
.stat-group .stat-label { font-size: 7px; color: var(--text-dim); font-weight: 400; white-space: nowrap; }

/* full-width chart below the stats */
.chart-ele {
  display: block;
  width: 100%;
  height: 75px;
  border-radius: 2px;
  background: transparent;
}

/* Leaflet controls — dark theme */
.leaflet-control-attribution {
  background: rgba(4,9,18,0.72) !important;
  color: #334 !important;
  font-size: 8px !important;
  padding: 1px 5px !important;
  line-height: 1.6 !important;
}
.leaflet-control-attribution a { color: #446 !important; }
.leaflet-bar a {
  background: rgba(4,9,18,0.82) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #5a7a9a !important;
}
.leaflet-bar a:hover {
  background: rgba(15,26,46,0.95) !important;
  color: #a0c0d8 !important;
}
.leaflet-bar {
  border: none !important;
  box-shadow: none !important;
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.not-found {
  text-align: center;
  padding: 80px 0 60px;
}
.not-found-code {
  display: block;
  font-size: 96px;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 12px;
}
.not-found h1 { font-size: 22px; color: var(--text); margin-bottom: 8px; }
.not-found p  { color: var(--text-mid); margin-bottom: 24px; }

/* ── 404 meme card ──────────────────────────────────────────────────────── */
.meme-card {
  margin: 28px auto;
  max-width: 260px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 12px;
  text-align: center;
}
.meme-caption {
  font-size: 11px;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 3px;
}
.meme-credit {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: .05em;
}

/* ── empty state ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-dim);
  font-size: 13px;
}

/* ── routes list ────────────────────────────────────────────────────────── */
.route-list { display: flex; flex-direction: column; gap: 2px; }
.route-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
  text-decoration: none;
}
.route-row:hover { border-color: var(--sky); }
.route-name { font-size: 12px; color: var(--text); }
.route-dl   { font-size: 10px; color: var(--sky); letter-spacing: .06em; text-transform: uppercase; flex-shrink: 0; }

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1          { font-size: 22px; }
  .photo-grid       { grid-template-columns: repeat(2, 1fr); }
  .photo-grid--album { grid-template-columns: repeat(2, 1fr); }
  .album-grid       { grid-template-columns: repeat(2, 1fr); }
  .article-row      { flex-direction: column; gap: 4px; }
  .lb-prev { font-size: 48px; left: 0; }
  .lb-next { font-size: 48px; right: 0; }
  .lb-fs   { display: none; }
}

@media (max-width: 360px) {
  .photo-grid, .photo-grid--album { grid-template-columns: 1fr 1fr; }
}

/* ── visual refinements ────────────────────────────────────────────────── */

/* nav: tone down the sky border, add neon glow to hover states */
nav {
  border-bottom-color: rgba(102, 204, 255, 0.10);
}
.nav-logo:hover {
  text-shadow: 0 0 14px rgba(204, 204, 51, 0.28);
}
.nav-links a:hover {
  text-shadow: 0 0 10px rgba(204, 204, 51, 0.30);
}
.nav-links a[aria-current="page"] {
  text-shadow: 0 0 14px rgba(102, 204, 255, 0.38);
}

/* hero photo: cinematic gradient fade to background at bottom */
.hero-photo-wrap {
  height: 76vh;
  margin-bottom: 0;
}
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 28%,
    rgba(10, 10, 10, 0.18) 55%,
    rgba(11, 11, 11, 0.72) 80%,
    #111111 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* album cards: portrait ratio, title always visible, meta fades in */
.album-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px;
}
.album-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
}
.album-card {
  border: none;
  border-radius: 2px;
  position: relative;
  background: var(--bg3);
  transition: transform .38s cubic-bezier(.23,.93,.53,1),
              box-shadow .38s cubic-bezier(.23,.93,.53,1);
}
.album-card:hover,
.album-card:focus-visible {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 18px 52px rgba(0,0,0,0.7), 0 4px 16px rgba(0,0,0,0.4);
  outline: none;
}
.album-cover {
  aspect-ratio: 2/3;
}
.album-cover img {
  opacity: .80;
  transition: opacity .45s, transform .55s cubic-bezier(.23,.93,.53,1);
}
.album-card:hover .album-cover img {
  opacity: 1;
  transform: scale(1.07);
}
.album-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 56px 13px 14px;
  background: linear-gradient(transparent, rgba(4, 4, 4, 0.96));
  pointer-events: none;
}
.album-title {
  font-size: 12px;
  color: #e8e8e8;
  font-weight: 700;
}
.album-meta {
  margin-top: 3px;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .22s .05s, transform .22s .05s;
}
.album-card:hover .album-meta {
  opacity: 0.75;
  transform: none;
}
.album-desc { display: none; }
.album-count {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .22s .10s, transform .22s .10s;
  color: rgba(102, 204, 255, 0.6);
  margin-top: 3px;
}
.album-card:hover .album-count {
  opacity: 1;
  transform: none;
}

/* photo grid: tighter, more tactile */
.photo-grid            { gap: 2px; }
.photo-grid--album     { gap: 2px; }
.photo-grid--preview   { gap: 2px; }
.photo-cell img {
  opacity: .75;
  transition: transform .45s cubic-bezier(.23,.93,.53,1), opacity .3s;
}
.photo-cell:hover img,
.photo-cell:focus  img { transform: scale(1.08); opacity: 1; }

/* section hero on album overview: more cinematic proportions */
.section-hero { aspect-ratio: 16/6; }
.section-hero img {
  opacity: .82;
  filter: saturate(0.88);
  transition: transform .5s cubic-bezier(.23,.93,.53,1), opacity .35s, filter .35s;
}
.section-hero-link:hover .section-hero img {
  transform: scale(1.05);
  opacity: 1;
  filter: saturate(1.05);
}

/* sub-album dividers: subtler, less dashed */
.sub-album-header {
  border-bottom: 1px solid rgba(102, 204, 255, 0.10);
}

/* page header: slightly more presence */
.page-header {
  border-bottom-color: rgba(102, 204, 255, 0.09);
}
.page-header h1 {
  font-size: 22px;
  letter-spacing: -.01em;
}

/* article list: left accent reveal on hover */
.article-row {
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: border-left-color .18s, border-top-color .18s, background .18s;
}
.article-row:hover,
.article-row:focus-visible {
  border-left-color: var(--sky);
  border-top-color: var(--border);
  background: rgba(102, 204, 255, 0.03);
}

/* map: subtle framing */
#album-map, #section-map, .map-container {
  border: 1px solid rgba(102, 204, 255, 0.07);
}

/* subscribe strip: much less intrusive */
.subscribe-strip {
  border-top: 1px solid var(--border);
  border-bottom: none;
  background: none;
  padding: 14px 20px;
}

/* cta button: neon pulse on hover */
.btn:hover {
  box-shadow: 0 0 22px rgba(204, 204, 51, 0.18);
}

/* lightbox: neon on nav buttons */
.lb-prev:hover, .lb-next:hover {
  color: var(--sky);
  text-shadow: 0 0 22px rgba(102, 204, 255, 0.5);
  opacity: 1;
}

/* see-all links: subtle glow */
.see-all:hover {
  text-shadow: 0 0 10px rgba(204, 204, 51, 0.22);
}

/* section view-all */
.section-view-all a:hover {
  text-shadow: 0 0 10px rgba(204, 204, 51, 0.22);
}

/* responsive overrides for new card ratio */
@media (max-width: 600px) {
  .album-grid,
  .album-grid--full {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
  .hero-photo-wrap { height: 56vh; }
}
