/* ============================================================
   Design tokens — "field journal" identity for the public /
   presenter side of the hunt (B's view).
   ============================================================ */
:root {
  --parchment:      #EDE6D2;
  --parchment-deep: #E1D5AF;
  --ink:            #241F16;
  --ink-soft:       #55503F;
  --brass:          #A8752E;
  --brass-light:    #C99A4E;
  --moss:           #4C6E52;
  --moss-deep:      #34492F;
  --rust:           #99432B;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  --radius: 3px;
  --shadow-card: 0 1px 0 rgba(36, 31, 22, 0.05), 0 12px 24px -16px rgba(36, 31, 22, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body.journal {
  background:
    radial-gradient(ellipse at top left, rgba(255,255,255,0.35), transparent 55%),
    var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  padding: 32px 18px 64px;
}

a { color: var(--brass); }

.wrap {
  max-width: 620px;
  margin: 0 auto;
}

/* ---- Masthead ---- */
.masthead {
  text-align: left;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(36,31,22,0.15);
}
.masthead .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.masthead h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  margin: 4px 0 0;
  line-height: 1.15;
}
.member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.mono-inline {
  font-family: var(--font-mono);
  background: rgba(36,31,22,0.08);
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 1px;
}
.switch-link {
  font-size: 12px;
  text-decoration: underline;
}
.clue-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid rgba(36,31,22,0.15);
}

/* ---- Trail of treasures ---- */
.trail {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 24px 0 30px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.trail-node {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  position: relative;
}
.trail-line {
  flex: 1 1 auto;
  height: 2px;
  min-width: 18px;
  background-image: linear-gradient(to right, var(--ink-soft) 40%, transparent 0%);
  background-size: 8px 2px;
  opacity: 0.45;
  margin: 0 -2px;
  transform: translateY(-11px);
}
.trail-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 2px solid var(--ink-soft);
  background: var(--parchment);
  color: var(--ink-soft);
}
.trail-node.found .trail-dot {
  background: var(--moss);
  border-color: var(--moss-deep);
  color: #fff;
}
.trail-node.current .trail-dot {
  background: var(--brass);
  border-color: var(--brass-light);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(168,117,46,0.18);
}
.trail-node.locked .trail-dot { opacity: 0.55; }
.trail-node .trail-label {
  font-size: 10px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-family: var(--font-mono);
}

/* ---- Card ---- */
.card {
  background: var(--parchment-deep);
  border: 1px solid rgba(36,31,22,0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 26px;
  margin-bottom: 20px;
  position: relative;
}
.card.final {
  background: linear-gradient(180deg, #F2E6C4, #E7D6A2);
  border-color: var(--brass);
}
.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.stars { color: var(--brass); letter-spacing: 1px; }

.clue-text {
  font-family: var(--font-display);
  font-size: 26px;
  font-style: italic;
  line-height: 1.35;
  margin: 6px 0 20px;
}

.landmark-box {
  background: rgba(255,255,255,0.4);
  border-left: 3px solid var(--brass);
  padding: 12px 14px;
  font-size: 15px;
  margin-bottom: 20px;
}
.landmark-box strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 4px;
  font-weight: 500;
}

.hints-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.hints-list li {
  font-size: 14px;
  padding: 8px 0;
  border-top: 1px dashed rgba(36,31,22,0.2);
}
.hints-list li:first-child { border-top: none; }

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 0.08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--parchment);
}
.btn-primary:hover { background: #362f21; }
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: rgba(36,31,22,0.06); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.note {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---- Modal ---- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(36,31,22,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}
.overlay.open { display: flex; }
.modal {
  background: var(--parchment);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-card);
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 6px;
}
.modal p { font-size: 14px; color: var(--ink-soft); margin-top: 0; }
.code-input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  margin: 14px 0;
}
.code-input:focus { outline: 3px solid var(--brass-light); outline-offset: 1px; }
.feedback {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-top: 8px;
  display: none;
}
.feedback.show { display: block; }
.feedback.ok { background: rgba(76,110,82,0.15); color: var(--moss-deep); }
.feedback.err { background: rgba(153,67,43,0.15); color: var(--rust); }

/* ---- Reveal screen ---- */
.reveal {
  text-align: center;
  padding: 40px 26px;
}
.reveal .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.reveal h2 {
  font-family: var(--font-display);
  font-size: 36px;
  margin: 8px 0 14px;
}
.reveal img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 16px 0;
}
.reveal p { font-size: 16px; color: var(--ink-soft); }

.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 30px;
}

@media (max-width: 480px) {
  .clue-text { font-size: 22px; }
  .card { padding: 22px 18px; }
}
