/* ===== Correio do Fritz — styles ===== */

:root {
  --navy: #1E3A6E;
  --purple: #6B2C8F;
  --pink: #E84B8A;
  --green: #6DB33F;
  --orange: #E1551F;
  --yellow: #F5B324;
  --cream: #FCF1DC;
  --cream-dark: #EDE0C4;
  --paper: #FFFDF7;
  --ink: var(--navy);

  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-hand: 'Bradley Hand', 'Segoe Print', 'Comic Sans MS', cursive;

  --app-max: 440px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

/* the [hidden] attribute must always win over any class/id display rule */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  position: relative;
  width: 100%;
  max-width: var(--app-max);
  height: 100dvh;
  background: var(--cream);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.35);
  background-image:
    radial-gradient(circle at 15% 8%, rgba(107,44,143,0.06), transparent 40%),
    radial-gradient(circle at 85% 92%, rgba(232,75,138,0.06), transparent 40%);
}

button { font-family: inherit; }

/* ---- toolbar ---- */
#toolbar {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  right: 10px;
  z-index: 50;
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.75);
  color: var(--navy);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.icon-btn:active { transform: scale(0.92); }

.btn-back {
  position: static;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.6);
}

/* ---- screens ---- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.screen.active { display: flex; }

.screen-inner {
  padding: calc(var(--safe-top) + 56px) 22px calc(var(--safe-bottom) + 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  width: 100%;
  text-align: center;
}

.screen-fullbleed { background: #000; }

.screen-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  margin: 4px 0 18px;
}

/* ---- buttons ---- */
.btn {
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }

.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 0 #a83b12, 0 6px 14px rgba(225,85,31,0.35);
}
.btn-primary:active { box-shadow: 0 1px 0 #a83b12; }

.btn-secondary {
  background: white;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-big {
  width: 100%;
  max-width: 340px;
  padding: 16px 20px;
  font-size: 17px;
  margin-top: 10px;
}

.btn-link {
  background: none;
  color: var(--purple);
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== COVER ===== */
/* flex-start (not center): centering clips the title off the top of the
 * scroll area whenever the cover is taller than the screen */
.cover-inner { justify-content: flex-start; gap: 4px; }

.museum-tag {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 700;
  margin: 0 0 6px;
}

.app-title {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.05;
  color: var(--navy);
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}

.app-subtitle {
  font-size: 16px;
  color: var(--pink);
  font-weight: 700;
  margin: 0 0 22px;
  font-family: var(--font-hand);
}

.fritz-intro {
  width: 100%;
  background: var(--paper);
  border: 2px solid var(--cream-dark);
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 22px;
  text-align: left;
}

.fritz-intro::after { content: ''; display: block; clear: both; }

.fritz-intro-txt {
  font-size: 13px;
  line-height: 1.5;
  color: var(--navy);
  margin: 0;
}
.fritz-intro-txt strong { color: var(--purple); }

/* floated so the intro text wraps around it and fills the box below */
.fritz-portrait {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--yellow);
  background: var(--cream-dark);
  float: left;
  margin: 2px 12px 6px 0;
}

.portrait-fallback {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid var(--yellow);
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  float: left;
  margin: 2px 12px 6px 0;
}


/* ===== GLOBE ===== */
.globe-header {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  left: 10px;
  z-index: 20;
}
.globe-header .btn-back { margin-bottom: 0; }

.globe-instruction {
  position: absolute;
  top: calc(var(--safe-top) + 58px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100% - 32px);
  background: rgba(255,255,255,0.88);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  padding: 7px 14px;
  border-radius: 999px;
  margin: 0;
  white-space: nowrap;
}

#globe-viz {
  position: absolute;
  inset: 0;
  z-index: 1;
}
#globe-viz canvas { outline: none; }

.globe-void {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.moon-btn {
  position: absolute;
  top: 66px;
  right: 14px;
  z-index: 20;
  background: rgba(30,58,110,0.55);
  border: 2px solid var(--yellow);
  border-radius: 16px;
  padding: 8px 10px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: moon-pulse 2.6s ease-in-out infinite;
  cursor: pointer;
}
.moon-btn-emoji { font-size: 22px; }
.moon-btn-label { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

@keyframes moon-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(245,179,36,0); }
  50% { transform: scale(1.08); box-shadow: 0 0 14px rgba(245,179,36,0.5); }
}

.globe-footer {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 16px);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}

/* map-style "tag" card shown when a destination pin is tapped */
.map-card {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  max-width: 320px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.map-card-body { min-width: 0; }
.map-card-name { font-weight: 800; font-size: 14.5px; color: var(--navy); margin: 0; }
.map-card-context { font-size: 12px; color: var(--purple); margin: 2px 0 0; line-height: 1.35; }
.map-card-fact { font-size: 11.5px; color: var(--navy); opacity: .8; margin: 4px 0 0; line-height: 1.35; }
.map-card-km { font-size: 11px; color: var(--navy); opacity: .65; margin: 3px 0 0; font-weight: 700; }

/* ---- stamp-photo: a destination photo cropped with a perforated postage-
 * stamp edge (plain layered background-images "punching" small circles of
 * --punch color along each side — no mask-composite involved, since that's
 * unreliably supported; see buildStampPhoto() in app.js). ---- */
.stamp-photo {
  --hole: 2.5px;
  --pitch: 8px;
  --punch: var(--paper);
  position: relative;
  flex-shrink: 0;
  width: 60px;
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  background-color: var(--cream-dark);
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.stamp-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle var(--hole) at center, var(--punch) 99%, transparent 100%),
    radial-gradient(circle var(--hole) at center, var(--punch) 99%, transparent 100%),
    radial-gradient(circle var(--hole) at center, var(--punch) 99%, transparent 100%),
    radial-gradient(circle var(--hole) at center, var(--punch) 99%, transparent 100%);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-size: var(--pitch) var(--pitch);
  background-position:
    calc(var(--pitch) / 2) 0,
    calc(var(--pitch) / 2) 100%,
    0 calc(var(--pitch) / 2),
    100% calc(var(--pitch) / 2);
}
.stamp-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--dest-color, var(--cream-dark));
}
.stamp-photo-lg { width: 140px; --hole: 3px; --pitch: 9px; }
.stamp-photo-sm { width: 100%; --hole: 2px; --pitch: 7px; }

#globe-footer .btn-primary { width: 100%; max-width: 300px; }

/* map pin marker (used on the globe, in its fallback grid, and the map-card swatch) */
.map-pin {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--pin-color, var(--orange));
  border: 2px solid white;
  transform: rotate(-45deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  position: relative;
}
.map-pin::after {
  content: "";
  width: 7px;
  height: 7px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* globe pins (htmlElementsData) */
.globe-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  pointer-events: none;
}
.globe-pin .map-pin { animation: pin-pulse 2.4s ease-in-out infinite; }
.globe-pin-home .map-pin { width: 26px; height: 26px; animation: none; }
.globe-pin-home .map-pin-label {
  background: rgba(30,58,110,0.7);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 3px;
  white-space: nowrap;
}
.globe-pin-selected .map-pin { animation: pin-pulse-selected 0.9s ease-in-out infinite; }
.globe-pin:not(.globe-pin-home) { pointer-events: auto; }

@keyframes pin-pulse {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(-45deg) scale(1.2); }
}
@keyframes pin-pulse-selected {
  0%, 100% { transform: rotate(-45deg) scale(1.15); }
  50% { transform: rotate(-45deg) scale(1.42); }
}

/* the letter/mode marker gliding along the arc during a send or race */
.globe-traveler {
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4), 0 0 0 3px var(--orange);
  pointer-events: none;
}
.globe-traveler[data-lane="1"] { box-shadow: 0 3px 10px rgba(0,0,0,0.4), 0 0 0 3px var(--pink); }

/* ---- in-flight overlay: readout card + skip, shown over the globe while
 * a letter (or two, racing) travels from Blumenau to the destination ---- */
.flight-overlay {
  position: absolute;
  top: calc(var(--safe-top) + 58px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  width: calc(100% - 32px);
  max-width: 340px;
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 10px 16px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.flight-question { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--navy); margin: 0 0 4px; }
.flight-readout { font-size: 15px; font-weight: 700; color: var(--orange); margin: 2px 0; min-height: 20px; }
.flight-readout .flight-emoji { margin-right: 5px; }
.flight-readout-b { color: var(--pink); }
.flight-skip {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
}

/* globe fallback (no WebGL / globe.gl) */
.globe-fallback {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: calc(var(--safe-top) + 130px) 18px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.globe-fallback-intro {
  color: white;
  font-weight: 700;
  margin-bottom: 12px;
}
.globe-fallback-cards {
  width: 100%;
  max-width: 340px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.globe-fallback-card {
  background: var(--paper);
  border: 2px solid var(--cream-dark);
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.globe-fallback-card.selected { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(225,85,31,0.25); }
.globe-fallback-card .map-pin { transform: none; margin-bottom: 2px; }
.globe-fallback-card .map-pin::after { transform: translate(-50%, -50%); }
.globe-fallback-name { font-weight: 700; font-size: 13px; color: var(--navy); text-align: center; }
.globe-fallback-km { font-size: 11px; color: var(--purple); }

/* ===== PICKER ===== */
.picker-dest-chip {
  background: var(--purple);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.stamp-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.stamp-card {
  aspect-ratio: 3/4;
  background: var(--paper);
  border: 2px solid var(--cream-dark);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  position: relative;
  cursor: pointer;
  color: var(--stamp-color, var(--navy));
  --serr: radial-gradient(circle, var(--cream) 45%, transparent 46%);
  background-image: var(--serr);
  background-size: 12px 12px;
  background-position: -6px -6px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.stamp-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid currentColor;
  opacity: .35;
  border-radius: 2px;
}
.stamp-card:active { transform: scale(0.94); }
.stamp-card.selected { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(225,85,31,0.25); transform: scale(1.04); }
.stamp-card.selected-a { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(225,85,31,0.25); }
.stamp-card.selected-b { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232,75,138,0.25); }

.stamp-emoji { font-size: 26px; line-height: 1; }
.stamp-name { font-weight: 700; font-size: 10.5px; color: var(--navy); text-align: center; line-height: 1.2; }
.stamp-note { font-weight: 600; font-size: 8.5px; color: var(--navy); opacity: .65; }
.stamp-anchor { position: absolute; top: 4px; right: 5px; font-size: 12px; }

.stamp-vibe {
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--navy);
  min-height: 20px;
  margin: 0 0 6px;
}

.race-hint { font-size: 12.5px; color: var(--pink); font-weight: 700; margin: 0 0 6px; }

/* ===== SEND (stamp the envelope) ===== */
.send-inner { justify-content: center; }

.envelope-wrap { perspective: 800px; margin-bottom: 30px; }

.envelope {
  width: 260px;
  min-height: 210px;
  background: var(--paper);
  border: 2px solid var(--cream-dark);
  border-radius: 6px;
  position: relative;
  padding: 132px 18px 18px;
  box-shadow: 0 8px 18px rgba(30,58,110,0.18);
  text-align: left;
  font-family: var(--font-hand);
  color: var(--navy);
  transition: transform .6s cubic-bezier(.4,0,.2,1), opacity .6s ease;
}

.envelope-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 0;
  border-left: 130px solid transparent;
  border-right: 130px solid transparent;
  border-top: 60px solid var(--cream-dark);
}

.envelope-line { font-size: 16px; margin: 6px 0; }

.envelope.flying {
  transform: translateY(-260px) translateX(120px) rotate(18deg) scale(0.5);
  opacity: 0;
}

/* the destination's own stamp, sitting in the corner of the envelope like a
 * real postage stamp waiting to be pressed on — a single tap glues it down
 * (see wireSend()/SEAL_PRESS_MS in app.js; a tap, not a hold, so it doesn't
 * race the phone browser's own long-press "copy image" gesture) */
.seal-stamp-btn {
  position: absolute;
  top: 70px;
  right: 14px;
  z-index: 2;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transform: rotate(-7deg);
  transition: transform .15s ease;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.seal-stamp-btn .stamp-photo { width: 68px; }
.seal-stamp-btn:active, .seal-stamp-btn.pressing { transform: rotate(-7deg) scale(0.93); }

.seal-ring {
  position: absolute;
  inset: -6px;
  border-radius: 6px;
  border: 3px solid var(--yellow);
  opacity: 0;
}
.seal-stamp-btn.pressing .seal-ring {
  opacity: 1;
  animation: seal-fill 0.18s linear forwards;
}
@keyframes seal-fill {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.seal-stamp-btn.stamped {
  transform: rotate(-3deg);
  animation: seal-thud .3s ease;
}
@keyframes seal-thud {
  0% { transform: rotate(-3deg) scale(1); }
  40% { transform: rotate(-3deg) scale(1.18); }
  100% { transform: rotate(-3deg) scale(1); }
}

.seal-hint { font-size: 12.5px; color: var(--purple); margin-top: 14px; font-weight: 700; }

/* ===== RESULT ===== */
.result-eyebrow { font-size: 13px; color: var(--purple); font-weight: 700; margin: 4px 0 2px; }
.result-headline {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--orange);
  margin: 0 0 8px;
  line-height: 1.15;
}
/* asterisk pointing at the estimate note at the foot of the page (added in CSS
 * because the headline text itself is rewritten by JS on every result) */
.result-headline::after,
.race-result::after {
  content: '*';
  font-size: .55em;
  vertical-align: super;
  color: var(--purple);
  opacity: .7;
  margin-left: 2px;
}

.result-caveat {
  width: 100%;
  font-size: 11px;
  color: var(--navy);
  opacity: .6;
  line-height: 1.35;
  text-align: left;
  margin: 18px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--cream-dark);
}
.result-caveat-mark { font-weight: 800; color: var(--purple); }
/* the race screen is short: keep the note at the foot of the page */
#screen-race-result .result-caveat { margin-top: auto; }

.fact-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 16px;
}
.fact-row {
  background: var(--paper);
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  padding: 10px 12px;
}
.fact-label { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--purple); margin-bottom: 3px; }
.fact-deverdade { border-color: var(--orange); }
.fact-deverdade .fact-label { color: var(--orange); }
.fact-bonus { border-color: var(--navy); }
.fact-bonus .fact-label { color: var(--navy); }
.fact-row p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--navy); }
.fact-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.award-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, rgba(245,179,36,0.18), rgba(232,75,138,0.18));
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  animation: award-pop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes award-pop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.result-actions { width: 100%; display: flex; flex-direction: column; align-items: center; }

.visita-box {
  width: 100%;
  background: var(--navy);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 20px;
  text-align: left;
}
.visita-box-secondary { margin-top: 10px; }
.visita-titulo { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--yellow); margin: 0 0 6px; }
.visita-txt { font-size: 12.5px; line-height: 1.5; color: var(--cream); margin: 0; }
.visita-txt strong { color: white; }
.visita-email { font-size: 11px; color: var(--cream); opacity: .75; margin: 8px 0 0; }
.visita-email a { color: var(--yellow); }

/* ===== RACE RESULT ===== */
.race-result { font-family: var(--font-display); font-size: 18px; color: var(--orange); font-weight: 700; margin: 6px 0 18px; line-height: 1.4; }

/* ===== COLEÇÃO DE SELOS (one rectangular postage stamp per destination) ===== */
.tab-hint { font-size: 13px; color: var(--navy); opacity: .8; line-height: 1.4; margin: 2px 0 10px; }
.tab-progress { font-size: 12.5px; color: var(--purple); font-weight: 700; margin: 4px 0 12px; }
.tab-complete { font-size: 14px; color: var(--orange); font-weight: 800; margin-top: 10px; }

.tab-panel {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
}

.selo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.selo-tile .stamp-photo { transition: transform .12s ease; }
.selo-tile:active:not(.locked) .stamp-photo { transform: scale(0.94); }
.selo-tile-name { font-size: 8.5px; font-weight: 700; text-align: center; line-height: 1.2; color: var(--navy); }
.selo-tile.locked { cursor: default; }
.selo-tile.locked .stamp-photo { filter: grayscale(1) brightness(0.9); }
.selo-tile.locked .stamp-photo::after {
  content: "🔒";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(30,58,110,0.5);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.selo-tile.locked .selo-tile-name { opacity: .5; }

/* summary modal shown when tapping an unlocked selo */
.selo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(30,58,110,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.selo-modal-card {
  position: relative;
  background: var(--paper);
  border-radius: 18px;
  padding: 20px;
  max-width: 340px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.selo-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  font-size: 14px;
}
#selo-modal-stamp { display: flex; justify-content: center; margin: 4px 0 12px; }
.selo-modal-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.selo-modal-context { font-size: 13px; color: var(--purple); margin: 0 0 8px; line-height: 1.4; }
.selo-modal-fact { font-size: 13px; color: var(--navy); text-align: left; line-height: 1.45; margin: 0 0 8px; }
.selo-modal-km { font-size: 11.5px; color: var(--navy); opacity: .65; font-weight: 700; margin: 0; }

/* ===== CURIOSIDADES (how a letter actually travelled, Fritz's era) ===== */
.rota-intro { font-size: 13.5px; color: var(--navy); opacity: .85; line-height: 1.45; margin: 2px 0 16px; }

.rota-list { list-style: none; margin: 0 0 16px; padding: 0; }
.rota-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 2px dashed var(--cream-dark);
}
.rota-step:last-child { border-bottom: none; }
.rota-step-emoji { font-size: 24px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.rota-step-title { font-weight: 800; font-size: 13.5px; color: var(--navy); margin: 0 0 2px; }
.rota-step-text { font-size: 12.5px; color: var(--navy); opacity: .85; line-height: 1.4; margin: 0; }

.rota-outro { font-family: var(--font-hand); font-size: 16px; color: var(--purple); line-height: 1.45; margin: 0; }
.rota-outro strong { color: var(--orange); }

/* ===== error overlay ===== */
#error-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,58,110,0.85);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.error-box {
  background: var(--paper);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  max-width: 300px;
}
.error-box p { color: var(--navy); font-weight: 700; margin-bottom: 14px; }

/* ===== misc ===== */
@media (max-width: 360px) {
  .app-title { font-size: 36px; }
  .envelope { width: 220px; }
}
