:root {
  color-scheme: light;
  --forest: #39493a;
  --lime: #eef9b4;
  --canvas: #f7f3e9;
  --ink: #20231f;
  --muted: #697067;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 80px;
}

header {
  padding: 32px;
  border-radius: 24px;
  background: var(--forest);
  color: var(--lime);
}

h1 { margin: 0; font-size: clamp(2.4rem, 8vw, 4.2rem); letter-spacing: -.06em; }
h2 { margin: 40px 0 8px; font-size: 1.3rem; }
p, ul { margin: 8px 0; }
.eyebrow { margin: 0 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
.updated { color: var(--muted); font-size: .9rem; }
a { color: var(--forest); font-weight: 700; }
footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid #d8d8cc; color: var(--muted); }
.travel-card { padding: 28px; border-radius: 28px; background: var(--forest); color: var(--lime); }
.travel-card h1 { font-size: clamp(2.2rem, 10vw, 4rem); }
.travel-card h2 { margin-top: 28px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.handle, .cities { opacity: .72; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.metrics div { display: flex; flex-direction: column; }
.metrics strong { font-size: 2rem; }
.metrics span { font-size: .72rem; font-weight: 800; letter-spacing: .08em; opacity: .65; }
.flags { font-size: 1.7rem; line-height: 1.8; }
.download-button { display: block; margin-top: 20px; padding: 14px 20px; border-radius: 999px; background: var(--forest); color: var(--lime); text-align: center; text-decoration: none; }

.card-page { background: #fff; }
.public-card-shell { width: min(760px, calc(100% - 32px)); padding-top: 20px; }
.public-card { display: grid; gap: 30px; }
.profile-hero {
  padding: 22px;
  border-radius: 20px;
  background: #3e4e3c;
  color: #ecfab2;
}
.profile-row { display: flex; align-items: center; gap: 12px; min-height: 46px; }
.avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ecfab2;
  color: #3e4e3c;
  font-size: 32px;
  font-weight: 800;
}
.profile-handle { font-size: .78rem; font-weight: 700; opacity: .72; }
.location-lines { margin-left: auto; white-space: pre-line; text-align: right; font-size: .68rem; font-weight: 700; line-height: 1.5; opacity: .72; }
.profile-hero h1 { margin-top: 18px; font-size: clamp(2.35rem, 9vw, 3.5rem); line-height: .98; letter-spacing: -.045em; }
.profile-hero p { max-width: 34rem; margin-top: 10px; font-size: .92rem; font-weight: 550; line-height: 1.45; opacity: .82; }
.world-summary { display: grid; grid-template-columns: 1fr 1fr; row-gap: 18px; color: #3e4e3c; padding: 0 2px; }
.world-summary div { display: flex; flex-direction: column; }
.world-summary strong { font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.world-summary span { margin-top: 3px; font-size: .66rem; font-weight: 750; letter-spacing: .08em; opacity: .7; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 0; font-size: .75rem; font-weight: 850; letter-spacing: .14em; }
.section-heading > span { color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .08em; }
.world-map-wrap { position: relative; overflow: hidden; margin-top: 12px; border: 1px solid rgba(62, 78, 60, .12); border-radius: 26px; background: #fff; }
.world-map-wrap svg { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; touch-action: pan-x pan-y; }
.map-sea { fill: #fff; }
.country { fill: #d7d7d2; stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.country.visited { fill: #3e4e3c; }
.tiny-visited { fill: #3e4e3c; stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.map-status { position: absolute; inset: 50% auto auto 50%; margin: 0; transform: translate(-50%, -50%); color: var(--muted); font-size: .76rem; font-weight: 650; }
.record-heading { margin-bottom: 8px; }
.record-heading button { padding: 6px 0; border: 0; background: transparent; color: #3e4e3c; font: inherit; font-size: .72rem; font-weight: 750; cursor: pointer; }
.region-record { border-bottom: 1px solid #e4e4df; padding: 15px 0; }
.region-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.region-heading h3, .legacy-cities h3 { margin: 0; font-size: .68rem; letter-spacing: .12em; }
.region-heading strong { color: #3e4e3c; font-size: .72rem; }
.country-row { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 8px 0; }
.country-flag { font-size: 1.3rem; line-height: 1.2; }
.country-row strong { font-size: .9rem; font-weight: 650; }
.city-detail { margin: 2px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.city-detail span { display: block; color: #3e4e3c; font-size: .68rem; font-weight: 700; opacity: .75; }
.hide-city-details .city-detail, .hide-city-details .legacy-cities { display: none; }
.legacy-cities { margin-top: 18px; padding: 18px; border-radius: 18px; background: #f6f1e6; }
.legacy-cities p { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.public-card-shell > .download-button { margin-top: 30px; }

@media (max-width: 520px) {
  main { padding-top: 24px; }
  header { padding: 24px; border-radius: 20px; }
  .public-card-shell { width: min(calc(100% - 24px), 760px); padding-top: 12px; }
  .public-card { gap: 26px; }
  .profile-hero { padding: 20px; }
  .profile-row { align-items: flex-start; }
  .profile-handle { padding-top: 12px; }
  .location-lines { max-width: 90px; padding-top: 6px; font-size: .58rem; }
  .section-heading > span { white-space: nowrap; }
  .record-heading button { white-space: nowrap; }
  .world-map-wrap { border-radius: 22px; }
}
