@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --asphalt: #201E1B;
  --asphalt-2: #2C2925;
  --paper: #EFE8D8;
  --paper-2: #E4DBC5;
  --granite: #8B8377;
  --trail-red: #B23A2E;
  --trail-green: #3F5B45;
  --trail-yellow: #D9A441;
  --ink: #26221C;
  --ok: #3F5B45;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--asphalt);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.03) 0, transparent 40%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 6px);
}

.display {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-weight: 700;
  margin: 0.2em 0 0.4em;
  line-height: 1.05;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--granite);
  margin: 0 0 0.6em;
}

#app { min-height: 100vh; }

.screen {
  display: none;
  min-height: 100vh;
  padding: 20px 16px 40px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.screen.active { display: flex; }

.paper {
  background: var(--paper);
  border-radius: 4px;
  padding: 28px 22px 26px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  position: relative;
  margin-top: 24px;
}
.paper::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(38,34,28,0.15);
  pointer-events: none;
}

/* Trail blaze stripe - Czech tourist-marker motif */
.blaze {
  display: flex;
  width: 46px;
  height: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--ink);
}
.blaze .stripe { flex: 1; height: 100%; }
.blaze .white { background: var(--paper); }
.blaze .color { background: var(--trail-red); }

h1.display { font-size: 2rem; }
h2.display { font-size: 1.5rem; }

.intro-text p {
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 0.9em;
  color: var(--ink);
}
.intro-text em { color: var(--trail-red); font-style: normal; }

.stat-row {
  display: flex;
  gap: 22px;
  margin: 22px 0 26px;
  padding: 14px 0;
  border-top: 1px solid rgba(38,34,28,0.2);
  border-bottom: 1px solid rgba(38,34,28,0.2);
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.4rem; }
.stat-label { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--granite); }

.btn-primary, .btn-secondary, .btn-ghost {
  display: block;
  width: 100%;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 16px 18px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  margin-top: 12px;
}
.btn-primary {
  background: var(--trail-red);
  color: var(--paper);
}
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--granite);
  text-decoration: underline;
  font-family: 'Source Serif 4', serif;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  padding: 10px;
}
.hidden { display: none !important; }

.fineprint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--granite);
  text-align: center;
  margin-top: 16px;
}

/* --- Top bar / odometer --- */
.topbar {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--paper);
  padding: 4px 6px 0;
}
.odometer {
  font-family: 'JetBrains Mono', monospace;
  background: var(--asphalt-2);
  border: 1px solid rgba(239,232,216,0.25);
  padding: 6px 12px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.odometer-sep { color: var(--granite); margin: 0 2px; }
.odometer-label { font-size: 0.6rem; text-transform: uppercase; color: var(--granite); margin-left: 8px; letter-spacing: 0.08em; }
.stampstrip { display: flex; gap: 3px; }
.stampstrip .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(239,232,216,0.2);
  border: 1px solid rgba(239,232,216,0.35);
}
.stampstrip .dot.done { background: var(--trail-yellow); border-color: var(--trail-yellow); }

.stop-card { margin-top: 14px; }
.stop-hint { font-size: 0.95rem; color: var(--ink); line-height: 1.5; margin: 0 0 20px; }

.stage { display: none; margin-top: 6px; }
.stage.active { display: block; }
.stage-title { font-family: 'Oswald', sans-serif; text-transform: uppercase; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.06em; color: var(--trail-red); margin: 0 0 8px; }
.stage-desc { font-size: 0.95rem; line-height: 1.5; margin: 0 0 14px; }

/* GPS widget */
.gps-widget {
  text-align: center;
  padding: 26px 10px;
  background: var(--paper-2);
  border-radius: 3px;
  margin-bottom: 14px;
}
.gps-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--granite);
  margin: 0 auto 14px;
  transition: background 0.3s;
}
.gps-dot.searching { animation: pulse 1.4s infinite ease-in-out; background: var(--trail-yellow); }
.gps-dot.ok { background: var(--ok); }
.gps-dot.far { background: var(--trail-red); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}
#gps-status { font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.03em; margin: 0 0 6px; }
.gps-distance { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--granite); margin: 0; }

/* Photo stage */
.photo-label { display: block; }
#photo-input { position: absolute; left: -9999px; }
#photo-preview-wrap { margin-top: 14px; text-align: center; }
#photo-preview { max-width: 100%; border-radius: 3px; border: 1px solid rgba(38,34,28,0.2); }
.upload-status { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--ok); margin-top: 10px; min-height: 1em; }

/* Quiz */
.quiz-question { font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  text-align: left;
  padding: 14px 16px;
  border: 1.5px solid rgba(38,34,28,0.3);
  border-radius: 3px;
  background: var(--paper-2);
  font-family: 'Source Serif 4', serif;
  font-size: 0.98rem;
  cursor: pointer;
}
.quiz-option.selected { border-color: var(--ink); }
.quiz-option.correct { background: var(--trail-green); color: var(--paper); border-color: var(--trail-green); }
.quiz-option.wrong { background: var(--trail-red); color: var(--paper); border-color: var(--trail-red); }
.quiz-feedback { font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; margin-top: 12px; min-height: 1em; }

/* Stamp */
.stamp {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--trail-red);
  border: 3px solid var(--trail-red);
  border-radius: 50%;
  padding: 10px 6px;
  transform: rotate(-8deg);
  font-size: 0.7rem;
  width: 78px; height: 78px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  line-height: 1.1;
}
.big-stamp { width: 120px; height: 120px; font-size: 0.95rem; border-width: 4px; margin-bottom: 18px; }

/* Finish screen */
.finish-card { text-align: center; }
.confetti { position: fixed; inset: 0; pointer-events: none; }

@media (min-width: 600px) {
  h1.display { font-size: 2.5rem; }
}
