/* Character Trail — mobile-first styles.

   The colour variables are the trail's theme: a trail config may
   override any of them through its "theme" block (app.js writes them
   onto :root), so nothing below hard-codes a brand colour. */

:root {
  --ink: #24211c;
  --paper: #f7f1e3;
  --card: #fffdf7;
  --primary: #002147;
  --accent: #c8a44d;
  --success: #2e7d32;
  --danger: #a4382c;
  --muted: #6b6455;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(36, 33, 28, 0.18);
}

* {
  box-sizing: border-box;
}

/* The app shows and hides screens, sheets and buttons with the hidden
   attribute; this keeps it winning over any display rule below. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  touch-action: manipulation;
}

main {
  height: 100%;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--primary);
}

h2 {
  font-size: 1.1rem;
}

code {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* --- Screens ------------------------------------------------------ */

.screen--card {
  max-width: 620px;
  margin: 0 auto;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lede {
  font-size: 1.05rem;
}

.how-to {
  margin: 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.4rem;
}

.note {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: var(--radius);
  padding: 0.25rem 1rem;
}

.note-muted,
.privacy {
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Buttons ------------------------------------------------------ */

.btn {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: inherit;
  text-decoration: none;
}

/* --- Map mode ----------------------------------------------------- */

.screen--map {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.map-topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem 0.4rem 1rem;
  padding-top: max(0.4rem, env(safe-area-inset-top));
  background: var(--primary);
  color: #fff;
}

.map-topbar-title {
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-progress {
  font: inherit;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  min-height: 40px;
  font-size: 0.9rem;
  color: inherit;
  cursor: pointer;
}

.map-topbar :focus-visible {
  outline-color: #fff;
}

.map-viewport {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.map-canvas {
  position: relative;
  /* Keep the artwork legible on narrow phones; pan via native scroll. */
  width: max(100%, 640px);
}

.map-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
}

/* --- Stop markers ------------------------------------------------- */

.stop-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  background: var(--card);
  color: var(--primary);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  padding: 0;
}

.stop-marker.is-collected {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.stop-marker img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}

.stop-marker.is-collected[data-face="stamp"] {
  background: var(--card);
  padding: 2px;
  animation: stamp-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes stamp-in {
  from {
    transform: translate(-50%, -50%) scale(1.6);
  }
}

.stop-marker--finale {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--primary);
  font-size: 1.4rem;
}

.stop-marker--finale.is-locked {
  background: var(--card);
  border-style: dashed;
  color: var(--muted);
  border-color: var(--muted);
  box-shadow: none;
}

.stop-marker--finale:not(.is-locked):not(.is-collected) {
  animation: finale-pulse 1.6s ease-in-out infinite;
}

@keyframes finale-pulse {
  50% {
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 35%, transparent);
  }
}

/* Highlight for the nearest uncollected stops after a scan.
   Gold glow that stays subtle over the illustrated map. */
.stop-marker.is-nearest {
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent),
    0 2px 12px rgba(36, 33, 28, 0.18);
  animation: nearest-pulse 2s ease-in-out infinite;
}

@keyframes nearest-pulse {
  50% {
    box-shadow:
      0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent),
      0 2px 12px rgba(36, 33, 28, 0.18);
  }
}

/* --- Stop bottom sheet -------------------------------------------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 33, 28, 0.35);
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 620px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 20px rgba(36, 33, 28, 0.25);
  padding: 1rem 1.25rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.sheet.is-open {
  transform: translateY(0);
}

.sheet-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--primary);
}

.sheet p {
  margin: 0;
}

.sheet-hint-photo {
  display: block;
  width: 100%;
  max-height: 40vh;
  object-fit: cover;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.sheet-directions {
  color: var(--ink);
  font-size: 0.95rem;
}

.sheet-directions-label {
  font-weight: 700;
  color: var(--primary);
  margin-right: 0.3em;
}

.sheet-scan {
  /* Primary-styled Scan button — offered on every sheet, whether the
     stop is collected or not, so free-roam re-scanning works. */
  background: var(--primary);
  color: #fff;
}

/* --- Settings ----------------------------------------------------- */

.setting {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.6rem 0.9rem;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: var(--radius);
  cursor: pointer;
}

.setting input {
  width: 24px;
  height: 24px;
  margin-top: 0.15rem;
  accent-color: var(--primary);
  flex: none;
}

.setting small {
  display: block;
  color: var(--muted);
}

/* --- AR scan mode ------------------------------------------------- */

.screen--ar {
  position: fixed;
  inset: 0;
  background: #000;
}

/* MindAR injects its camera feed and canvas as absolutely positioned
   children, so the stage is a plain full-bleed container.
   It sizes and offsets the camera video itself so that the feed and the
   3D projection share one framing, and A-Frame sizes its own canvas to
   the stage, so neither is given a size here: forcing them to 100% used
   to override MindAR's framing and left the character drawn away from
   the marker whenever the viewport was not the same shape as the camera
   frame (a phone held sideways, a tablet). The stage only has to clip
   whatever MindAR positions outside it. */
/* A-Frame's own enter-VR and enter-AR buttons have no place over a
   marker scan; the scene asks for them to be off, and this makes sure. */
.a-enter-vr,
.a-enter-ar,
.a-enter-vr-button,
.a-enter-ar-button {
  display: none !important;
}

.ar-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* One wrapper per scan, so teardown can remove everything MindAR
   appended in a single step. */
.ar-session {
  position: absolute;
  inset: 0;
}

/* Field diagnostics (?diag=1): deliberately plain and dense. It sits
   above the camera picture during a scan, so it has to stay readable
   against anything behind it without hiding the marker view. */
.ar-diag {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: 3.25rem;
  z-index: 4;
  background: rgba(0, 0, 0, 0.72);
  color: #e8ffe8;
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.7rem;
  line-height: 1.45;
}

.ar-diag pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.ar-diag-copy {
  margin-top: 0.4rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ar-gate,
.ar-error {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow-y: auto;
  background: var(--paper);
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  max-width: 620px;
  margin: 0 auto;
}

.ar-gate-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ar-gate h2,
.ar-error h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--primary);
}

.ar-gate-photo {
  display: block;
  width: 100%;
  max-height: 34vh;
  object-fit: cover;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.ar-gate-hint,
.ar-error p {
  margin: 0;
}

.ar-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* The overlay is a HUD: only its own controls take pointer events,
     so taps pass through to the AR scene everywhere else. */
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.ar-topbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  padding-top: max(0.5rem, env(safe-area-inset-top));
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
  color: #fff;
}

.ar-exit {
  pointer-events: auto;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ar-title {
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.ar-hud {
  margin: auto auto 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
}

.ar-captions {
  margin: 0.6rem 0.75rem;
  margin-bottom: max(0.6rem, env(safe-area-inset-bottom));
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  /* Near-opaque black behind white text: captions have to stay legible
     over an unpredictable camera image. */
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.4;
  text-align: center;
  white-space: pre-line;
}

/* --- Reward + collection overlays ------------------------------- */

.reward {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 20px rgba(36, 33, 28, 0.25);
  padding: 1.25rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.reward.is-open {
  transform: translateY(0);
}

.reward h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
}

.reward p {
  margin: 0;
}

.reward .btn {
  margin-top: 0.3rem;
}

.reward-stamp {
  width: 132px;
  height: 132px;
  animation: reward-pop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes reward-pop {
  0% {
    transform: scale(0.2) rotate(-25deg);
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
}

.stamp-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.6rem;
  margin: 0.3rem 0;
}

.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.stamp img,
.stamp-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

/* Uncollected: an empty dashed ring with the stop number inside. */
.stamp-ring {
  display: grid;
  place-items: center;
  border: 3px dashed var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.stamp-name {
  line-height: 1.2;
}

.stamp.is-collected .stamp-name {
  color: var(--ink);
  font-weight: 600;
}

/* --- Offline panel + update toast --------------------------------- */

.offline-panel,
.keep-panel {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--primary) 15%, transparent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem 1rem;
}

.offline-panel h2,
.keep-panel h2 {
  margin: 0;
}

/* Long and unmemorable by nature, so it is shown in a field the visitor
   can select from rather than as text they would have to transcribe. */
.keep-link {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  border-radius: calc(var(--radius) / 2);
  background: var(--paper);
  color: var(--ink);
}

.reward-install {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  text-align: left;
}

.reward-install p {
  margin: 0;
  font-size: 0.95rem;
}

/* --- A giving trail's completion screen -------------------------- */

/* The charity block comes first and reads as the point of the screen:
   the charity's words, the running total, where the money goes. */
.reward-giving {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary) 9%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  text-align: left;
}

.reward-giving-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.reward-giving-honesty {
  font-size: 0.85rem;
  color: var(--muted);
}

/* The divider and the card below it are deliberately quieter than the
   charity block above: a different thing, asked for separately. */
.reward-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
  margin: 0.5rem 0 0;
}

.reward-review {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  text-align: left;
  font-size: 0.92rem;
  color: var(--muted);
}

.reward-review h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

/* --- The small act ----------------------------------------------- */

.act-sheet {
  text-align: center;
}

.act-prompt {
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--ink);
}

.act-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.act-option {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
}

.act-list {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 1rem 0.75rem 1.75rem;
  text-align: left;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  line-height: 1.6;
}

.act-list .is-pledge {
  font-weight: 700;
  color: var(--primary);
}

.act-list .is-pledge::after {
  content: ' (you chose this)';
  font-weight: 400;
  color: var(--muted);
}

.act-reply {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--primary);
}

.offline-panel > div {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.offline-status {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

.toast-btn {
  min-height: 40px;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* --- Seasonal decor ----------------------------------------------- */

/* Snow: two drifting layers of radial-gradient flakes, drawn above the
   paper and below every control. Pure CSS, no images, and it stays off
   the camera view. */
.decor {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

body.is-ar .decor {
  display: none;
}

.decor[data-decor="snow"]::before,
.decor[data-decor="snow"]::after {
  content: "";
  position: absolute;
  inset: -340px 0 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px),
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 2px, transparent 3px);
  background-size: 180px 220px, 260px 300px;
  background-position: 20px 0, 140px 90px;
  animation: snow-fall 14s linear infinite;
  opacity: 0.7;
}

.decor[data-decor="snow"]::after {
  background-size: 300px 340px, 220px 260px;
  background-position: 90px 40px, 10px 160px;
  animation-duration: 22s;
  opacity: 0.45;
}

@keyframes snow-fall {
  to {
    transform: translateY(340px);
  }
}

/* Everything interactive sits above the decor layer. */
.screen--card,
.map-topbar {
  position: relative;
  z-index: 2;
}

.sheet-backdrop,
.sheet,
.reward {
  z-index: 3;
}

/* --- Dev overlay -------------------------------------------------- */

.dev-overlay {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  right: 0.5rem;
  z-index: 10;
  width: 230px;
  background: rgba(20, 24, 31, 0.88);
  color: #e8e6df;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dev-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Collapsed, the panel is only its heading, so the map underneath can
   be tapped. It shrinks to fit rather than holding the full width. */
.dev-overlay.is-collapsed {
  width: auto;
}

.dev-toggle {
  font: inherit;
  line-height: 1;
  /* A real touch target: this is the control that gets the panel out
     of the way, so it has to be reachable with a thumb. */
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #a7a396;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.dev-overlay h2 {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.dev-overlay p {
  margin: 0;
}

.dev-hint {
  color: #a7a396;
}

.dev-overlay code {
  background: rgba(255, 255, 255, 0.08);
  color: #f7efd6;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1.6;
}

.dev-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dev-field select {
  font: inherit;
  padding: 0.3rem;
  border-radius: 6px;
  border: 1px solid #a7a396;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.dev-scan-btn {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: #f7efd6;
  cursor: pointer;
  text-align: left;
}

.dev-actions {
  display: flex;
  gap: 0.4rem;
}

.dev-actions button {
  flex: 1;
  font: inherit;
  padding: 0.35rem 0.2rem;
  border-radius: 6px;
  border: 1px solid #a7a396;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* --- Reduced motion ----------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .sheet,
  .reward {
    transition: none;
  }

  .stop-marker--finale:not(.is-locked),
  .stop-marker.is-nearest,
  .stop-marker.is-collected[data-face="stamp"],
  .reward-stamp,
  .decor[data-decor="snow"]::before,
  .decor[data-decor="snow"]::after {
    animation: none;
  }
}

/* --- Partner venues ----------------------------------------------- */

/* An offer on the map: a small tag, quieter than a stop until the
   trail has unlocked it. */
.venue-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0 0.55rem;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: var(--card);
  color: var(--primary);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0.85;
}

.venue-marker.is-unlocked {
  background: var(--accent);
  opacity: 1;
}

.venue-logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
  margin: 0 0 0.5rem;
}

.venue-offer {
  font-size: 1.1rem;
  font-weight: 600;
}

/* The code the visitor shows at the till: big and unmistakable across
   a counter. */
.venue-code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 0.6rem 0.8rem;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
}

.offers-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.offer-item {
  display: grid;
  gap: 0.15rem;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(36, 33, 28, 0.18);
  border-left: 5px solid var(--muted);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}

.offer-item.is-unlocked {
  border-left-color: var(--success);
}

.offer-item small {
  color: var(--muted);
}

.reward-offer {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: var(--paper);
  border-left: 5px solid var(--accent);
}
