/* Movie Locations Map
   Dark cartographic theme. One accent, borrowed from projector light.
   ------------------------------------------------------------------ */

:root {
  --ink: #0e1420;
  --ink-2: #151d2b;
  --ink-3: #1d2738;
  --line: #2a3850;
  --line-soft: #202b3d;
  --paper: #e9edf5;
  --muted: #94a3bc;
  --muted-2: #6e7d98;
  --beam: #f2b134;
  --beam-ink: #241a06;
  --beam-soft: rgba(242, 177, 52, 0.13);

  --t-studio: #90a4ae;
  --t-castle: #b388ff;
  --t-landmark: #4dd0e1;
  --t-street: #ffb74d;
  --t-nature: #81c784;
  --t-town: #f06292;

  --ui: 'Archivo', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --prose: 'Newsreader', Georgia, 'Times New Roman', serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --panel-w: 376px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: var(--beam); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 2px;
  border-radius: 3px;
}

button { font: inherit; color: inherit; cursor: pointer; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--beam); color: var(--beam-ink);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------- map surface */

.stage {
  position: relative;
  height: 100svh;
  min-height: 520px;
  width: 100%;
  overflow: hidden;
  background: var(--ink);
}

#map { position: absolute; inset: 0; }

.maplibregl-ctrl-attrib,
.map-credit {
  position: absolute;
  right: 10px;
  bottom: 44px;
  z-index: 4;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted-2);
  background: rgba(14, 20, 32, 0.78);
  backdrop-filter: blur(6px);
  padding: 5px 9px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  max-width: min(60vw, 420px);
}
.map-credit a { color: var(--muted); }

.zoomer {
  position: absolute; right: 10px; bottom: 92px; z-index: 5;
  display: flex; flex-direction: column; gap: 1px;
  border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line);
}
.zoomer button {
  width: 38px; height: 38px; border: 0; background: rgba(21, 29, 43, 0.92);
  color: var(--paper); font-size: 19px; line-height: 1;
  display: grid; place-items: center;
}
.zoomer button:hover { background: var(--ink-3); }

/* ---------------------------------------------------------------- panel */

.panel {
  position: absolute;
  top: 14px; left: 14px; z-index: 10;
  width: var(--panel-w);
  max-height: calc(100svh - 92px);
  display: flex; flex-direction: column;
  background: rgba(21, 29, 43, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head { padding: 14px 16px 0; flex: 0 0 auto; }

.wordmark {
  display: flex; align-items: center; gap: 7px;
  font-weight: 800; font-size: 17px; letter-spacing: -0.025em;
  color: var(--paper);
}
.wordmark:hover { text-decoration: none; }
.wordmark b { color: var(--beam); font-weight: 800; }
.wordmark span { font-weight: 500; }
.wordmark-icon { flex: 0 0 auto; color: var(--beam); }

.tally {
  margin: 5px 0 12px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.langs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.langs .lang {
  width: 26px; height: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; padding: 0;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--r-sm);
  opacity: 0.55; filter: grayscale(0.4);
}
.langs .lang:hover { opacity: 0.85; border-color: var(--beam); }
.langs .lang[aria-pressed='true'] {
  opacity: 1; filter: none; border-color: var(--beam); background: var(--beam-soft);
}

/* search */
.search { position: relative; }
.search input {
  width: 100%; padding: 11px 36px 11px 36px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font: inherit;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus { border-color: var(--beam); outline: none; }
.search .glass {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); pointer-events: none; display: flex;
}
.search .clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); padding: 6px;
  display: none; border-radius: 50%;
}
.search.has-text .clear { display: block; }
.search .clear:hover { color: var(--paper); }

/* panel actions */
.actions {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin: 10px 0 12px;
}
.actions button {
  padding: 8px 4px; font-size: 13px; font-weight: 500;
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--paper);
}
.actions button:hover { border-color: var(--beam); color: var(--beam); }
.actions button[aria-pressed='true'] {
  background: var(--beam-soft); border-color: var(--beam); color: var(--beam);
}

.panel-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; flex: 1 1 auto; }
.panel-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ------------------------------------------------------- search results */

.results { margin: 0 0 6px; }
.results h3 {
  margin: 12px 0 5px; font-size: 11.5px; font-weight: 600;
  color: var(--muted-2); letter-spacing: .01em;
}
.results h3:first-child { margin-top: 2px; }

.hit {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 9px; background: none; border: 0; border-radius: var(--r-sm);
  text-align: left; color: var(--paper); line-height: 1.35;
}
.hit:hover, .hit:focus-visible { background: var(--ink-3); }
.hit .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.hit .label { flex: 1 1 auto; min-width: 0; }
.hit .label b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit .label small { color: var(--muted); font-size: 12px; }
.hit .count { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

.empty { padding: 14px 2px; color: var(--muted); font-size: 13.5px; }
.empty b { color: var(--paper); font-weight: 500; }

/* ------------------------------------------------------------ film card */

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding-top: 4px; }
.back {
  background: none; border: 0; color: var(--muted); font-size: 13px; padding: 4px 0;
}
.back:hover { color: var(--beam); }

.card h2 {
  margin: 6px 0 2px; font-size: 20px; line-height: 1.2;
  letter-spacing: -0.02em; font-weight: 700;
}
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.card .blurb { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }

.spotlist { list-style: none; margin: 0; padding: 0; }
.spotlist li { border-top: 1px solid var(--line-soft); }
.spotlist li:last-child { border-bottom: 1px solid var(--line-soft); }
.spotlist button {
  display: flex; gap: 10px; width: 100%; padding: 10px 6px;
  background: none; border: 0; text-align: left; align-items: flex-start;
}
.spotlist button:hover { background: var(--ink-3); }
.spotlist .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
.spotlist .nm { font-size: 14px; font-weight: 500; color: var(--paper); }
.spotlist .meta { font-size: 12px; color: var(--muted); }
.spotlist .loose { color: var(--muted-2); font-size: 11.5px; }

/* ----------------------------------------------------------- place card */

.shot {
  position: relative; margin: 10px 0 12px;
  border-radius: var(--r-md); overflow: hidden; background: var(--ink);
  aspect-ratio: 3 / 2;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 9px 6px; font-size: 10.5px; color: #cfd6e4;
  background: linear-gradient(to top, rgba(0,0,0,.82), transparent);
}
.shot figcaption a { color: #cfd6e4; text-decoration: underline; }
.shot-missing { background: var(--ink-3); border: 1px solid var(--line); }
.shot-note {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted-2); font-size: 12.5px;
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.tag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.tag.type { border-color: currentColor; }

.srcline { font-size: 12px; color: var(--muted-2); margin: 10px 0 0; }

/* -------------------------------------------------------------- filters */

.filters { border-top: 1px solid var(--line-soft); margin-top: 10px; padding-top: 4px; }
.filters summary {
  cursor: pointer; padding: 9px 2px; font-size: 13px; color: var(--muted);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: '+'; color: var(--muted-2); font-size: 16px; }
.filters[open] summary::after { content: '−'; }
.filters summary:hover { color: var(--paper); }
.fgroup { margin: 4px 0 12px; }
.fgroup > p { margin: 8px 0 6px; font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; font-size: 12px; border-radius: 999px;
  background: var(--ink); border: 1px solid var(--line); color: var(--muted);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip .n { color: var(--muted-2); font-variant-numeric: tabular-nums; font-size: 11px; }
.chip[aria-pressed='true'] { border-color: var(--beam); color: var(--paper); background: var(--beam-soft); }
.chip:hover { border-color: var(--muted-2); }
.freset { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 4px 0; text-decoration: underline; }

/* ------------------------------------------------------------ bottom bar */

.dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 12px;
  background: linear-gradient(to top, rgba(14,20,32,.95), rgba(14,20,32,0));
  font-size: 12px; color: var(--muted);
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
.dock nav { display: flex; gap: 14px; flex-wrap: wrap; }
.dock a { color: var(--muted); }
.dock a:hover { color: var(--beam); }
.readmore {
  background: none; border: 0; color: var(--muted); font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.readmore:hover { color: var(--beam); }

/* --------------------------------------------------------------- toast */

.toast {
  position: absolute; left: 50%; bottom: 58px; transform: translate(-50%, 12px);
  z-index: 30; background: var(--beam); color: var(--beam-ink);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  box-shadow: var(--shadow); max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { background: var(--ink-3); color: var(--paper); border: 1px solid var(--line); }

/* ------------------------------------------------------------- loading */

.booting {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center;
  background: var(--ink); color: var(--muted); font-size: 14px;
  transition: opacity .35s; text-align: center; padding: 20px;
}
.booting.gone { opacity: 0; pointer-events: none; }
.booting .pulse {
  display: block; width: 34px; height: 4px; margin: 0 auto 14px;
  background: var(--beam); border-radius: 2px; transform-origin: center;
  animation: beam 1.1s ease-in-out infinite;
}
@keyframes beam { 0%, 100% { transform: scaleX(.3); opacity: .45; } 50% { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .booting .pulse { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ longform */

.longform {
  background: var(--ink);
  border-top: 1px solid var(--line-soft);
  padding: 56px 20px 0;
}
.wrap { max-width: 720px; margin: 0 auto; }
.wrap.wide { max-width: 1080px; }

.longform h1, .longform h2, .longform h3 {
  font-family: var(--ui); letter-spacing: -0.022em; line-height: 1.22;
}
.longform h1 { font-size: clamp(27px, 4.4vw, 38px); font-weight: 800; margin: 0 0 14px; }
.longform h2 { font-size: clamp(20px, 2.8vw, 25px); font-weight: 700; margin: 42px 0 12px; }
.longform h3 { font-size: 17px; font-weight: 600; margin: 26px 0 8px; }

.longform p, .longform li {
  font-family: var(--prose); font-size: 17.5px; line-height: 1.68; color: #cdd5e4;
}
.longform p { margin: 0 0 16px; max-width: 68ch; }
.longform ul, .longform ol { padding-left: 22px; margin: 0 0 18px; max-width: 68ch; }
.longform li { margin-bottom: 7px; }
.lede { font-size: 19.5px !important; color: var(--paper) !important; }

.crumbs { font-size: 13px; color: var(--muted-2); margin: 0 0 18px; font-family: var(--ui); }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }

/* data table */
.facts {
  width: 100%; border-collapse: collapse; margin: 0 0 24px; font-family: var(--ui);
}
.facts th, .facts td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.facts th { color: var(--muted); font-weight: 500; width: 36%; }
.facts td { color: var(--paper); }

/* link grids */
.linkgrid { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 2px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.linkgrid li { margin: 0; font-family: var(--ui); }
.linkgrid a {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 9px 11px; border-radius: var(--r-sm); color: var(--paper);
  font-size: 14.5px; border: 1px solid transparent;
}
.linkgrid a:hover { background: var(--ink-2); border-color: var(--line); text-decoration: none; }
.linkgrid .n { color: var(--muted-2); font-size: 12.5px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* spot list on static pages */
.spots { list-style: none; padding: 0; margin: 0 0 26px; }
.spots li { border-top: 1px solid var(--line-soft); padding: 14px 0; }
.spots li:last-child { border-bottom: 1px solid var(--line-soft); }
.spots h3 { margin: 0 0 4px; font-size: 16.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.spots h3 .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.spots p { margin: 0; font-size: 15.5px; }
.spots .where { font-family: var(--ui); font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* mini map on static pages */
.minimap {
  height: 320px; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); margin: 0 0 26px; background: var(--ink-2);
  position: relative;
}
.minimap .holder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted-2); font-size: 13px; }

/* faq */
.faq { margin: 0 0 30px; }
.faq details {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  cursor: pointer; padding: 15px 0; font-family: var(--ui); font-size: 16px;
  font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--beam); font-size: 19px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details > p { margin: 0 0 16px; }

/* ad slots: empty on purpose, inner pages only */
.ad-slot {
  margin: 30px auto; max-width: 970px; min-height: 90px;
  border: 1px dashed var(--line-soft); border-radius: var(--r-md);
  display: grid; place-items: center; color: #3c4a63; font-size: 11px;
  font-family: var(--ui);
}
.ad-slot::after { content: 'Ad space'; }

/* page chrome for static pages */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 11px 20px;
  background: rgba(14, 20, 32, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--beam); }

.foot {
  border-top: 1px solid var(--line-soft); margin-top: 60px;
  padding: 34px 20px 46px; font-size: 13.5px; color: var(--muted);
}
.foot .wrap { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.foot h4 { margin: 0 0 8px; font-size: 13px; color: var(--paper); font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 5px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--beam); }
.foot .fine { grid-column: 1 / -1; color: var(--muted-2); font-size: 12.5px; border-top: 1px solid var(--line-soft); padding-top: 18px; }

/* ----------------------------------------------------------- responsive */

@media (max-width: 860px) {
  :root { --panel-w: auto; }

  .panel {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 72svh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    transition: transform .22s ease;
  }
  .panel::before {
    content: ''; display: block; width: 38px; height: 4px; border-radius: 2px;
    background: var(--line); margin: 8px auto 0; flex: 0 0 auto;
  }
  /* Collapsed still shows the name, the count and the search box. */
  .panel.collapsed { transform: translateY(calc(100% - 158px)); }
  .panel-head { padding-top: 8px; }
  .panel-body { max-height: 46svh; }

  .search input { padding-top: 13px; padding-bottom: 13px; font-size: 16px; }
  .actions button { padding: 11px 4px; }
  .hit { padding: 11px 9px; }
  .chip { padding: 8px 12px; font-size: 13px; }

  .dock { bottom: auto; top: 0; background: linear-gradient(to bottom, rgba(14,20,32,.95), rgba(14,20,32,0)); }
  .dock nav { display: none; }
  .map-credit { bottom: auto; top: 46px; right: 8px; font-size: 10px; max-width: 58vw; }
  .zoomer { bottom: auto; top: 92px; right: 8px; }
  .toast { bottom: auto; top: 50%; }

  .longform { padding-top: 40px; }
  .longform p, .longform li { font-size: 17px; }
  .linkgrid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .actions { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .actions button { font-size: 12px; }
}

/* A to Z letter navigation on the browse pages */
.letters {
  display: flex; flex-wrap: wrap; gap: 4px;
  font-family: var(--ui); margin: 0 0 24px;
}
.letters a, .letters .on {
  display: inline-grid; place-items: center;
  min-width: 36px; height: 36px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
}
.letters a { color: var(--paper); }
.letters a:hover { border-color: var(--beam); color: var(--beam); text-decoration: none; }
.letters .on { background: var(--beam-soft); border-color: var(--beam); color: var(--beam); }
