.tour-body {
  background: var(--cream-dark);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

body.no-scroll {
  overflow: hidden;
}

/* Top bar */
.tour-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  /* Extra ruimte rechts, zodat de inhoud niet onder het zwevende puntenvakje
     terechtkomt (dat vakje reserveert geen ruimte meer in deze flex-rij).
     Gekalibreerd op een realistisch puntenbereik (tot en met 3 cijfers);
     de ellipsis op .progress-label vangt echt extreme gevallen daarnaast op. */
  padding-right: 140px;
  background: var(--ink);
}

.tour-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tour-logo img {
  border-radius: 22%;
  flex-shrink: 0;
}

.progress-track {
  flex: 1;
  min-width: 0;
  height: 8px;
  background: rgba(250, 243, 232, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.4s ease;
}

.progress-label {
  color: var(--cream-dark);
  font-size: 0.85rem;
  white-space: nowrap;
  /* Mag als laatste, uiterste redmiddel afgekapt worden i.p.v. onder het
     zwevende puntenvakje door te lopen — het puntenvakje zelf wisselt in
     breedte mee met het aantal cijfers, dus een vaste ruimte-reservering
     alleen is niet waterdicht op smalle schermen. */
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Zwevend puntenvakje — blijft net als de "?"-knop zichtbaar tijdens het
   scrollen, precies op het moment dat je vaak wil weten of je nog een hint
   kan betalen. */
.points-label {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 55;
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--brick);
  font-family: 'Instrument Serif', serif;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(43, 36, 28, 0.3);
}

/* Layout */
.tour-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  min-height: calc(100vh - 64px);
}

/* Zodra de zwevende navigatie in beeld is, extra ruimte onderaan reserveren
   zodat een kort scherm (bv. het fooi/review-scherm) er niet onder verdwijnt. */
body.has-floating-nav .tour-main {
  padding-bottom: 180px;
}

.tour-screen {
  width: 100%;
  display: flex;
  justify-content: center;
}

.tour-screen.hidden {
  display: none;
}

.tour-card {
  background: var(--cream);
  border-radius: 12px;
  padding: 48px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(43, 36, 28, 0.12);
}

.tour-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--brick);
  font-weight: 500;
  margin-bottom: 14px;
}

.tour-card h1 {
  font-size: clamp(1.4rem, 5.5vw, 2rem);
  overflow-wrap: break-word;
  word-break: break-word;
  margin-bottom: 20px;
}

.tour-card > p {
  color: var(--ink-soft);
  margin-bottom: 32px;
}

/* Hint box */
.hint-box {
  background: var(--cream-dark);
  border: 1px dashed var(--gold);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
  text-align: left;
}

.hint-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--brick);
  margin-bottom: 6px;
  font-weight: 500;
}

.hint-box p {
  font-family: 'Instrument Serif', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.4;
}

.hint-box p.hint-tip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--ink-soft);
  margin-top: 10px;
}

.hint-box.extra-hint {
  background: #f0e0d0;
  border-style: solid;
}

.hint-box.extra-hint .hint-label {
  color: var(--gold);
}

/* Routekeuzescherm */
.route-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 28px 0;
}

.route-option {
  display: block;
  width: 100%;
  background: var(--cream-dark);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 20px 22px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  font-family: inherit;
  color: inherit;
}

.route-option:hover {
  background: #f0e0d0;
  transform: translateY(-1px);
}

.route-option-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: var(--brick);
  margin-bottom: 4px;
}

.route-option-desc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.route-option-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--brick);
  margin-top: 8px;
}

/* Mini-kaartje bij een extra hint — wijst precies naar de echte locatie. */
.hint-map {
  height: 160px;
  border-radius: 6px;
  border: 2px solid var(--gold);
  overflow: hidden;
  margin-top: 12px;
  position: relative;
  z-index: 0;
}

.hint-map.hidden {
  display: none;
}

/* Photo zone */
.photo-zone {
  margin-bottom: 32px;
}

.photo-instruction {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.photo-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brick);
  color: var(--cream);
  padding: 14px 28px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.photo-upload:hover {
  background: var(--brick-dark);
}

.photo-upload.done {
  background: #4c7a4c;
}

.photo-preview {
  display: block;
  margin: 20px auto 0;
  max-width: 100%;
  max-height: 240px;
  border-radius: 8px;
  border: 3px solid var(--gold);
}

.photo-preview.hidden {
  display: none;
}

.photo-status {
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 500;
}

.photo-status.hidden {
  display: none;
}

.photo-status.analyzing { color: var(--ink-soft); }
.photo-status.matched { color: #3d6b3d; }
.photo-status.mismatch { color: var(--brick); }

.btn-text {
  display: inline-block;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-text.hidden {
  display: none;
}

/* Rechtsonder op de kaart — de enige hoek die nog vrij is: linksboven zitten
   Leaflets eigen zoomknoppen, rechtsboven de vergroot-knop, linksonder de
   recenter-knop (die soms tegelijk zichtbaar is, bv. nog geen locatie én net
   handmatig gezoomd). */
.btn-enable-location {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 10;
  max-width: calc(100% - 20px);
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--brick);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(43, 36, 28, 0.45);
  transition: background 0.2s, transform 0.2s;
}

.btn-enable-location:hover {
  background: var(--gold);
  transform: scale(1.03);
}

.btn-enable-location.hidden {
  display: none;
}

/* Info-tussenscherm (tussen elke stop) */
.info-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.info-actions .btn-secondary {
  width: 100%;
}

.info-content {
  background: var(--cream-dark);
  border: 1px dashed var(--gold);
  border-radius: 8px;
  padding: 20px;
  text-align: left;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.info-content.hidden {
  display: none;
}

/* Kaartscherm */
.map-card {
  max-width: 640px;
}

/* Het vaste "venster" waarin de kaart getoond wordt — rand, ronde hoeken en
   overflow:hidden zitten hier (i.p.v. op .map-container zelf), omdat de kaart
   nu bij het meedraaien (zie .map-rotate-wrapper) groter is dan dit venster. */
.map-viewport {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  border: 3px solid var(--gold);
  overflow: hidden;
  position: relative;
}

/* Groter dan het venster (en gecentreerd eroverheen), zodat een gedraaide hoek
   nooit een lege rand laat zien — zie setMapRotation() in tour.js. Alleen déze
   laag draait; de rand/ronde hoeken van .map-viewport en alle knoppen eromheen
   staan hierbuiten en blijven dus altijd rechtop. */
.map-rotate-wrapper {
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  transform-origin: 50% 50%;
  /* Bewust geen CSS-transition: de afvlakking gebeurt al in JS (smoothHeading,
     via requestAnimationFrame), en een transitie bovenop een doel dat tientallen
     keren per seconde verspringt gaf juist de hortende/glitchy beweging. */
}

.map-container {
  width: 100%;
  height: 100%;
  /* Leaflet geeft zijn eigen binnenlagen (tegels, cirkels) een hoge interne
     z-index. Zonder eigen stacking-context hier "lekt" dat naar buiten en komt
     de vergroot-knop er per ongeluk onder te liggen — vandaar deze regel. */
  position: relative;
  z-index: 0;
}

/* Wikkelt om een kaartje heen zodat de vergroot-knop er los bovenop kan liggen,
   zonder door de afgeronde/overflow-hidden rand van de kaart zelf afgesneden te worden. */
.map-wrap {
  position: relative;
  margin-bottom: 24px;
}

.map-wrap.hidden {
  display: none;
}

.map-expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 2px solid #fff;
  background: var(--gold);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(43, 36, 28, 0.45);
  transition: background 0.2s, transform 0.2s;
}

.map-expand-btn svg {
  width: 18px;
  height: 18px;
}

.map-expand-btn:hover {
  background: var(--brick);
  transform: scale(1.06);
}

/* Compasknop ("kaart meedraaien") — direct onder de vergroot-knop, rechtsboven.
   De pijl erin wijst altijd naar het echte noorden (zie setMapRotation() in
   tour.js), ook als de kaart zelf gedraaid staat. */
.map-rotate-btn {
  position: absolute;
  top: 58px;
  right: 10px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 2px solid #fff;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(43, 36, 28, 0.45);
  transition: background 0.2s, transform 0.2s;
}

.map-rotate-btn:hover {
  transform: scale(1.06);
}

.map-rotate-btn.active {
  background: var(--gold);
  color: #fff;
}

#rotateNorthArrow {
  transform-origin: 12px 12px;
}

/* Knop "Toon mij en de volgende stop" — verschijnt alleen zodra de speler zelf
   aan de kaart heeft gezeten (gepand/gezoomd), zie initMapIfNeeded() in tour.js. */
.btn-recenter {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 10;
  max-width: calc(100% - 20px);
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--brick);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(43, 36, 28, 0.45);
  transition: background 0.2s, transform 0.2s;
}

.btn-recenter:hover {
  background: var(--gold);
  transform: scale(1.03);
}

.btn-recenter.hidden {
  display: none;
}

/* Uitvergrote kaartweergave — een bestaand kaartje verhuist hier tijdelijk naartoe */
.map-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.78);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.map-overlay.hidden {
  display: none;
}

.map-overlay-inner {
  width: 100%;
  max-width: 900px;
  height: 100%;
  border-radius: 12px;
  border: 3px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.map-overlay-inner > div {
  width: 100%;
  height: 100%;
}

.map-overlay-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 210;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background 0.2s;
}

.map-overlay-close:hover {
  background: var(--cream-dark);
}

/* Generiek uitleg-overlay (bv. Romeinse cijfers) */
.info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.78);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.info-overlay.hidden {
  display: none;
}

.info-overlay-inner {
  width: 100%;
  max-width: 560px;
  max-height: 100%;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 12px;
  border: 3px solid var(--gold);
  padding: 32px;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.info-overlay-inner h2 {
  font-family: 'Instrument Serif', serif;
  margin-bottom: 16px;
}

.info-overlay-inner p {
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 12px;
}

.info-overlay-inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-family: 'IBM Plex Mono', monospace;
}

.info-overlay-inner th,
.info-overlay-inner td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--cream-dark);
  text-align: left;
}

.info-overlay-inner th {
  color: var(--brick);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* Zwevende "?"-knop — opent de drie uitlegschermen (vraag/hints/foto) opnieuw,
   op elk moment tijdens de tour, zonder je voortgang te verstoren. */
.btn-help {
  position: fixed;
  top: 74px;
  right: 16px;
  z-index: 55;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--cream);
  color: var(--brick);
  font-family: 'Instrument Serif', serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(43, 36, 28, 0.3);
  transition: transform 0.15s, background 0.15s;
}

.btn-help:hover {
  background: var(--cream-dark);
  transform: scale(1.06);
}

.btn-help.hidden {
  display: none;
}

/* Overlay waar de drie uitlegschermen tijdelijk naartoe verhuizen — zelfde
   opzet als .map-overlay/.info-overlay hierboven. */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.78);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
}

.help-overlay.hidden {
  display: none;
}

.help-overlay-inner {
  width: 100%;
  max-width: 560px;
}

.stop-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.stop-marker.unlocked {
  background: var(--brick);
}

/* Start- en eindpunt krijgen een eigen, herkenbare kleur/icoon — los van de
   gewone (genummerde) stop-pins, ook als ze toevallig "current"/"unlocked" zijn. */
.stop-marker.start {
  background: #2f7d4f;
}

/* Antwoord-onthulscherm */
.reveal-map-container {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  border: 3px solid var(--gold);
  overflow: hidden;
}

.reveal-map {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 0;
}

.reveal-photo {
  display: block;
  width: 100%;
  max-height: 480px;
  /* "contain" i.p.v. "cover" — nooit bijsnijden, ongeacht de verhouding van de foto
     (anders vielen hoofden bovenaan portret-achtige foto's regelmatig buiten beeld). */
  object-fit: contain;
  background: var(--ink);
  border-radius: 8px;
  border: 3px solid var(--gold);
  margin-bottom: 20px;
}

.reveal-photo.hidden {
  display: none;
}

.reveal-answer-text {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.stop-marker.current {
  background: var(--gold);
}

.stop-marker.locked {
  background: #9a9284;
}

/* Eindpunt (laatste stop van de actieve route) krijgt een vlagicoon i.p.v. een
   nummer, ongeacht of hij nog "current" of al "unlocked" is — daarom pas hier
   gedefinieerd, ná .current/.locked, zodat deze regel wint. */
.stop-marker.finish {
  background: #8c1d1d;
  font-size: 1.05rem;
}

/* GPS/panorama minigame (nog te bouwen) */
.gps-zone {
  margin-bottom: 16px;
  text-align: center;
  background: var(--cream-dark);
  border: 1px dashed var(--gold);
  border-radius: 8px;
  padding: 18px 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Quiz-vraag */
.quiz-zone {
  margin-bottom: 16px;
  text-align: center;
}

.quiz-question {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 16px;
}

.quiz-input {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  border: 1px solid var(--ink-soft);
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  text-align: center;
  background: var(--cream);
  color: var(--ink);
}

.quiz-input:disabled {
  background: var(--cream-dark);
  color: var(--ink-soft);
}

/* Actions */
.step-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--ink-soft);
  color: var(--ink-soft);
  padding: 14px 28px;
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
  background: var(--ink-soft);
  color: var(--cream);
}

#btnNext:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

#btnNext:disabled:hover {
  background: var(--gold);
}

#btnStart, #btnNext {
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
}

/* Finish gallery */
.finish-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
}

.finish-gallery img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--gold);
}

#btnRestart {
  margin-top: 14px;
}

/* Eindscherm — persoonlijke statistieken */
.finish-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.finish-stat {
  background: var(--cream-dark);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 14px 8px;
  text-align: center;
}

.finish-stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brick);
}

.finish-stat-label {
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Eindscherm — badges */
.finish-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brick);
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.badge-chip-emoji {
  font-size: 1rem;
}

/* Eindscherm — delen */
.share-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.share-row .btn-secondary {
  flex: 1;
  min-width: 140px;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
}

#shareStatus {
  text-align: center;
  margin-bottom: 20px;
}

/* Eindscherm — scorebord */
.leaderboard-submit {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.leaderboard-submit input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--ink-soft);
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--ink);
}

.leaderboard-submit .btn-primary {
  flex-shrink: 0;
  padding: 12px 20px;
}

#leaderboardSubmitStatus {
  text-align: left;
  margin-bottom: 16px;
}

.leaderboard-box {
  text-align: left;
  margin-bottom: 28px;
}

.leaderboard-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 4px;
}

.leaderboard-tab {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--ink-soft);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.leaderboard-tab:hover {
  background: var(--cream-dark);
}

.leaderboard-tab.active {
  background: var(--gold);
  color: var(--ink);
}

.leaderboard-loading {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 10px 0;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.9rem;
}

.leaderboard-rank {
  width: 22px;
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brick);
}

.leaderboard-name {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-points {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.85rem;
}

.leaderboard-time {
  flex-shrink: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  min-width: 46px;
  text-align: right;
}

/* Feedback + review-scherm */
.review-block {
  margin-bottom: 24px;
  text-align: left;
}

.review-block-text {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

#feedbackText {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink-soft);
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
  margin-bottom: 10px;
}

#btnSubmitFeedback {
  width: 100%;
}

#feedbackStatus {
  margin-top: 10px;
}

/* .btn-secondary is verder alleen op <button>-elementen gebruikt; deze regel
   geldt puur voor de <a>-varianten hier (review-links). */
a.btn-secondary {
  display: inline-block;
  text-decoration: none;
}

.review-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.review-buttons .btn-secondary {
  flex: 1;
  min-width: 160px;
  text-align: center;
}

#screen-review .btn-primary.large {
  margin-top: 8px;
}

/* Introscherm — kleine iconen-rij die in het kort laat zien wat je te wachten staat */
.intro-features {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 4px 0 32px;
}

.intro-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 90px;
}

.intro-feature-icon {
  width: 36px;
  height: 36px;
  color: var(--brick);
}

.intro-feature-icon svg {
  width: 100%;
  height: 100%;
}

/* Uitlegschermen — animatie-mockup van hoe een opdracht in zijn werk gaat.
   Speelt zichzelf automatisch en in een lus af (zie startQuizDemo/startPhotoDemo
   in tour.js), dus dit is puur decoratieve opmaak — geen echte invoervelden. */
.mini-mockup {
  position: relative;
  margin: 24px 0 20px;
}

.mini-mockup-card {
  background: var(--cream-dark);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 20px;
  text-align: left;
}

.mini-mockup-kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--brick);
  margin-bottom: 8px;
  font-weight: 500;
}

.mini-mockup-hint {
  font-family: 'Instrument Serif', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 16px;
}

.mini-quiz-row {
  display: flex;
  gap: 8px;
}

.mini-quiz-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--ink-soft);
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  text-align: center;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.mini-quiz-input.focused {
  box-shadow: 0 0 0 3px rgba(155, 74, 46, 0.2);
  border-color: var(--brick);
}

.mini-caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  background: var(--ink);
  margin-left: 1px;
  vertical-align: -2px;
  opacity: 0;
}

.mini-caret.blinking {
  animation: miniCaretBlink 0.9s steps(1) infinite;
}

@keyframes miniCaretBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.mini-quiz-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--brick);
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 500;
  transition: transform 0.15s, background 0.15s;
}

.mini-quiz-btn.pressed {
  transform: scale(0.94);
  background: var(--brick-dark);
}

.mini-status {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Hints-uitlegscherm */
.mini-hint-row {
  display: flex;
  margin-bottom: 10px;
}

.mini-hint-row.hidden {
  display: none;
}

.mini-hint-row .mini-quiz-btn {
  flex: 1;
  text-align: center;
}

.mini-mockup-extra-hint {
  background: #f0e0d0;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Instrument Serif', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 10px;
}

.mini-mockup-extra-hint.hidden {
  display: none;
}

.mini-points-badge {
  position: absolute;
  background: var(--brick);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  opacity: 0;
  transform: translate(-50%, 0);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
}

.mini-points-badge.show {
  opacity: 1;
  transform: translate(-50%, -18px);
}

.mini-status.hidden { display: none; }
.mini-status.analyzing { color: var(--ink-soft); }
.mini-status.matched { color: #3d6b3d; }

/* Foto-variant — cameraperspectief dat over een mini-scene "zoemt" op zoek
   naar de bank, vergrendelt (reticle), de foto neemt (flits) en dan terug-
   zoemt naar het resultaat. Alle posities zijn px-gebaseerd; tour.js meet de
   werkelijke breedte van het kijkvenster op en berekent daarmee hoe ver de
   scene moet opschuiven zodat de bank precies gecentreerd uitkomt. */
.mini-photo-stage {
  position: relative;
  height: 230px;
  border-radius: 8px;
  border: 3px solid var(--gold);
  overflow: hidden;
  background: var(--cream);
}

.mini-viewfinder {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 2;
}

.mini-viewfinder.zoomed-out {
  transform: scale(0.85);
  opacity: 0;
}

.mini-viewfinder-scene {
  position: absolute;
  inset: 0;
  background-image: url('photos/demo-eiffeltoren.jpg');
  background-repeat: no-repeat;
  background-position: 12% 18%;
  background-size: 420% auto;
  transition: background-position 1.1s ease-in-out, background-size 1.1s ease-in-out;
}

.mini-viewfinder-reticle {
  position: absolute;
  left: 50%;
  top: 63%;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(250, 243, 232, 0.85);
  border-radius: 8px;
  transform: translate(-50%, -50%) scale(1.35);
  opacity: 0.85;
  transition: transform 0.4s ease, border-color 0.4s ease;
  z-index: 3;
}

.mini-viewfinder-reticle.locked {
  transform: translate(-50%, -50%) scale(1);
  border-color: var(--gold);
}

.vf-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(250, 243, 232, 0.7);
  z-index: 3;
  animation: vfCornerPulse 1.6s ease-in-out infinite;
}

.vf-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.vf-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.vf-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.vf-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

@keyframes vfCornerPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

.mini-viewfinder-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.mini-viewfinder-flash.flash {
  animation: miniPhotoFlash 0.3s ease-out;
}

@keyframes miniPhotoFlash {
  0% { opacity: 0; }
  15% { opacity: 0.9; }
  100% { opacity: 0; }
}

.mini-photo-result {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 1;
}

.mini-photo-result.visible {
  opacity: 1;
  transform: scale(1);
}

.mini-photo-result .mini-photo-preview {
  width: 100%;
  height: 100%;
  background-image: url('photos/demo-eiffeltoren.jpg');
  background-repeat: no-repeat;
  background-position: 50% 28%;
  background-size: 170% auto;
}

.demo-photo-credit {
  font-size: 0.7rem;
  color: var(--ink-soft);
  margin-top: -14px !important;
  margin-bottom: 24px !important;
}

.demo-photo-credit a {
  color: var(--ink-soft);
}

/* De zwevende "vinger"-cursor die de stappen in de mockup aanwijst */
.mini-cursor {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(43, 36, 28, 0.75);
  border: 2px solid var(--cream);
  box-shadow: 0 2px 8px rgba(43, 36, 28, 0.4);
  transform: translate(-50%, -50%);
  transition: left 0.6s ease, top 0.6s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.mini-cursor.visible { opacity: 1; }

.mini-cursor.tap {
  animation: miniCursorTap 0.35s ease-out;
}

@keyframes miniCursorTap {
  0% { transform: translate(-50%, -50%) scale(1); }
  40% { transform: translate(-50%, -50%) scale(0.7); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.instructions-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 24px !important;
}

/* Bolletjes-indicator + swipe op de drie uitlegschermen */
.instructions-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 4px;
  touch-action: pan-y;
}

.instructions-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: 1px solid var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.instructions-dot.active {
  background: var(--brick);
  border-color: var(--brick);
  transform: scale(1.3);
}

#screen-instructions,
#screen-instructions-hints,
#screen-instructions-photo {
  touch-action: pan-y;
}

@media (prefers-reduced-motion: reduce) {
  .mini-cursor {
    transition: none;
  }
}

@media (max-width: 600px) {
  .tour-card { padding: 32px 24px; }
}

/* Op smalle (iPhone-breedte) schermen is er simpelweg niet genoeg ruimte voor
   het woordmerk + de voortgangsbalk + het stopnummer; het stopnummer mag
   nooit afgekapt worden, dus die krijgt voorrang en de rest wijkt. */
@media (max-width: 480px) {
  .tour-topbar {
    padding: 14px 16px;
    gap: 8px;
  }
  .tour-logo span {
    display: none;
  }
  .progress-label {
    flex-shrink: 0;
  }
}

/* Onderste audiobalk — blijft staan tijdens het navigeren binnen dezelfde stop
   (kaart en opdracht), verdwijnt zodra je naar een andere stop gaat. */
.audio-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border-top: 2px solid var(--gold);
  padding: 10px 16px;
  box-shadow: 0 -6px 18px rgba(43, 36, 28, 0.15);
}

.audio-bar.hidden {
  display: none;
}

.audio-bar audio {
  flex: 1;
  min-width: 0;
  height: 36px;
}

.audio-bar-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.audio-bar-close:hover {
  background: var(--cream-dark);
  color: var(--ink);
}


/* Zwevende navigatie onderaan het scherm */
.floating-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 80px;
  display: flex;
  justify-content: center;
  gap: 28px;
  z-index: 50;
  pointer-events: none;
}

.floating-nav.hidden {
  display: none;
}

.nav-round-btn {
  pointer-events: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(43, 36, 28, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-round-btn svg {
  width: 32px;
  height: 32px;
}

.nav-round-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(43, 36, 28, 0.3);
}

.nav-round-btn-primary {
  background: var(--gold);
  color: var(--ink);
}

.nav-round-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 10px rgba(43, 36, 28, 0.15);
}

/* "Jouw locatie"-stip op de kaarten — een blauw bolletje met pulserende ring,
   zoals je van Google Maps kent. Bewust blauw, om 'm duidelijk te onderscheiden
   van de bruine/gouden stop-markers en zoekcirkels. */
.user-location-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4285f4;
  border: 3px solid #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.user-location-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.35);
  animation: user-location-pulse 2s infinite;
}

@keyframes user-location-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Kijkrichting-kegel, zoals bij Google Maps — punt bij de locatiestip, waaiert uit
   in de richting waar de telefoon naartoe wijst. Onzichtbaar totdat er een echte
   kompasmeting binnenkomt (zie startCompassTracking() in tour.js), en alleen op de
   hoofdkaart aangestuurd (zie updateHeadingCone()) — geen foutmelding als een
   toestel geen kompas heeft, dan blijft 'ie gewoon weg. */
.user-location-cone {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 26px solid rgba(66, 133, 244, 0.35);
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(0deg);
  pointer-events: none;
  display: none;
}

.user-location-cone.visible {
  display: block;
}
