/* ============================================================
   STYLE.CSS — structural/layout styling.
   This positions and sizes the app's pieces (canvas, menu, modals).
   To change colors/fonts, edit theme.css instead — this file reads
   its values from the CSS variables defined there.
   ============================================================ */

/* Basic CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

* {
  font-family: var(--font-body, var(--font-family));
  color: var(--color-accent);
}

/* The page background lives on html/body only; individual panels that need a
   solid backing (menus, splash, debug, info modal) set their own. This avoids
   the old universal `* { background-color }` rule, which painted a block
   behind every floating HUD element over the map. */
html, body {
  background-color: var(--color-map-background, var(--color-background));
}

html, body {
  overflow: hidden;
  touch-action: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  position: fixed;
}

body {
  font-family: var(--font-body, sans-serif);
  overflow: hidden;
}

/* Full-viewport texture layer, sits above the flat --color-background but
   behind all content. Inert until JS sets its image from config; the
   universal `*` rule would otherwise give it the bg colour, so it's cleared. */
#bg-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: none;
}

/* Moving speckle noise, above the texture. The noise image is STATIC (a small
   tiled PNG); the "movement" is a cheap GPU-composited drift of the tile plus a
   subtle stepped flicker, so it reads as living static with ~zero JS/battery
   cost. Inert until JS sets its image from config -> noiseLayer. */
#noise-layer, .noise-layer {
  position: fixed;
  inset: 0;
  z-index: 101;   /* above the map, grid, AND the marker canvas (z100) so noise sits over everything */
  pointer-events: none;
  background-repeat: repeat;
  display: none;
  will-change: background-position, opacity;
  /* Directionless static: jump the tile to unrelated positions in discrete
     steps (like TV static) instead of sliding in one direction. */
  animation: noiseStatic 0.6s steps(1) infinite;
}
@keyframes noiseStatic {
  0%   { background-position:   0px    0px; opacity: 1;   }
  20%  { background-position:  47px   83px; opacity: 0.8; }
  40%  { background-position: 112px   29px; opacity: 1;   }
  60%  { background-position:  19px  101px; opacity: 0.85;}
  80%  { background-position:  74px   11px; opacity: 0.95;}
  100% { background-position:  93px   57px; opacity: 1;   }
}
@media (prefers-reduced-motion: reduce) {
  #noise-layer, .noise-layer { animation: none; }  /* respect users who dislike motion */
}

/* --- Title + tagline, top center --- */
#hud-top {
  position: fixed;
  top: 90px;
  left: 0;
  right: 0;
  z-index: 1000;
  text-align: center;
  pointer-events: none;
  background-color: transparent;
}

/* The universal `*` rule paints --color-background on every element; the
   floating HUD text is meant to sit transparently over the map, so clear it
   here on the heading/tagline (and the container above). */
#hud-top,
#hud-top h1,
#main-heading,
#tagline {
  background-color: transparent;
}

#hud-top h1 {
  padding: 0;
  line-height: 1.2;
  pointer-events: auto; /* re-enabled so the 5-tap debug gesture can be detected; #hud-top itself stays pass-through */
}

#main-heading {
  font-size: 3.8em; /* THE COLLECTOR title — prominent on the map (was inheriting 3.0em) */
}

#tagline {
  margin-top: 0.5em;
  font-size: 1.5em;
  font-weight: var(--font-weight-subheading);
  text-align: center;
  letter-spacing: 0.02em;
}

/* --- Bottom-left: walk prompt + closest-audio indicator --- */
#hud-bottom-left {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1000;
  max-width: 60%;
}

/* The universal `*` rule paints --color-background on every element; the
   floating bottom-left HUD is meant to sit transparently over the map, so
   clear it on the container and its text/rows (icon keeps its own colour). */
#hud-bottom-left,
#walk-prompt,
#now-playing-row,
.now-playing-text,
.now-playing-label,
#now-playing-track {
  background-color: transparent;
}

#walk-prompt {
  font-size: 1.3em;
  font-weight: var(--font-weight-body);
  margin-bottom: 0.75em;
}

#now-playing-row {
  display: none !important;   /* nearest-sound UI removed */
  align-items: center;
  gap: 12px;
}

#now-playing-icon {
  width: 32px;
  height: 32px;
  color: var(--color-text, #FFFFFF); /* white to match the track name */
  flex-shrink: 0;
}

#now-playing-icon-custom {
  height: 32px;
  width: auto;        /* keep the icon's own aspect ratio (may be portrait) */
  flex-shrink: 0;
}

.now-playing-label {
  font-size: 1.15em;
  font-weight: var(--font-weight-body);
  opacity: 0.85;
  color: #FFFFFF;
}

#now-playing-track {
  font-size: 1.7em;
  font-weight: var(--font-weight-subheading);
  color: #FFFFFF;
}

/* --- Bottom-right: small site/project name --- */
#hud-site-label {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  font-size: 0.85em;
  opacity: 0.85;
}

/* --- Debug Controls: dev/calibration aids, bottom-center --- */
#debug-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1600;             /* above the nav (1500) so its readout isn't covered */
  display: block;            /* block + overflow scrolls reliably (flex column can trap the last items) */
  width: 260px;
  max-width: 80vw;
  height: 100vh;
  padding: 12px 14px 120px;  /* big bottom padding so the last control clears the screen edge */
  overflow-y: scroll;        /* always scrollable */
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background-color: rgba(20, 12, 12, 0.35); /* very translucent — map shows through */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); /* keep text legible over the see-through bg */
  border-left: 1px solid var(--color-accent);
  color: #fff;
  transition: transform 0.25s ease;
}
/* restore the vertical spacing lost by switching from flex to block */
#debug-panel > * { margin-bottom: 6px; }
#debug-panel label { display: block; }
#debug-panel input[type=range] { width: 100%; }
/* Minimised: slide off to the right, leaving just a tab. */
#debug-panel.minimised {
  transform: translateX(calc(100% - 34px));
}
/* A small always-visible toggle tab on the panel's left edge. */
#debug-panel-toggle {
  position: absolute;
  left: 4px;
  top: 10px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 4px;
  background: var(--color-accent);
  color: #241; 
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

#debug-panel-title {
  font-size: 0.75em;
  font-weight: var(--font-weight-subheading);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

#debug-panel label {
  font-size: 0.8em;
  text-align: center;
}

#debug-panel input[type="range"] {
  width: 100%;
  accent-color: var(--color-accent);
}
/* Number inputs and buttons in the debug panel: dark background + light text so
   nothing renders as yellow-on-light-blue (the browser default is unreadable). */
#debug-panel input[type="number"],
#debug-panel input[type="text"] {
  background: #1a1412;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 3px 5px;
}
#debug-panel button {
  background: #2a2422;
  color: #fff;
  border: 1px solid #666;
  border-radius: 4px;
}
#debug-panel button:hover { background: #3a3230; }

@media (max-width: 480px) {
  #debug-panel { width: 220px; }
}

@media (max-width: 480px) {
  #hud-top { top: 70px; }
  #game-instruction { bottom: 70px; }
  #desktop-instruction { bottom: 70px; }
  #main-heading { font-size: 3.2em; }
  #tagline { font-size: 1.4em; }
  #now-playing-track { font-size: 1.5em; }
  #hud-bottom-left { max-width: 72%; }
  /* Smaller shield border on mobile so the shield uses more of the screen. */
  #splash-modal { background-size: calc(100% - 20px) calc(100% - 20px), 44px 44px, 44px 44px; }
  /* wider yellow paragraphs on mobile (fill the content width, not the tight 22em) */
  #instructions-list { max-width: 100%; }
}

/* --- Logo, top left --- */
#site-logo {
  position: fixed;
  top: 20px;
  left: 20px;
  height: var(--logo-height, 44px);
  z-index: 1500;
  background-color: transparent;
}

/* Desktop-only arrow-key navigation hint, bottom-right. */
/* (Desktop arrow-key hint removed.) */
/* Desktop instruction: same style + position as the mobile #game-instruction. */
#desktop-instruction {
  font-family: var(--font-body, sans-serif);
  font-size: 1.05em;        /* smaller: a subtle hint, not a headline */
  color: #fff;
  line-height: 1.3;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;             /* lower: below the gamification prompt so they don't collide */
  text-align: center;
  z-index: 1200;
  pointer-events: none;
  padding: 0 1rem;
}
#desktop-instruction.hidden { display: none; }

/* Gamification HUD — padlocks + chest + instruction. Sits inside #hud-top, in
   the centred column, flowing directly under the tagline. */
#game-hud {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}
#game-locks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}
.game-lock {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}
/* Newly-unlocked padlock does a brief shake. */
.game-lock.just-unlocked {
  animation: lockShake 0.5s ease-in-out;
}
@keyframes lockShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  15%      { transform: translateX(-3px) rotate(-6deg); }
  30%      { transform: translateX(3px) rotate(5deg); }
  45%      { transform: translateX(-2px) rotate(-4deg); }
  60%      { transform: translateX(2px) rotate(3deg); }
  75%      { transform: translateX(-1px) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .game-lock.just-unlocked { animation: none; }
}
.game-lock svg { display: block; width: 100%; height: 100%; }
/* PENDING-UNLOCK outline hugs the padlock silhouette and is drawn INSIDE the
   SVG (see svgPadlock's `pending` branch), not as a CSS box. */

/* DANGER state — while a location's exit clip plays, the padlock row shakes
   violently and goes danger-red. Driven by Game.signalDanger / clearDanger.
   NB the element is id="game-locks", so the selector is #game-locks.danger. */
#game-locks.danger .game-lock {
  animation: dangerShake 0.09s linear infinite;
}
/* Recolour to danger-red: stroke on paths (the shackle arcs, fill:none stays),
   fill on the lock bodies (rects). Covers both the dark closed and blue open
   padlocks. */
#game-locks.danger .game-lock svg path { stroke: #EC1C24 !important; }
#game-locks.danger .game-lock svg rect { fill: #EC1C24 !important; }
/* 1px black outline around the whole silhouette so the red shape stays legible
   against the red map (4 offset drop-shadows ≈ a uniform 1px border). */
#game-locks.danger .game-lock svg {
  filter: drop-shadow(1px 0 0 #000) drop-shadow(-1px 0 0 #000)
          drop-shadow(0 1px 0 #000) drop-shadow(0 -1px 0 #000);
}
@keyframes dangerShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20%      { transform: translate(-3px, 2px) rotate(-9deg); }
  40%      { transform: translate(3px, -2px) rotate(8deg); }
  60%      { transform: translate(-2px, -3px) rotate(-7deg); }
  80%      { transform: translate(2px, 3px) rotate(7deg); }
}
@media (prefers-reduced-motion: reduce) {
  #game-locks.danger .game-lock { animation: none; }
}
/* the collected digit, overlaid on an unlocked padlock */
.game-lock .game-digit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: #242021;
  padding-top: 16px; /* nudged down to centre in the larger lock body */
}
#game-chest { width: 46px; height: 46px; margin-left: 4px; }
#game-instruction {
  font-family: var(--font-body, sans-serif);
  font-size: 2.2em;   /* bumped up further */
  color: #fff;
  line-height: 1.3;
  /* Positioned at the bottom-centre of the screen, mirroring the Collector title's
     offset from the top (title sits at top:90px; this sits at bottom:90px). */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 90px;
  text-align: center;
  z-index: 1200;
  pointer-events: none;
  padding: 0 1rem;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);   /* smooth fade between prompts */
}
/* When the code is fully unlocked, gently pulse the instruction AND the locks. */
#game-hud.game-complete #game-instruction,
#game-hud.game-complete #game-locks {
  animation: gamePulse 1.8s ease-in-out infinite;
}
@keyframes gamePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  #game-hud.game-complete #game-instruction,
  #game-hud.game-complete #game-locks { animation: none; }
}

/* When the logo is wrapped in a link (logo.href set), the fixed-positioned
   image carries the layout; the anchor just needs to be clickable and inline. */
#site-logo-link {
  display: inline;
  cursor: pointer;
}

#msg {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text) !important;
  font-size: 16px !important;
  padding: 4px 8px !important;
  z-index: 9999 !important;
  visibility: visible !important;
  background-color: transparent !important;
}

#map-underlay {
  position: fixed;
  width: 660px;
  height: 660px;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  background-color: transparent; /* the map image is mostly transparent; without this the universal `*` bg colour fills the box and hides the gradient behind it */
  background-size: 100% 100%; /* stretch-fill by default so the map image lines up exactly with the lat/lon grid; overridden per config.json -> map.fit */
  background-repeat: no-repeat;
  background-position: center center;
  z-index: 2;   /* grid ABOVE the map image (z1) so the grid overlays the illustration */
}
/* Separate placeholder/custom map IMAGE layer, above the grid, below the canvas.
   Shares the exact scene transform so it tracks the walk with everything else. */
#out-of-range-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: var(--color-accent, #F34837);
  color: #241F1E;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.95em;
  line-height: 1.35;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  pointer-events: none;
}
#out-of-range-banner.hidden { display: none; }

#map-image-underlay {
  position: fixed;
  width: 660px;
  height: 660px;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  background-color: #e34d3b; /* the map's red ground — was 68 SVG paths, now a CSS fill (lighter render) */
  background-repeat: no-repeat;
  background-position: center center;
  z-index: 1;
  pointer-events: none;
}
/* Debug reference grid — same 660 box + transform as the map image, so its
   labelled cells track the illustration for georeferencing readings. */
#map-refgrid {
  position: fixed;
  width: 660px;
  height: 660px;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  z-index: 4;   /* above the map image + noise, so labels are readable */
  pointer-events: none;
}

/* Debug-only: real map tiles in the same box as #map-underlay, for checking
   alignment. Hidden (opacity 0) until the Debug Controls slider is moved. */
#leaflet-underlay {
  position: fixed;
  width: 660px;
  height: 660px;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s linear;
}

#mycanvas {
  width: 100vw;
  height: 100vh;
  z-index: 100;
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  background-color: transparent;
  border-style: none;
  border-width: 1px;
  border-radius: 0;
  overflow: hidden;
}

/* Full-viewport overlay for edge arrows — spans the whole window so arrows pin
   to the true screen edges. Transparent to pointer events so it never blocks
   clicks on the map/HUD beneath it. */
#edge-arrow-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 400;
  pointer-events: none;
  background: transparent;
}

@media (max-width: 768px) {
  /* Map layers are positioned at 0,0 and driven entirely by the JS scene
     transform (applyMapViewZoom); no mobile centring override needed. */
}

.content {
  max-width: 700px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#menu {
  position: fixed;
  top: 20px;
  right: 20px;
  left: auto;
  bottom: auto;
  width: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0;
  background-color: transparent;
  z-index: 1500;
}

/* Thin phone screens: stack the nav items vertically in the top-right so the
   horizontal row can't overlap the centred title. */
@media (max-width: 520px) {
  #menu {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    top: 12px;
    right: 12px;
  }
  /* The tickets link is inline-flex with an absolutely-positioned label; in a
     flex column it can collapse to zero width and vanish. Force it to keep its
     size and order first. */
  #menu #tickets-link {
    display: flex;
    order: -1;            /* ensure it's top of the stack */
    flex: 0 0 auto;
    align-self: flex-end;
  }
  #menu #tickets-shape { width: 92px; }  /* keep the ticket its full width */
}

#menu button {
  padding: 0.7rem 0.5rem;
  font-size: 1.4em;
  background-color: transparent;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

#menu button:hover {
  color: #FFFFFF;   /* stay white on hover */
}

/* Tickets link — solid ticket shape with the label overlaid in dark blue */
#menu #tickets-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}
#tickets-shape {
  display: block;
  width: 92px;
  height: auto;
  color: var(--color-accent, #F6ED6C); /* the solid ticket fill */
  pointer-events: none; /* let clicks fall through to the anchor so the link always fires */
}
/* The path fills with its own color; set it directly (and on hover) because the
   universal `* { color }` rule sets color on the path itself, so currentColor
   inheritance from the parent doesn't reach it. */
#tickets-shape path {
  fill: var(--color-accent, #F6ED6C);
  transition: fill 0.2s ease;
}
#menu #tickets-link:hover #tickets-shape path {
  fill: var(--color-nearest); /* ticket turns blue on hover */
}
#tickets-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  color: var(--color-button-text, #0B4F6C); /* dark blue text on the yellow */
  font-size: 1.05em;
  font-weight: var(--font-weight-subheading);
  letter-spacing: 0.02em;
  pointer-events: none;
  white-space: nowrap;
}

/* Small Tickets link under the splash CTA — icon beside a modest label,
   forced onto its own line below the Begin button. */
#splash-tickets-link {
  display: flex;
  width: fit-content;
  margin: 2rem auto 0;        /* centered, clear space below Begin */
  align-items: center;
  gap: 8px;
  color: #79CDF2;
  text-decoration: none;
  font-size: 1.05em;
  font-weight: var(--font-weight-subheading);
  letter-spacing: 0.02em;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
/* the label is a <span>; the universal `* { color }` rule sets its colour
   directly, overriding inheritance from the link — so colour it explicitly. */
#splash-tickets-label {
  color: #79CDF2;
}
#splash-tickets-link:hover {
  opacity: 1;
  text-decoration: underline;
}
#splash-tickets-icon {
  width: 26px;
  height: 18px;
  flex-shrink: 0;
  color: #79CDF2;
  pointer-events: none; /* clicks fall through to the anchor */
}
/* set stroke directly on the paths — the universal `* { color }` rule sets color
   on the path itself, so currentColor inheritance from the parent won't reach it. */
#splash-tickets-icon path,
#splash-tickets-icon line {
  stroke: #79CDF2;
}

/* Logo link under the splash Tickets link — centered, with clear space. */
#splash-logo-link {
  display: block;
  width: 100%;
  text-align: center;
  margin: clamp(0.6rem, 2.5vh, 1.75rem) auto 0;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
#splash-logo-link:hover {
  opacity: 1;
}
#splash-logo {
  display: block;
  width: clamp(70px, 13vh, 100px);  /* halved so it fits inside the shield */
  max-width: 80vw;   /* only shrink on very narrow screens, not below the button */
  height: auto;
  margin: 0 auto;    /* centre within the full-width link */
}

/* Short phone screens: tighten vertical spacing so the whole splash (incl. the
   logo at the bottom) fits without clipping; scrolling covers anything beyond. */
@media (max-height: 720px) {
  .splash-content { padding-top: 16px; padding-bottom: 16px; }
  .splash-content h1 { font-size: min(3.6rem, 10vw); white-space: nowrap; margin-bottom: 0.6rem; }
  #splash-tagline { font-size: 1.5em !important; margin-bottom: 0.8rem; }
  #instructions-list li { margin-bottom: 0.6em; }
  #splash-logo { width: 100px; max-width: 80vw; height: auto; }
  #splash-logo-link { margin-top: 1.1rem; }
  #splash-tickets-link { margin-top: 1.2rem; }
}

#close-btn {
  padding: 0.7rem 1.5rem;
  font-size: 1.1em;
  background-color: var(--color-accent);
  color: var(--color-button-text);
  border: none;
  border-radius: var(--button-radius);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

h1, h2 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-heading);
  text-align: center;
}

h1 {
  font-size: var(--heading-size);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1000;
  background-color: transparent;
}

h3 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-subheading);
}

p {
  font-weight: var(--font-weight-body);
}

#mygif {
  all: unset !important;
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

#info-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Olive-green ground with the purple grid pattern (matches the old map look).
     Texture removed; noise layer kept. */
  background-color: #62744E;
  background-image:
    linear-gradient(rgba(130,90,160,0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130,90,160,0.35) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-repeat: repeat;
  z-index: 2000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Texture over the info page's solid background, mirroring the main page and
   splash. Inert until JS sets its image from the backgroundTexture config. */
#info-bg-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: none;
}
.info-content {
  position: relative; /* sit above #info-bg-texture */
  z-index: 1;
}

.info-content {
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding: 16px 20px 60px;
  background-color: transparent;
}

.info-close-row {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  padding-bottom: 10px;
  background-color: transparent; /* no bar; button stays pinned, content scrolls behind */
  z-index: 1;
}

#info-title {
  text-align: left;
  max-width: none;
  margin: 0.5rem 0 0.5rem 0;
  font-size: 1.7em;
}

#info-description {
  text-align: left;
  font-size: var(--body-size, 1.2em);
  max-width: 700px;
  margin-bottom: 1.75rem;
}

#info-link {
  text-align: left;
  margin: 0 0 1rem 0;
  font-size: var(--body-size, 1.2em);
}
#info-link a {
  color: var(--color-accent, #F6ED6C);
  text-decoration: underline;
}
#info-link a:hover,
#info-link a:focus {
  color: #FFFFFF;
}

#tracklist-title {
  text-align: left;
  max-width: none;
  margin: 0 0 1rem 0;
  font-size: 1.25em;
}

@media (min-width: 768px) {
  .info-content { padding: 20px 48px 80px; }
  #info-title { font-size: 2.1em; }
}

/* Splash Modal Styles */
#splash-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;   /* fill the real mobile viewport (accounts for browser chrome) */
  /* Near-black brand ground; the green shield fills the screen leaving a ~40px
     border all round, stretched to the viewport. Content overlaid; noise kept. */
  background-color: #62744E;
  /* Layered backgrounds (front → back): the shield, then the purple grid over the
     green (matching the info page). Grid sits under the shield. */
  background-image:
    url('assets/splash-shield.svg'),
    linear-gradient(rgba(121,205,242,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121,205,242,0.4) 1px, transparent 1px);
  background-repeat: no-repeat, repeat, repeat;
  background-position: center center, top left, top left;
  background-size: calc(100% - 80px) calc(100% - 80px), 44px 44px, 44px 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Content scales with viewport height (vh-based font sizes) so it always fits
     in view without scrolling, even on short phones — overlapping the shield if
     needed. overflow hidden because nothing should scroll off. */
  overflow: hidden;
  z-index: 2000;
}
/* Tall content (short/phone screens): don't vertically centre — start at top so
   nothing is pushed off the bottom and everything is reachable by scrolling. */
@media (max-height: 760px) {
}

/* Texture over the splash's solid background, mirroring the main page. Fills
   the modal, sits above its background-color but below the splash content.
   Inert until JS sets its image from the backgroundTexture config. */
#splash-bg-texture {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: none;
}

.splash-content {
  max-width: min(680px, 82vw);
  padding: 32px 3rem;
  text-align: center !important;
  background-color: transparent;
  position: relative; /* sit above #splash-bg-texture */
  z-index: 1;
  /* When taller than the viewport, keep both ends reachable while scrolling
     (avoids the flex-centre "top gets clipped and can't scroll up" bug). */
  margin: auto;
}

.splash-content h1 {
  margin-bottom: 1rem;
  /* Never wrap "THE COLLECTOR". Stay at the max size (cap) and only shrink once
     the screen is too narrow to fit one line: min(cap, ~10vw) holds at the cap
     until 10vw drops below it, then scales down just enough to fit. */
  white-space: nowrap;
  font-size: min(6rem, 8vh, 10vw);
  line-height: 1.05;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  color: var(--splash-heading-color, #FFFFFF);
}

#splash-tagline {
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-body); /* standard body font */
  font-size: clamp(1.1rem, 3.2vh, 1.9em) !important;  /* vh-based: shrinks on short screens */
  font-weight: var(--font-weight-subheading);
  letter-spacing: 0.02em;
  color: #FFFFFF;
}

.splash-content h2 {
  text-align: center;
}
#instructions-heading {
  color: #FFFFFF;
  font-family: var(--font-body); /* body font (swapped with the tagline) */
  margin-top: -4px;   /* the last yellow paragraph already provides the gap; trim to match the tagline→paragraphs spacing above */
  margin-bottom: clamp(0.8rem, 3vh, 2.25rem); /* vh-based space before the Begin button */
}

/* Instructions list on the (now centred) splash: no bullets/indent, centred,
   with breathing room between lines for legibility. */
#instructions-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 22em;
  text-align: left;
}
#instructions-list li {
  margin-bottom: 1em;
  line-height: 1.5;
  font-size: clamp(1rem, 2.4vh, 1.5em);  /* vh-based: shrinks on short screens */
  color: rgb(177, 184, 168);   /* sage grey — 9.2:1 on the dark shield (accessible) */
}

.splash-content p {
  margin-bottom: 1.5rem;
  font-size: var(--body-size) !important;
}

.splash-content button {
  padding: 0.7rem 1rem;
  font-size: clamp(1rem, 2.4vh, 1.4em);  /* vh-based: shrinks on short screens */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;   /* space between the headphone icon and the text */
  width: auto;             /* size to the text (+padding) so it hugs the label, not a fixed box */
  max-width: 80vw;
  background-color: #F6ED6C;
  color: #242021;
  border: none;
  /* 45-degree angled (chamfered) corners instead of rounded. Each corner is
     cut at 14px. */
  border-radius: 0;
  /* Asymmetric chamfer: horizontal cut (8px) shorter than the vertical (14px), so
     the corner angle is steeper — echoing the angled terminal on the Collector "C"
     — and less width is taken off the ends. */
  clip-path: polygon(
    8px 0, calc(100% - 8px) 0,
    100% 14px, 100% calc(100% - 14px),
    calc(100% - 8px) 100%, 8px 100%,
    0 calc(100% - 14px), 0 14px
  );
  cursor: pointer;
  transition: background-color 0.3s ease;
}
/* The universal '* { color: accent }' rule catches the inner label <span>, making
   it yellow — set the button contents white explicitly. */
.splash-content button span { color: #242021; }

.splash-content button:hover {
  background-color: var(--color-nearest);
  color: #242021;   /* dark text on blue for accessible contrast (9:1) */
}
/* The headphone icon is yellow on the red button (text stays white). */
.splash-content button .btn-icon,
.splash-content button .btn-icon path { color: var(--color-collected); }
.splash-content button:hover span {
  color: #242021;   /* label stays dark on the blue hover */
}
.splash-content button:hover .btn-icon,
.splash-content button:hover .btn-icon path {
  color: #F6ED6C;   /* headphone icon goes yellow on hover */
}

#tracklist-body p {
  font-size: 1.5em;
  margin-bottom: 1.2em;
  text-align: left;
}

/* Desktop: clickable tracklist entries jump the visitor to that track. */
#tracklist-body p.tracklist-clickable {
  cursor: pointer;
  transition: color 0.15s ease;
}
#tracklist-body p.tracklist-clickable:hover,
#tracklist-body p.tracklist-clickable:focus {
  color: #FFFFFF;
  outline: none;
}
/* keep the credit line white on hover too */
#tracklist-body p.tracklist-clickable:hover span,
#tracklist-body p.tracklist-clickable:focus span {
  color: #FFFFFF;
}

/* Hide splash when dismissed */
.hidden {
  display: none !important;
}

/* Main content (initially visible but behind modal) */
#main-content {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
