/* A centered canvas leaves a dedicated gutter for the page navigator. */
body {
  background: radial-gradient(ellipse at 50% 0, #0a2035 0, #020914 64%);
  background-attachment: fixed;
}
.site-frame {
  width: min(1360px, calc(100% - 176px));
  margin: 24px auto;
  border: 1px solid #21405a;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 15%, #0c327042, transparent 45%), linear-gradient(155deg, #030d20, #03132a 40%, #020918);
  box-shadow: 0 24px 90px #0008, 0 0 36px #00c9b808;
}
/* Do not clip the frame: the header must remain sticky inside the page. */
.site-frame > .topline { margin-inline: 18px; }
.site-frame > .site-header { border-radius: 18px 18px 0 0; }
.site-frame > .site-footer { border-radius: 0 0 19px 19px; }
.site-frame .source-label { white-space: normal; overflow: visible; line-height: 1.4; }
@media (min-width: 921px) {
  .site-frame .mm-hero-content { padding-left: 34px; }
  .site-frame .mm-scenic-panel, .site-frame .mm-scenic-kicker { right: 34px; }
  .site-frame .mm-hero h1 { font-size: clamp(42px, 4.3vw, 64px); }
}
.page-nav[hidden], .page-nav-stops[hidden] { display: none; }
.page-nav {
  position: fixed;
  z-index: 80;
  top: 50%;
  right: max(14px, calc((100vw - 1360px) / 2 - 73px));
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 58px;
  padding: 6px;
  border: 1px solid #00c9b83d;
  border-radius: 34px;
  background: linear-gradient(180deg, #03131ef5, #03121af5);
  box-shadow: 0 0 0 5px #00c9b805, 0 12px 32px #0005;
  backdrop-filter: blur(14px);
}
.page-nav :is(button, a) {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #57ece1;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.page-nav .page-nav-arrow { border: 1px solid #00c9b845; background: #00c9b806; }
.page-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-nav :is(button, a):hover:not(:disabled) { color: #c1fff5; background: #00c9b817; }
.page-nav :is(button, a):focus-visible { outline: 2px solid #76fff0; outline-offset: 2px; }
.page-nav button:disabled { opacity: .28; cursor: default; }
.page-nav-stops { display: flex; flex-direction: column; align-items: center; }
.page-nav-stops a { height: 34px; }
.page-nav-stops a::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #00c9b86b; }
.page-nav-stops a[aria-current="location"]::before { width: 11px; height: 11px; background: #00deca; box-shadow: 0 0 0 8px #00c9b80d, 0 0 18px #00c9b850; }
.page-nav-stops a span { position: absolute; right: 54px; padding: 7px 12px; border: 1px solid #285668; border-radius: 8px; background: #041520; color: #d9faf6; font-size: 12px; font-weight: 650; white-space: nowrap; opacity: 0; pointer-events: none; }
.page-nav-stops a:is(:hover, :focus-visible) span { opacity: 1; }
.page-nav .page-nav-toggle { display: none; }
/* A compact bottom control leaves the reading width clear and the footer reachable. */
@media (max-width: 1100px), (max-height: 560px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-frame { width: calc(100% - 40px); margin-block: 16px; border-radius: 16px; }
  .site-frame > .site-header { border-radius: 14px 14px 0 0; }
  .site-frame > .site-footer { border-radius: 0 0 15px 15px; }
  .page-nav { inset: auto 0 0; transform: none; width: 100%; flex-direction: row; justify-content: center; gap: 18px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-radius: 0; border-width: 1px 0 0; box-shadow: 0 -8px 28px #0004; }
  .page-nav .page-nav-toggle { display: flex; justify-content: center; align-items: center; gap: 10px; width: 144px; font-size: 13px; font-weight: 750; border: 1px solid #00c9b845; }
  .page-nav-toggle[aria-expanded="true"] { background: #00c9b81d; }
  .page-nav-stops { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(300px, calc(100vw - 32px)); max-height: calc(100dvh - 110px); overflow-y: auto; align-items: stretch; gap: 2px; padding: 8px; border: 1px solid #285668; border-radius: 16px; background: #041520fa; box-shadow: 0 14px 48px #0009; }
  .page-nav-stops a { display: flex; justify-content: flex-start; gap: 15px; width: 100%; height: 44px; padding: 0 16px; border-radius: 9px; }
  .page-nav-stops a::before { flex: 0 0 6px; }
  .page-nav-stops a[aria-current="location"]::before { flex-basis: 11px; }
  .page-nav-stops a span { position: static; padding: 0; border: 0; border-radius: 0; background: none; opacity: 1; font-size: 13px; }
}
@media (max-width: 650px) {
  .site-frame { width: calc(100% - 20px); margin-block: 10px; border-radius: 13px; }
  .site-frame > .site-header { border-radius: 11px 11px 0 0; }
  .site-frame > .site-footer { border-radius: 0 0 12px 12px; }
  .site-frame .container { width: calc(100% - 28px); }
}
@media (prefers-reduced-motion: reduce) { .page-nav :is(button, a) { transition: none; } }
@media print {
  body { padding: 0; background: white; }
  .site-frame { width: 100%; margin: 0; border: 0; border-radius: 0; background: white; box-shadow: none; }
  .site-frame .container { width: 100%; }
  .page-nav { display: none !important; }
}
