/* Explore pages (photo location game) — extends styles.css + quiz.css.
   Only what the quiz pages don't already have: the tappable map, pins, photo
   cards with credits, and the dot map on country pages. Colours are tokens. */

/* ---- The on-page round ---- */
.xp-game { max-width: 760px; }
.xp-game .mq-body { justify-items: stretch; }
.xp-game .mq-start { justify-self: start; }
.xp-after:empty { display: none; }

.xp-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 440px;
  object-fit: contain;
  display: block;
  background: var(--paper-alt);
  border: 2px solid var(--ink);
  border-radius: 10px;
}

/* The map you tap. Land is the ochre used on every other map on the site. */
.xp-map { margin-top: 0.9rem; }
.xp-map svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--ivory);
  border: 2px solid var(--ink);
  border-radius: 10px;
  cursor: crosshair;
  touch-action: manipulation;
}
.xp-map svg .land path { fill: var(--shape); stroke: var(--shape-line); stroke-width: 0.4; stroke-linejoin: round; }
.xp-map.is-locked svg { cursor: default; }
.xp-map-cap { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-muted); margin: 0.5rem 0 0; text-align: center; letter-spacing: 0.04em; }

.xp-pin-guess { fill: var(--coral); stroke: var(--ink); }
.xp-pin-true { fill: var(--teal); stroke: var(--ink); }
.xp-line { stroke: var(--ink); fill: none; stroke-linecap: round; }

.xp-result { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.2; }
.xp-result b { color: var(--coral-dark); }
.xp-result .xp-pts { color: var(--teal-dark); }
.xp-answer { margin: 0; font-weight: 700; }
.xp-answer span { font-weight: 400; color: var(--ink-soft); }
.xp-after .xp-fact { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.xp-next { justify-self: start; }
.xp-total { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 0; line-height: 1; }
.xp-total b { color: var(--coral-dark); }
.xp-total small { font-size: 1rem; font-weight: 400; color: var(--ink-muted); font-family: var(--mono); }
.xp-rounds { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-muted); margin: 0; }

/* ---- Photo cards (the page's content and the game's pool) ---- */
.xp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.xp-card {
  margin: 0;
  background: var(--ivory);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.xp-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--paper-alt);
  border-bottom: 2px solid var(--ink);
}
.xp-card figcaption { padding: 0.75rem 0.85rem 0.85rem; display: grid; gap: 0.35rem; }
.xp-name-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.xp-name { font-size: 0.95rem; font-weight: 700; line-height: 1.25; }
.xp-diff {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  color: var(--ink);
  background: var(--paper);
}
.xp-diff-easy { background: var(--teal-soft); }
.xp-diff-hard { background: var(--mustard-soft); }
.xp-diff-expert { background: var(--coral-soft); }
.xp-country { font-family: var(--mono); font-size: 0.7rem; color: var(--coral-dark); letter-spacing: 0.06em; text-transform: uppercase; }
.xp-card .xp-fact { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; }
.xp-credit { font-size: 0.68rem; color: var(--ink-muted); line-height: 1.35; margin-top: 0.15rem; }
.xp-credit a { color: inherit; text-decoration: underline; }

/* ---- Country dot map ---- */
.xp-figure svg .dots circle { fill: var(--coral); stroke: var(--ink); stroke-width: 1.2; cursor: pointer; transition: r 0.1s ease; }
.xp-figure svg .dots circle:hover, .xp-figure svg .dots circle.is-active { fill: var(--coral-dark); r: 7; }
.xp-figure svg .land path { fill: var(--shape); stroke: var(--shape-line); stroke-width: 0.4; stroke-linejoin: round; }

/* ---- Country grid on the landing page (flag cards as links) ---- */
.xp-country-card { color: var(--ink); text-decoration: none; transition: transform 0.1s ease, box-shadow 0.1s ease; }
.xp-country-card:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: 2px 3px 0 var(--ink); background: var(--coral-soft); }
.xp-note { margin: 0.9rem 0 0; }

/* ---- Scoring table ---- */
.xp-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.xp-table { max-width: 640px; min-width: 420px; }
.xp-table th:not(:first-child), .xp-table td.ct-cap { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
  .xp-figure svg .dots circle { r: 7; }
  .xp-figure svg .dots circle:hover, .xp-figure svg .dots circle.is-active { r: 9; }
  .xp-photo { max-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .xp-country-card, .xp-figure svg .dots circle { transition: none; }
  .xp-country-card:hover { transform: none; }
}
