/* ─────────────── OTrip · Stamp Game — page styles ─────────────── */

body { overflow-x: hidden; }

/* Slim top nav */
.sg-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: rgba(244, 239, 230, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--rule);
}
.sg-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--ink-3);
  text-transform: uppercase; padding: 6px 4px;
  transition: color 180ms;
}
.sg-back:hover { color: var(--accent); }
.sg-nav .brand { font-size: 18px; }
.sg-nav .brand-mark { width: 24px; height: 24px; border-radius: 6px; }
.sg-progress {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--accent);
  min-width: 140px; text-align: right;
}

/* ───── Stage (phone + editorial column) ───── */
.sg-stage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: start;
  min-height: calc(100vh - 64px);
}
@media (max-width: 900px) {
  .sg-stage { grid-template-columns: 1fr; gap: 32px; padding: 24px 16px 60px; }
}
.sg-side {
  position: sticky; top: 100px;
  padding-top: 12px;
}
@media (max-width: 900px) { .sg-side { position: static; padding-top: 0; text-align: center; } }
.sg-side .num-tag { color: var(--accent); }
.sg-side-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 0.98; letter-spacing: -0.03em;
  margin: 16px 0 22px;
}
.sg-side-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.sg-side-lead {
  font-family: var(--serif);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5; color: var(--ink-3);
  max-width: 460px; margin: 0 0 28px;
  text-wrap: pretty;
}
@media (max-width: 900px) { .sg-side-lead { margin-left: auto; margin-right: auto; } }
.sg-side-rules {
  list-style: none; padding: 0;
  margin: 0 0 28px;
  border-top: 0.5px solid var(--rule);
  max-width: 460px;
}
@media (max-width: 900px) { .sg-side-rules { display: none; } }
.sg-side-rules li {
  display: grid; grid-template-columns: 38px 1fr;
  gap: 8px; align-items: baseline;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--rule);
  font-family: var(--serif); font-size: 15;
  color: var(--ink-2); line-height: 1.45;
}
.sg-side-rules .li-num {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.14em; color: var(--accent);
  font-weight: 500;
}
.sg-side-mini {
  display: flex; gap: 24px;
  padding-top: 18px;
  border-top: 0.5px solid var(--rule);
  max-width: 460px;
}
@media (max-width: 900px) { .sg-side-mini { display: none; } }
.sg-side-mini > div { display: flex; flex-direction: column; gap: 2px; }
.sg-side-mini .num { font-family: var(--serif); font-size: 22px; color: var(--ink); }
.sg-side-mini .lbl {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.1em; color: var(--ink-3);
  text-transform: uppercase;
}

/* ───── PHONE ───── */
.sg-phone-wrap {
  display: flex; justify-content: center; align-items: flex-start;
}
.sg-phone {
  width: 400px;
  height: 840px;
  max-height: calc(100vh - 80px);
  background: var(--paper);
  border-radius: 56px;
  padding: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 40px 90px -30px rgba(26, 23, 20, 0.45),
    0 14px 36px -10px rgba(26, 23, 20, 0.28);
  position: relative;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}
.sg-phone::after {
  content: ''; position: absolute; inset: 0;
  border-radius: 56px; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(26, 23, 20, 0.15) inset;
}
.sg-island {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 30px;
  background: var(--ink);
  border-radius: 999px; z-index: 10;
}
.sg-screen {
  background: var(--paper);
  height: 100%; border-radius: 48px;
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
@media (max-width: 480px) {
  .sg-phone {
    width: 100%; max-width: 400px;
    height: min(820px, calc(100vh - 80px));
    padding: 8px; border-radius: 44px;
  }
  .sg-phone::after { border-radius: 44px; }
  .sg-screen { border-radius: 38px; }
  .sg-island { top: 18px; width: 100px; height: 26px; }
}

/* iOS status */
.sg-status {
  flex-shrink: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px 6px;
  font-family: var(--mono);
  font-size: 11px; color: var(--ink);
  font-weight: 600; letter-spacing: 0.02em;
  position: relative; z-index: 5;
}
.sg-status .right {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px; letter-spacing: 0.15em; opacity: 0.7;
}

/* Views */
.sg-view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.sg-view.active { display: flex; }

/* ─── GAME VIEW ─── */
.sg-game-header { flex-shrink: 0; padding: 16px 20px 12px; }
.sg-game-eyebrow {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.sg-game-eyebrow .eyebrow { font-size: 9.5px; }
.sg-streak {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em; color: var(--accent);
  padding: 2px 8px; border: 0.5px solid var(--accent);
  border-radius: 999px;
  opacity: 0; transition: opacity 200ms;
}
.sg-streak.show { opacity: 1; animation: streakPop 320ms cubic-bezier(.2,.7,.3,1.4); }
@keyframes streakPop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.sg-game-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 24px; line-height: 1.05;
  letter-spacing: -0.02em; color: var(--ink);
  margin: 4px 0 0;
}
.sg-game-title em { font-style: italic; font-weight: 300; }

.sg-livestats {
  flex-shrink: 0;
  margin: 12px 20px 0;
  background: var(--paper-2);
  border: 0.5px solid var(--rule);
  border-radius: 14px;
  padding: 12px 14px;
  position: relative;
}
.sg-livestats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sg-stat { display: flex; flex-direction: column; gap: 3px; }
.sg-stat-num {
  font-family: var(--serif);
  font-feature-settings: 'lnum','tnum';
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 28px; font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--ink); line-height: 1;
}
.sg-stat.accent .sg-stat-num { color: var(--accent); }
.sg-stat-lbl {
  font-family: var(--mono); font-size: 8.5px;
  letter-spacing: 0.13em; color: var(--ink-3);
  text-transform: uppercase;
}
.sg-toast {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(26,23,20,0.18);
  opacity: 0; white-space: nowrap; z-index: 5;
}
.sg-toast.show { animation: toastFloat 1800ms ease-out forwards; }
@keyframes toastFloat {
  0%  { opacity: 0; transform: translate(-50%, 6px); }
  18% { opacity: 1; transform: translate(-50%, -6px); }
  78% { opacity: 1; transform: translate(-50%, -10px); }
  100%{ opacity: 0; transform: translate(-50%, -18px); }
}

/* Filters */
.sg-filter-bar {
  flex-shrink: 0;
  padding: 12px 20px 6px;
  display: flex; gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sg-filter-bar::-webkit-scrollbar { display: none; }
.sg-chip {
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 999px;
  border: 0.5px solid var(--rule);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all 160ms;
  white-space: nowrap;
}
.sg-chip:hover { border-color: var(--ink); color: var(--ink); }
.sg-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sg-chip-count {
  font-family: var(--mono); font-size: 9px;
  opacity: 0.7; margin-left: 4px;
}

/* Grid */
.sg-grid-wrap {
  flex: 1; min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 6px 20px 100px;
}
.sg-grid-wrap::-webkit-scrollbar { display: none; }
.sg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

.sg-card {
  position: relative;
  background: var(--paper-3);  /* fallback for the brief moment before the photo loads */
  border: 0.5px solid var(--rule);
  border-radius: 12px;
  padding: 12px 12px 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1.2), border-color 200ms, background 200ms;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; justify-content: space-between;
  user-select: none;
}
.sg-card:hover { transform: translateY(-2px); border-color: var(--ink-3); }

/* Photo behind the labels — covers the whole card, slightly desaturated so
   the editorial palette wins. Pure transform animation on hover (no filter
   change, which would tank performance with many cards). */
.sg-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: saturate(0.78) brightness(0.95);
  transition: transform 320ms ease, filter 320ms ease;
}
.sg-card:hover .sg-card-photo { transform: scale(1.04); filter: saturate(1) brightness(1); }

/* Bottom-up dark scrim so the white serif city name stays legible over any photo.
   Edges of the gradient are tuned so the IATA chip on the top stays clear too. */
.sg-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(26, 23, 20, 0.45) 0%,
    rgba(26, 23, 20, 0.0)  35%,
    rgba(26, 23, 20, 0.0)  45%,
    rgba(26, 23, 20, 0.85) 100%
  );
}

/* Text now sits on top — bumped to white so it pops over the photo */
.sg-card-iata {
  position: relative; z-index: 2;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.sg-card-city {
  position: relative; z-index: 2;
  font-family: var(--serif);
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.015em;
  color: #FBF6EC;
  line-height: 1.04;
  margin-top: auto; text-wrap: balance;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.sg-card-meta {
  position: relative; z-index: 2;
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 4px; gap: 6px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.sg-card-meta .country {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Stamped state: terracotta border + slight tilt + still photo-backed, but
   the saturation drops slightly more so the badge + border pop. */
.sg-card.stamped {
  border: 2px solid var(--accent);
  transform: rotate(var(--r, -1.5deg));
  box-shadow: 0 8px 20px -10px rgba(181, 74, 42, 0.35);
}
.sg-card.stamped .sg-card-photo { filter: saturate(0.55) brightness(0.85); }
.sg-card.stamped:hover { transform: rotate(var(--r, -1.5deg)) translateY(-2px); }
.sg-card.stamped:hover .sg-card-photo { filter: saturate(0.7) brightness(0.95); transform: scale(1.04); }
.sg-card.stamped .sg-card-iata,
.sg-card.stamped .sg-card-meta { color: rgba(255, 235, 226, 0.95); }
.sg-card-badge {
  position: absolute;
  top: 10px; right: 10px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono); font-size: 8px;
  letter-spacing: 0.18em;
  padding: 2px 5px; border-radius: 3px;
  transform: rotate(8deg);
  font-weight: 700; opacity: 0;
}
.sg-card.stamped .sg-card-badge { opacity: 1; animation: badgeStamp 360ms cubic-bezier(.2,.7,.3,1.4); }
@keyframes badgeStamp {
  0%   { transform: rotate(8deg) scale(1.6); opacity: 0; }
  60%  { transform: rotate(8deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(8deg) scale(1); opacity: 1; }
}
.sg-pulse {
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif); font-style: italic;
  font-size: 24px; color: var(--accent);
  pointer-events: none; opacity: 0;
}
.sg-card.pulsing .sg-pulse { animation: pulseRise 700ms ease-out forwards; }
@keyframes pulseRise {
  0%   { opacity: 0; transform: translate(-50%, -10%) scale(0.6); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1.1); }
}

/* Done bar (overlays bottom of game view) */
.sg-done-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 18px 18px;
  background: linear-gradient(to bottom, rgba(244,239,230,0) 0%, rgba(244,239,230,0.94) 30%, rgba(244,239,230,0.98) 100%);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; z-index: 20;
  transform: translateY(110%);
  transition: transform 320ms cubic-bezier(.2,.7,.3,1);
  border-bottom-left-radius: 48px;
  border-bottom-right-radius: 48px;
}
.sg-done-bar.show { transform: translateY(0); }
.sg-done-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: nowrap; }
.sg-done-meta > div { display: inline-flex; align-items: baseline; gap: 3px; }
.sg-done-meta .num { font-family: var(--serif); font-size: 18px; color: var(--ink); font-feature-settings: 'lnum','tnum'; }
.sg-done-meta .lbl { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; }
.sg-done-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px 10px 18px;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 999px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: background 180ms, transform 180ms;
  white-space: nowrap;
}
.sg-done-btn:hover { background: var(--accent); transform: translateY(-1px); }

/* ─── RESULTS VIEW ─── */
#viewResults { display: none; }
#viewResults.active { display: flex; flex-direction: column; }

.sg-tab-content-wrap {
  flex: 1; min-height: 0;
  position: relative;
  overflow: hidden;
}
.sg-tab-content {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 16px;
  animation: tabFade 280ms ease;
}
.sg-tab-content::-webkit-scrollbar { display: none; }
.sg-tab-content > * {
  flex-shrink: 0;
}
.sg-tab-content.active { display: flex; }
@keyframes tabFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Paper nav (in-phone header) */
.sg-paper-nav {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 14px;
}
.sg-icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 0.5px solid var(--rule);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-2);
  transition: background 180ms, color 180ms;
}
.sg-icon-btn:hover { background: var(--ink); color: var(--paper); }
.sg-paper-nav-center { text-align: center; flex: 1; }
.sg-paper-nav-center .eyebrow { font-size: 9.5px; }
.sg-paper-nav-title {
  font-family: var(--serif); font-size: 17px;
  font-weight: 500; color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.sg-paper-nav-sub {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em; color: var(--ink-3);
  text-transform: uppercase; margin-top: 2px;
}

/* ─── ATLAS TAB ─── */
.sg-atlas-mapwrap {
  margin: 0 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 0.5px solid var(--rule);
  box-shadow: 0 16px 40px -20px rgba(26,23,20,0.25);
  background: var(--paper-2);
  position: relative;
}
#sg-map { width: 100%; height: 340px; }
.sg-map-tag {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(244,239,230,0.92);
  backdrop-filter: blur(6px);
  font-family: var(--mono); font-size: 8.5px;
  letter-spacing: 0.14em; color: var(--ink-2);
  text-transform: uppercase;
  border: 0.5px solid var(--rule);
  z-index: 1;
  font-weight: 600;
}
.sg-map-legend {
  position: absolute;
  bottom: 8px; left: 12px; right: 12px;
  display: flex; gap: 12px; align-items: center;
  font-family: var(--mono);
  font-size: 8.5px; letter-spacing: 0.12em;
  color: var(--ink-2);
  text-transform: uppercase;
  background: rgba(244,239,230,0.92);
  backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 6px;
  border: 0.5px solid var(--rule);
  z-index: 1;
}
.sg-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sg-map-legend .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border: 1.5px solid var(--paper);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.sg-map-legend .fill {
  width: 10px; height: 10px;
  background: rgba(181, 74, 42, 0.28);
  border: 1px solid var(--accent);
  border-radius: 2px;
  display: inline-block;
}

/* Marker — ink dot with paper ring, reads on both gray + terracotta fills */
.sg-marker {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--paper);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: transform 180ms;
}
.sg-marker:hover { transform: scale(1.3); }
.maplibregl-popup-content {
  background: var(--paper) !important;
  border: 0.5px solid var(--rule);
  border-radius: 8px;
  padding: 8px 12px !important;
  box-shadow: 0 8px 24px rgba(26,23,20,0.18);
  font-family: var(--sans);
}
.maplibregl-popup-tip { border-top-color: var(--paper) !important; }
.sg-popup-city {
  font-family: var(--serif);
  font-size: 14px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.01em;
}
.sg-popup-meta {
  font-family: var(--mono); font-size: 8.5px;
  letter-spacing: 0.14em; color: var(--ink-3);
  margin-top: 2px; text-transform: uppercase;
}
.maplibregl-ctrl-attrib {
  background: rgba(244, 239, 230, 0.85) !important;
  font-family: var(--mono) !important;
  font-size: 8px !important;
}
.maplibregl-ctrl-bottom-right { display: none; }

/* Atlas stats row */
.sg-atlas-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 14px 18px 0;
  padding: 14px 12px;
  background: var(--paper-2);
  border: 0.5px solid var(--rule);
  border-radius: 12px;
}
.sg-atlas-stat { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.sg-atlas-stat-num {
  font-family: var(--serif);
  font-feature-settings: 'lnum','tnum';
  font-size: 26px; font-weight: 400;
  color: var(--ink); letter-spacing: -0.02em;
  line-height: 0.95;
}
.sg-atlas-stat-num span {
  font-family: var(--serif); font-size: 13px;
  color: var(--ink-3); margin-left: 1px;
}
.sg-atlas-stat.accent .sg-atlas-stat-num { color: var(--accent); }
.sg-atlas-stat-lbl {
  font-family: var(--mono); font-size: 8px;
  letter-spacing: 0.12em; color: var(--ink-3);
  text-transform: uppercase;
  line-height: 1.2;
}

.sg-atlas-lede {
  margin: 14px 18px 0;
  padding: 14px;
  background: var(--paper);
  border: 0.5px solid var(--rule);
  border-radius: 12px;
}
.sg-atlas-lede .eyebrow { font-size: 9px; color: var(--accent); display:block; margin-bottom: 6px; }
.sg-atlas-lede p {
  font-family: var(--serif);
  font-size: 14px; line-height: 1.5;
  color: var(--ink-2); margin: 0;
  font-style: italic;
  text-wrap: pretty;
}

/* ─── Shared section spacing ─── */
.sg-section { padding: 0 18px; margin-top: 18px; }
.sg-section:first-of-type { margin-top: 6px; }
.sg-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 0.5px solid var(--rule);
  padding: 14px 0 10px;
}
.sg-section-head .eyebrow { font-size: 9.5px; }

/* ─── INSIGHTS TAB ─── */
.sg-insights-lede {
  font-family: var(--serif);
  font-size: 15px; line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}
.sg-insights-lede strong { color: var(--accent); font-weight: 500; }
.sg-insights-lede em { font-style: italic; }

.sg-bigstats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sg-bigstat-card {
  background: var(--paper);
  border: 0.5px solid var(--rule);
  border-radius: 12px;
  padding: 12px 14px;
}
.sg-bigstat-card-num {
  display: flex; align-items: baseline; gap: 4px;
}
.sg-bigstat-card-num > span:first-child {
  font-family: var(--serif);
  font-size: 32px; font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--ink); line-height: 0.95;
  font-feature-settings: 'lnum','tnum';
}
.sg-bigstat-card.accent .sg-bigstat-card-num > span:first-child { color: var(--accent); }
.sg-bigstat-card-num .unit {
  font-family: var(--serif);
  font-size: 12px; font-style: italic;
  color: var(--ink-3);
}
.sg-bigstat-card-lbl {
  font-family: var(--mono);
  font-size: 8.5px; letter-spacing: 0.14em;
  color: var(--ink-3); text-transform: uppercase;
  margin-top: 6px; font-weight: 500;
}

.sg-rank-list {
  display: flex; flex-direction: column;
}
.sg-rank-row {
  display: grid;
  grid-template-columns: 16px 1fr 30px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--rule);
}
.sg-rank-row:last-child { border-bottom: 0; }
.sg-rank-rank {
  font-family: var(--mono); font-size: 9.5px;
  color: var(--ink-3); letter-spacing: 0.06em;
}
.sg-rank-mid { min-width: 0; }
.sg-rank-mid-name {
  font-family: var(--serif); font-size: 14px;
  font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-rank-mid-bar {
  height: 3px; background: var(--paper-3);
  margin-top: 5px; border-radius: 2px; overflow: hidden;
}
.sg-rank-mid-bar > div {
  height: 100%; background: var(--accent);
  border-radius: 2px;
}
.sg-rank-mid-bar.dark > div { background: var(--ink); }
.sg-rank-num {
  font-family: var(--serif); font-size: 15px;
  color: var(--ink); letter-spacing: -0.01em;
  text-align: right;
  font-feature-settings: 'lnum','tnum';
}
.sg-rank-num span {
  font-family: var(--mono); font-size: 9px;
  color: var(--ink-3); margin-left: 2px;
}

.sg-pattern-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sg-pattern-card {
  background: var(--paper);
  border: 0.5px solid var(--rule);
  border-radius: 12px;
  padding: 12px 14px;
}
.sg-pattern-lbl {
  font-family: var(--mono); font-size: 8.5px;
  letter-spacing: 0.14em; color: var(--ink-3);
  text-transform: uppercase; margin-bottom: 6px;
}
.sg-pattern-val {
  font-family: var(--serif);
  font-size: 17px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.01em;
  line-height: 1.1;
  text-wrap: balance;
}
.sg-pattern-val .num {
  font-family: var(--serif);
  font-feature-settings: 'lnum','tnum';
}
.sg-pattern-sub {
  font-family: var(--serif); font-size: 11px;
  font-style: italic; color: var(--ink-3);
  margin-top: 6px; line-height: 1.3;
}

/* Dark CTA card */
.sg-cta-dark {
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.sg-cta-dark::before {
  content: ''; position: absolute; inset: 0;
  opacity: 0.18; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.9  0 0 0 0 0.8  0 0 0 0.3 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.sg-cta-dark > * { position: relative; }
.sg-cta-eyebrow {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.16em;
  color: var(--accent-2); text-transform: uppercase;
  margin-bottom: 6px;
}
.sg-cta-title {
  font-family: var(--serif);
  font-weight: 400; font-size: 22px;
  letter-spacing: -0.02em; line-height: 1.1;
  margin: 0 0 8px; color: var(--paper);
}
.sg-cta-title em { font-style: italic; color: var(--accent-2); }
.sg-cta-dark p {
  font-family: var(--serif);
  font-size: 13px; line-height: 1.45;
  color: var(--paper); opacity: 0.82;
  margin: 0 0 14px;
}
.sg-cta-dark .appstore {
  background: var(--paper);
  color: var(--ink);
  padding: 8px 14px 8px 12px;
  border-radius: 10px;
  gap: 8px;
}
.sg-cta-dark .appstore-line1 { opacity: 0.65; font-size: 8.5px; }
.sg-cta-dark .appstore-line2 { font-size: 16px; }
.sg-cta-dark .appstore svg { width: 16px; height: 19px; }

/* ─── GOALS TAB ─── */
.sg-goals-lede {
  font-family: var(--serif);
  font-size: 14.5px; line-height: 1.5;
  color: var(--ink-3); font-style: italic;
  margin: 0; text-wrap: pretty;
}
.sg-goal-card {
  background: var(--paper);
  border: 0.5px solid var(--rule);
  border-radius: 14px;
  padding: 16px 16px 14px;
}
.sg-goal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.sg-goal-head .eyebrow { font-size: 9px; margin-bottom: 4px; }
.sg-goal-title {
  font-family: var(--serif); font-size: 19px;
  font-weight: 500; letter-spacing: -0.015em;
  color: var(--ink);
}
.sg-goal-sub {
  font-family: var(--serif); font-size: 12px;
  font-style: italic; color: var(--ink-3);
  margin-top: 2px;
}
.sg-goal-fig { text-align: right; }
.sg-goal-fig-num {
  font-family: var(--serif);
  font-feature-settings: 'lnum','tnum';
  font-size: 36px; font-weight: 300;
  color: var(--accent); letter-spacing: -0.03em;
  line-height: 0.9;
}
.sg-goal-fig-num.small { font-size: 28px; color: var(--ink); }
.sg-goal-fig-num .den {
  font-size: 0.45em; color: var(--ink-3);
  font-weight: 400; margin-left: 1px;
}
.sg-goal-pace {
  font-family: var(--mono);
  font-size: 8.5px; letter-spacing: 0.12em;
  color: var(--ink-3); text-transform: uppercase;
  margin-top: 4px; font-weight: 500;
}
.sg-goal-pace.on-pace { color: var(--accent); }
.sg-goal-pace.off-pace { color: var(--accent-2); }

.sg-goal-bar {
  height: 4px; background: var(--paper-3);
  border-radius: 2px; overflow: hidden;
}
.sg-goal-bar-fill {
  height: 100%; background: var(--accent);
  transition: width 600ms cubic-bezier(.2,.7,.3,1);
  width: 0%;
}
.sg-goal-bar-bigger {
  position: relative;
  height: 10px;
  background: var(--paper-3);
  border-radius: 2px;
  margin-top: 12px;
  overflow: visible;
}
.sg-goal-bar-fill-bigger {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ink);
  border-radius: 2px;
  transition: width 600ms cubic-bezier(.2,.7,.3,1);
  width: 0%;
}
.sg-goal-bar-tick {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 1px;
  background: var(--accent-2);
}
.sg-goal-bar-tick span {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 8px;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sg-goal-tickets {
  margin-top: 14px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.sg-goal-ticket {
  padding: 7px 4px;
  border-radius: 5px;
  background: var(--paper-3);
  border: 0.5px solid var(--rule);
  text-align: center;
  color: var(--ink-3);
}
.sg-goal-ticket.done {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.sg-goal-ticket-cc {
  font-family: var(--mono); font-size: 10px;
  font-weight: 600; letter-spacing: 0.06em;
}
.sg-goal-ticket-name {
  font-family: var(--mono); font-size: 7.5px;
  letter-spacing: 0.1em; opacity: 0.75;
  margin-top: 1px;
  text-transform: uppercase;
}
.sg-goal-ticket.empty {
  opacity: 0.4;
  background: transparent;
  border-style: dashed;
}

.sg-goal-foot {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.08em; color: var(--ink-3);
  text-transform: uppercase;
}

.sg-goal-conts {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 4px;
}
.sg-goal-cont {
  aspect-ratio: 1 / 1.15;
  border-radius: 4px;
  border: 0.5px solid var(--rule);
  background: transparent;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px;
  font-weight: 500; letter-spacing: 0.08em;
}
.sg-goal-cont.done { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.sg-suggested {
  display: flex; flex-direction: column; gap: 6px;
}
.sg-suggested-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--paper-2);
  border: 0.5px solid var(--rule);
  border-radius: 10px;
}
.sg-suggested-iata {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.12em; color: var(--ink-3);
}
.sg-suggested-name {
  font-family: var(--serif); font-size: 14px;
  font-weight: 500; color: var(--ink);
}
.sg-suggested-sub {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.1em; color: var(--ink-3);
  text-transform: uppercase; margin-top: 2px;
}
.sg-suggested-km {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.06em; color: var(--accent);
}

/* ─── PROFILE TAB ─── */
.sg-passport {
  background: var(--paper-2);
  border: 0.5px solid var(--rule);
  border-radius: 16px;
  padding: 18px;
  position: relative; overflow: hidden;
}
.sg-passport-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(45,32,22,0.05) 13px 14px),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(45,32,22,0.05) 13px 14px);
  opacity: 0.6; pointer-events: none;
}
.sg-passport-head {
  position: relative;
  display: flex; align-items: center; gap: 14px;
}
.sg-passport-id { flex: 1; min-width: 0; }
.sg-passport-mono {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.16em; color: var(--accent);
  text-transform: uppercase; font-weight: 600;
}
.sg-passport-name {
  font-family: var(--serif); font-size: 22px;
  font-weight: 500; color: var(--ink);
  letter-spacing: -0.015em; margin-top: 4px;
}
.sg-passport-sub {
  font-family: var(--serif); font-size: 12px;
  color: var(--ink-3); font-style: italic;
  margin-top: 2px;
}
.sg-passport-stamp-mark {
  position: relative;
  width: 78px; height: 78px;
  flex-shrink: 0;
}
.sg-passport-stamp-mark .psm-ring {
  position: absolute; inset: 0;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--paper-2), 0 0 0 4px var(--accent);
}
.sg-passport-stamp-mark .psm-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.sg-passport-stamp-mark .psm-c-num {
  font-family: var(--serif);
  font-feature-settings: 'lnum','tnum';
  font-size: 24px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.02em;
  line-height: 1;
}
.sg-passport-stamp-mark .psm-c-sub {
  font-family: var(--mono); font-size: 8px;
  letter-spacing: 0.18em; color: var(--accent);
  font-weight: 700; margin-top: 2px;
}
.sg-passport-stats {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px; padding-top: 14px;
  border-top: 0.5px solid var(--rule);
}
.sg-passport-stats > div { display: flex; flex-direction: column; gap: 3px; }
.sg-passport-stats .lbl {
  font-family: var(--mono); font-size: 8px;
  letter-spacing: 0.12em; color: var(--ink-3);
  text-transform: uppercase;
}
.sg-passport-stats .val {
  font-family: var(--serif); font-size: 17px;
  font-weight: 400; color: var(--ink);
  letter-spacing: -0.02em;
  font-feature-settings: 'lnum','tnum';
}

.sg-country-stamps {
  display: flex; flex-wrap: wrap;
  gap: 14px 20px;
  padding: 8px 4px 0;
}
.sg-cstamp {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: 5px 9px;
  border-radius: 6px;
  font-family: var(--mono);
  text-align: center;
  background: rgba(244, 239, 230, 0.5);
  user-select: none;
}
.sg-cstamp-code {
  font-size: 13px; letter-spacing: 0.1em;
  font-weight: 700; line-height: 1;
}
.sg-cstamp-sub {
  font-size: 7px; letter-spacing: 0.14em;
  opacity: 0.85; margin-top: 2px;
}
.sg-country-stamps-empty {
  width: 100%;
  text-align: center;
  font-family: var(--serif); font-size: 13px;
  font-style: italic; color: var(--ink-4);
  padding: 16px;
}

.sg-restart-secondary {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 0.5px dashed var(--rule);
  border-radius: 12px;
  font-family: var(--serif); font-size: 14px;
  font-style: italic; color: var(--ink-3);
  cursor: pointer;
  transition: color 180ms, border-color 180ms;
}
.sg-restart-secondary:hover { color: var(--accent); border-color: var(--accent); }

.sg-colophon {
  text-align: center;
  padding: 24px 18px 8px;
}
.sg-colophon .mono {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.18em;
  color: var(--ink-4);
}
.sg-colophon .italic {
  font-family: var(--serif);
  font-size: 11px; font-style: italic;
  color: var(--ink-4); margin-top: 5px;
}

/* ─── TABBAR ─── */
.sg-tabbar {
  flex-shrink: 0;
  position: relative;
  padding: 10px 10px 22px;
  background: linear-gradient(to top, var(--paper) 70%, transparent);
  z-index: 30;
}
.sg-tabbar-inner {
  display: flex;
  background: var(--paper-2);
  border: 0.5px solid var(--rule);
  border-radius: 24px;
  padding: 6px;
}
.sg-tabbar-inner > * { flex: 1; }
.sg-tab {
  background: transparent; border: 0;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: 7px 4px;
  border-radius: 18px;
  color: var(--ink-4);
  font-family: var(--sans);
  font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 180ms ease;
}
.sg-tab.active {
  background: var(--ink);
  color: var(--paper);
}
.sg-tab svg { display: block; }

/* ─────────────── AI VERDICT ─────────────── */
.sg-ai-verdict {
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.sg-ai-verdict::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.18; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.9  0 0 0 0 0.8  0 0 0 0.3 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.sg-ai-verdict > * { position: relative; }
.sg-ai-eyebrow {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.16em;
  color: var(--accent-2);
  text-transform: uppercase;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.sg-ai-eyebrow .dot {
  width: 5px; height: 5px;
  background: var(--accent-2);
  border-radius: 50%;
  display: inline-block;
  animation: aiDotPulse 1.6s ease-in-out infinite;
}
.sg-ai-verdict.loading .sg-ai-eyebrow .dot { animation-duration: 0.7s; }
@keyframes aiDotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.sg-ai-text {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.55;
  font-style: italic;
  color: var(--paper);
  margin: 0;
  text-wrap: pretty;
  min-height: 50px;
  transition: opacity 200ms;
}
.sg-ai-verdict.loading .sg-ai-text { opacity: 0.45; }
.sg-ai-text strong {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 500;
}
.sg-ai-reroll {
  margin-top: 12px;
  background: transparent;
  border: 0.5px solid rgba(244,239,230,0.3);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 180ms, border-color 180ms;
}
.sg-ai-reroll:hover { background: rgba(244,239,230,0.1); border-color: var(--accent-2); }
.sg-ai-reroll[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ─────────────── SHARE CARD ─────────────── */
.sg-share-card {
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.sg-share-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
}
.sg-share-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.sg-share-lead {
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.sg-share-actions {
  display: flex; flex-direction: column; gap: 8px;
}
.sg-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 0;
  transition: background 180ms, color 180ms, transform 180ms;
}
.sg-share-btn:hover { transform: translateY(-1px); }
.sg-share-btn.primary {
  background: var(--accent);
  color: var(--paper);
}
.sg-share-btn.primary:hover { background: oklch(0.52 0.13 35); }
.sg-share-btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 0.5px solid var(--ink);
}
.sg-share-btn.ghost:hover { background: var(--ink); color: var(--paper); }
.sg-share-btn.copied {
  background: oklch(0.55 0.1 145) !important;
  color: var(--paper);
  border-color: transparent;
}
.sg-spinner {
  display: inline-block;
  width: 11px; height: 11px;
  border: 1.5px solid rgba(244,239,230,0.3);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: sgSpin 800ms linear infinite;
}
@keyframes sgSpin { to { transform: rotate(360deg); } }

/* ─────────────── POSTER ─────────────── */
.sg-poster {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 540px;
  height: 720px;
  background: #F4EFE6;
  padding: 32px 36px 26px;
  font-family: var(--sans);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}
.poster-edge {
  position: absolute;
  left: 36px; right: 36px;
  height: 1px;
  background: var(--ink);
  opacity: 0.85;
}
.poster-edge-top { top: 28px; }
.poster-edge-bot { bottom: 22px; }

.poster-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
}
.poster-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
}
.poster-stamp-mark {
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
}
.poster-stamp-ring {
  position: absolute; inset: 0;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.poster-stamp-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
}
.poster-stamp-text span { font-family: var(--serif); font-size: 17px; font-weight: 500; margin-left: 4px; }

.poster-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 52px;
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 14px 0 14px;
  color: var(--ink);
}
.poster-title em { font-style: italic; color: var(--accent); }

.poster-map {
  flex-shrink: 0;
  background: #ECE5D7;
  border: 1px solid #C8BCA1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  /* Fix the map at the equirectangular aspect ratio (2:1) so we know exactly
     how much vertical room it takes, and the stats + stamps list can rely on
     the remaining flex space. Width = 540 - 36*2 padding = 468 → height = 234. */
  aspect-ratio: 2 / 1;
}
#posterMap { display: block; width: 100%; height: auto; }

.poster-stats {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 14px;
}
.poster-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
  /* room for the mono label baseline so 'p'/'g' descenders don't get clipped */
  padding-bottom: 1px;
}
.poster-stat-num {
  font-family: var(--serif);
  font-feature-settings: 'lnum','tnum';
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}
.poster-stat-pct {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-3);
  margin-left: 1px;
  font-style: italic;
}
.poster-stat.accent .poster-stat-num { color: var(--accent); }
.poster-stat-lbl {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.4;
}
.poster-stat-rule {
  width: 1px;
  height: 28px;
  background: var(--rule);
  flex: 0 0 auto;
}

/* Pexels attribution strip at the bottom of the page — Pexels' license asks
   for a visible credit. Kept small but legible, links to Pexels + the
   per-city credits JSON. */
.sg-pexels-credit {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 40px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-transform: uppercase;
  border-top: 0.5px solid var(--rule);
  margin-top: 32px;
}
.sg-pexels-credit a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.5px;
  transition: color 180ms;
}
.sg-pexels-credit a:hover { color: var(--accent); }

/* Highlight visited countries on the world map — accent fill, accent border */
#posterCountryShapes path.stamped-country {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 0.6;
}

.poster-stamps-row {
  flex: 1;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}
.poster-stamps-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.poster-stamps-list {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  line-height: 1.5;
  text-transform: uppercase;
  word-spacing: 0.18em;
  overflow: hidden;
  position: relative;
  flex: 1;
  /* Soft fade-out at the bottom so any clipped lines feel intentional rather
     than abrupt. mask-image is the modern equivalent of -webkit-mask. */
  -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 75%, transparent 100%);
}
/* Dense layouts (lots of stamps) get a smaller font so more fit before fade */
.poster-stamps-list.dense { font-size: 8.5px; letter-spacing: 0.06em; line-height: 1.45; }

.poster-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 0.5px solid var(--rule);
}
.poster-brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.018em;
  line-height: 1;
  /* Use the regular character set — no stylistic alternates / discretionary
     swashes so the "O" reads as a plain capital O. */
  font-variant-ligatures: none;
  font-feature-settings: normal;
}
.poster-tagline {
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  color: var(--ink-2);
  margin-top: 3px;
  line-height: 1.2;
}
.poster-foot-mono {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
  text-align: right;
}

/* Poster pin styles (SVG circles) */
.poster-pin-outer { fill: var(--accent); opacity: 0.28; }
.poster-pin-inner { fill: var(--accent); stroke: #F4EFE6; stroke-width: 1.2; }

/* ─────────────── SHARED BANNER ─────────────── */
.sg-shared-banner[hidden] { display: none !important; }
.sg-ai-reroll[hidden] { display: none !important; }
.sg-shared-banner {
  position: fixed;
  top: 76px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px 10px 18px;
  border-radius: 999px;
  z-index: 90;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 10px 28px -8px rgba(0,0,0,0.35);
  animation: bannerSlide 360ms cubic-bezier(.2,.7,.3,1);
}
@keyframes bannerSlide {
  from { transform: translate(-50%, -10px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
.sg-shared-text { display: flex; flex-direction: column; gap: 2px; }
.sg-shared-text .mono {
  font-family: var(--mono);
  font-size: 9px; letter-spacing: 0.16em;
  color: var(--accent-2);
  font-weight: 600;
}
.sg-shared-text .serif {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--paper);
  font-style: italic;
}
.sg-shared-btn {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms;
}
.sg-shared-btn:hover { background: var(--accent); color: var(--paper); }
@media (max-width: 540px) {
  .sg-shared-banner {
    top: 70px;
    left: 12px; right: 12px;
    transform: none;
    border-radius: 14px;
  }
  @keyframes bannerSlide {
    from { transform: translateY(-10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }
}
