/* Kino prototype: map of links (pages-map.js). Theme tokens only, so all four themes follow. */

.map-head { margin: 8px 0 12px; }
.map-head h1 { margin: 4px 0 6px; }
.map-head a { color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* ---------- Drawing ---------- */

.map-stage {
  position: relative; width: 100%; max-width: 1100px; margin: 8px auto 0;
  height: clamp(560px, 72vh, 760px);
}
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-lines line { stroke: var(--line); vector-effect: non-scaling-stroke; transition: stroke .2s ease; }
.map-lines line.is-lit { stroke: var(--accent); }

.map-center, .map-node {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.map-center { left: 50%; top: 50%; width: 150px; z-index: 2; }
.map-node {
  width: 116px; padding: 6px; border-radius: 8px; z-index: 1;
  color: var(--fg); text-decoration: none;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
}
.map-node:hover, .map-node:focus-visible { z-index: 3; outline: 2px solid var(--accent); outline-offset: 2px; }
.map-node:hover .map-name, .map-node:focus-visible .map-name { color: var(--accent); }

.map-cover { display: block; width: 64px; }
.map-cover-center { width: 120px; }
.map-cover .cover-ratings { display: none; }   /* too small for the ratings badge */
.map-face {
  display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 20px; font-weight: 600;
}
.map-face img { width: 100%; height: 100%; object-fit: cover; }
.map-face-center { width: 120px; height: 120px; font-size: 36px; border-color: var(--accent); }
.map-center .map-name { font-size: 15px; font-weight: 700; }

.map-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.map-year { font-weight: 400; color: var(--muted); }
.map-why {
  font-size: 11px; line-height: 1.25; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.map-more { text-align: center; margin: 8px 0 0; }

/* ---------- List ---------- */

.map-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.map-item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: 8px;
}
.map-item .map-cover, .map-item .map-face { width: 56px; }
.map-item .map-face { height: 56px; }
.map-item-main { min-width: 0; }
.map-item-name { font-weight: 700; color: var(--fg); text-decoration: none; }
.map-item-name:hover, .map-item-name:focus-visible { color: var(--accent); }
.map-reasons { margin: 6px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.map-reasons li + li { margin-top: 2px; }
.map-item-page { color: var(--muted); white-space: nowrap; }
.map-item-page:hover { color: var(--accent); }

.map-empty { margin-top: 16px; padding: 24px; border: 1px dashed var(--line); border-radius: 8px; max-width: 70ch; }
.map-empty p { margin: 0 0 6px; }

/* Entry links on the film, person and director pages. */
.map-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--fg); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.map-link:hover { color: var(--accent); }

/* Phones: the drawing is too small to read, the list says it all. */
@media (max-width: 760px) {
  .map-stage, .map-more { display: none; }
  .map-list { grid-template-columns: 1fr; }
}
