/* AROUND THE WORLD — shared map; colors follow the four existing designs. */
.world-section {
  --world-visited: #8df0c8; --world-unvisited: #727b87; --world-upcoming: #f2bf75;
  --world-ocean: #0b1827; --world-border: #263546;
  padding: 4rem 0 2rem;
}
.world-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2rem; }
.world-heading .eyebrow { color: var(--world-visited); margin: 0 0 1rem; }
.world-heading .travel-tagline { font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.5; letter-spacing: .04em; text-transform: none; }
.world-stat { margin: 0; font-size: .9rem; }
.world-stat strong { display: block; color: var(--world-visited); font-size: clamp(3rem, 6vw, 5rem); line-height: 1; letter-spacing: -.06em; }
.world-frame { position: relative; border: 1px solid var(--world-border); background: var(--world-ocean); border-radius: .75rem; overflow: hidden; }
.world-section .travel-map { min-height: 220px; height: clamp(300px, 48vw, 590px); touch-action: pan-y pinch-zoom; }
.world-loading { position: absolute; inset: 0; display: grid; place-content: center; margin: 0; padding: 1rem; text-align: center; }
.world-section .travel-map.leaflet-container { background: var(--world-ocean); font: inherit; height: clamp(300px, 48vw, 590px); aspect-ratio: auto; z-index: 0; touch-action: pan-y pinch-zoom; }
.world-section .travel-map.is-moving { touch-action: none; }
.world-section .travel-map.leaflet-container,
.world-section .travel-map.leaflet-container .leaflet-interactive { cursor: default; }
.world-section .travel-map.leaflet-grab:active,
.world-section .travel-map.leaflet-grab:active .leaflet-interactive,
.leaflet-dragging .world-section .travel-map.leaflet-grab,
.leaflet-dragging .world-section .travel-map.leaflet-grab .leaflet-interactive { cursor: default; }
.world-section .travel-map .leaflet-interactive { transition: fill-opacity .18s ease, stroke .18s ease; outline: none; }
.world-section .travel-map .leaflet-control-zoom a { width: 44px; height: 44px; line-height: 44px; color: #263546; background: #f7f3e8; }
.world-section .travel-map .leaflet-control-zoom a:focus-visible { outline: 3px solid #926000; outline-offset: -4px; }
.world-section .travel-map .leaflet-control { border-color: var(--world-border); box-shadow: none; }
.world-section .travel-map .world-tooltip, .world-section .antarctica-map .world-tooltip { border: 0; border-radius: .3rem; box-shadow: 0 3px 15px #0004; padding: 0; }
.antarctica-inset { position: absolute; left: 4.5rem; bottom: .75rem; z-index: 1; width: clamp(110px, 13vw, 140px); padding: .45rem; border: 1px solid var(--world-border); border-radius: .4rem; background: var(--world-ocean); }
.antarctica-map { height: 80px; touch-action: pan-y pinch-zoom; cursor: default; }
.world-section .antarctica-map .leaflet-interactive { cursor: default; }
.antarctica-map.leaflet-container { background: transparent; overflow: visible; }
.antarctica-map:focus-visible { outline: 3px solid var(--world-upcoming); outline-offset: 2px; }
.antarctica-caption { text-align: center; }
.antarctica-caption h3 { margin: .2rem 0; font-size: .85rem; letter-spacing: 0; }
.antarctica-caption p { margin: 0; font-size: .7rem; line-height: 1.4; }
.world-tooltip-content { display: grid; gap: .35rem; width: max-content; padding: .8rem 1rem; max-width: min(280px, 80vw); color: #07111f; font: .9rem/1.4 "DM Sans", sans-serif; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.world-tooltip-content strong { font-size: 1rem; }
.world-legend { display: flex; flex-wrap: wrap; gap: 1.3rem; list-style: none; padding: 0; margin: 1.25rem 0; font-size: .85rem; }
.world-legend li { display: flex; align-items: center; gap: .5rem; }
.world-swatch { width: .85rem; height: .85rem; border-radius: 2px; background: var(--world-unvisited); }
.world-swatch.visited { background: var(--world-visited); }
.world-swatch.upcoming { background: var(--world-upcoming); }
.world-swatch.visited-upcoming { background: var(--world-visited); border: 2px solid var(--world-upcoming); }
.world-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.world-tools label { font-weight: 700; }
.world-tools select, .world-tools button { min-height: 44px; max-width: 100%; padding: .65rem .8rem; border: 1px solid var(--world-border); border-radius: .25rem; font: inherit; }
.world-tools select { background: #f7f3e8; color: #07111f; }
.world-tools button { background: transparent; color: inherit; cursor: pointer; }
.world-tools button[aria-pressed="true"] { background: var(--world-visited); color: var(--world-ocean); }
.world-status { min-height: 1.5em; line-height: 1.5; }
.world-help, .world-credit { font-size: .8rem; line-height: 1.6; }
.world-country-list { margin: 1.5rem 0; }
.world-country-list summary { cursor: pointer; font-weight: 700; padding: .6rem 0; }
.world-country-list ul { display: flex; flex-wrap: wrap; gap: .6rem 2rem; padding-left: 1.2rem; }
body[data-design="2"] .world-section { --world-visited: #17352b; --world-unvisited: #b6b0a3; --world-upcoming: #a2321b; --world-ocean: #eee5d1; --world-border: #d7cdb8; }
body[data-design="3"] .world-section { --world-visited: #e8ff47; --world-unvisited: #897893; --world-upcoming: #19d9ff; --world-ocean: #24083e; --world-border: #3b2350; }
body[data-design="4"] .world-section { --world-visited: #b9231c; --world-unvisited: #a7a7a4; --world-upcoming: #195d80; --world-ocean: #eeede8; --world-border: #d9d8d1; }
@media (max-width: 760px) {
  .world-section { padding-top: 3rem; }
  .world-stat strong { display: inline; font-size: 2rem; margin-right: .5rem; }
  .world-section .travel-map { height: 320px; min-height: 290px; }
  .world-section .travel-map.leaflet-container { height: 320px; }
  /* Reserve the inset row before the map's lazy-loaded assets arrive. */
  [data-world-overview] > .world-frame { min-height: calc(320px + 72px + 1.55rem + 4px); }
  .world-tools label { flex-basis: 100%; }
  .world-tools select { flex: 1 0 100%; width: 100%; min-width: 0; }
  .antarctica-inset { position: static; width: auto; display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: .75rem; margin: 0 .75rem .75rem; padding: .4rem .75rem; }
  .antarctica-map { height: 72px; }
  .antarctica-caption { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .world-section .travel-map .leaflet-interactive { transition: none; }
}

/* Country breakouts share the map controls and each design’s palette. */
.states-breakout { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--world-border); }
.states-heading { margin-bottom: 1rem; }
.states-heading h3 { margin: 0; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.05; letter-spacing: -.04em; }
.states-intro { margin: 0 0 1.8rem; line-height: 1.6; }
.world-section.is-drilled-down .states-breakout { margin-top: 0; padding-top: 0; border-top: 0; }
.world-back-button { min-height: 44px; margin-bottom: 2rem; padding: .7rem 1rem; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: .25rem; font: inherit; font-weight: 700; cursor: pointer; }
.world-section .travel-map .leaflet-interactive[role="button"]:focus-visible { outline: none; stroke: #fff; stroke-width: 3; }
#states-map { height: clamp(320px, 52vw, 610px); }
@media (max-width: 760px) { #states-map { height: 330px; } .states-breakout { margin-top: 3rem; padding-top: 2rem; } }

/* The UK keeps a tall view so England and Scotland can be explored separately. */
.world-section #uk-map { height: clamp(420px, 58vw, 650px); }
@media (max-width: 760px) { .world-section #uk-map { height: 430px; } }

/* COUNTRIES & CONTINENTS — personal travel totals and native disclosures. */
.travel-breakdown { margin: 2rem 0; padding-top: 1.75rem; border-top: 1px solid var(--world-border); }
.travel-breakdown > h3 { margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.6rem); letter-spacing: -.025em; }
.travel-breakdown > p { margin: .65rem 0 1.5rem; line-height: 1.6; }
.travel-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0 0 1.25rem; }
.travel-stat-grid > div { min-width: 0; padding: 1rem 1.1rem; border: 1px solid var(--world-border); border-radius: .45rem; background: var(--world-ocean); }
.travel-stat-grid dt { font-size: .8rem; font-weight: 700; line-height: 1.5; }
.travel-stat-grid dd { margin: .65rem 0 0; }
.travel-stat-grid dd strong { color: var(--world-visited); font-size: clamp(1.8rem, 3.5vw, 2.5rem); line-height: 1; }
.travel-stat-grid dd span { font-size: .85rem; white-space: nowrap; }
.travel-continent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .75rem; }
.travel-continent { min-width: 0; border: 1px solid var(--world-border); border-radius: .45rem; background: var(--world-ocean); }
.travel-continent > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto .5rem; align-items: center; gap: .75rem; min-height: 44px; padding: .85rem 1rem; cursor: pointer; list-style: none; }
.travel-continent > summary::-webkit-details-marker { display: none; }
.travel-continent > summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid var(--world-visited); border-bottom: 2px solid var(--world-visited); transform: rotate(-45deg); }
.travel-continent[open] > summary::after { transform: rotate(45deg); }
.travel-continent > summary > span:first-child { font-weight: 700; }
.travel-continent > summary > span:last-child { font-size: .8rem; line-height: 1.4; text-align: right; }
.travel-continent-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1.5rem; margin: .2rem 0 0; padding: 0 1.25rem 1.25rem 2rem; font-size: .85rem; line-height: 1.6; }
.travel-continent-places li { overflow-wrap: anywhere; }
.travel-place-kind { display: block; margin-top: .1rem; font-size: .72rem; line-height: 1.4; }
.travel-continent-empty { margin: .1rem 1rem 1rem; font-size: .85rem; line-height: 1.6; }
.travel-counting-notes { margin-top: 1.25rem; }
.travel-counting-notes > summary { min-height: 44px; padding: .7rem 0; font-size: .85rem; font-weight: 700; cursor: pointer; }
.travel-counting-notes p { max-width: 64rem; margin: .65rem 0; font-size: .85rem; line-height: 1.65; }
.travel-counting-notes a { text-underline-offset: .15em; }
.travel-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .75rem 2rem; margin-top: 1.25rem; }
.travel-details-grid > details { min-width: 0; margin: 0; }
.travel-details-grid > details > summary { min-height: 44px; padding: .7rem 0; font: inherit; font-size: .85rem; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.travel-place-button { min-height: 44px; padding: .2rem 0; background: transparent; color: inherit; border: 0; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.travel-place-button:focus-visible { outline: 2px solid var(--world-visited); outline-offset: 3px; border-radius: .2rem; }
.travel-breakdown summary:focus-visible, .travel-counting-notes a:focus-visible { outline: 2px solid var(--world-visited); outline-offset: 3px; border-radius: .2rem; }
@media (min-width: 601px) and (max-width: 900px) {
  .travel-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .travel-stat-grid { grid-template-columns: 1fr; gap: .5rem; }
  .travel-stat-grid > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; }
  .travel-stat-grid dd { margin: 0; white-space: nowrap; }
  .travel-continent-grid, .travel-continent-places { grid-template-columns: 1fr; }
}

/* GLOBE VIEW — the same visited places in an optional rotating world view. */
.world-view-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: -1rem 0 1rem; }
.world-view-switch button { min-height: 44px; padding: .65rem 1.15rem; border: 1px solid var(--world-border); border-radius: .3rem; background: var(--world-ocean); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.world-view-switch button:focus-visible, .world-create-link:focus-visible { outline: 3px solid var(--world-upcoming); outline-offset: 3px; }
.world-view-switch .world-create-link { display: inline-flex; align-items: center; flex: 1 1 7rem; max-width: 14rem; min-height: 44px; padding: .25rem .5rem; border: 1px solid currentColor; border-radius: .3rem; background: var(--world-ocean); color: var(--world-upcoming); font-weight: 700; line-height: 1.4; text-decoration: none; text-underline-offset: .2em; }
.world-create-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.world-frame .travel-map[hidden], .travel-globe[hidden] { display: none !important; }
.world-frame.is-globe { min-height: 0; }
.world-frame.is-globe .antarctica-inset { display: none; }
.travel-globe { position: relative; width: 100%; height: clamp(360px, 55vw, 590px); min-height: 360px; overflow: hidden; background: var(--world-ocean); touch-action: pan-y pinch-zoom; }
.travel-globe-svg { display: block; width: 100%; height: 100%; overflow: hidden; cursor: default; touch-action: pan-y pinch-zoom; }
.travel-globe-svg:focus-visible { outline: 3px solid var(--world-upcoming); outline-offset: -5px; }
.travel-globe.is-touch-enabled, .travel-globe.is-touch-enabled .travel-globe-svg { touch-action: none; }
.globe-ocean { stroke-width: 1.5; }
.globe-graticule { fill: none; stroke-width: .5; opacity: .6; pointer-events: none; }
.globe-country { cursor: default; vector-effect: non-scaling-stroke; transition: fill-opacity .18s ease, stroke .18s ease; outline: none; }
.globe-country:hover { fill-opacity: .84; }
.globe-country:focus-visible { stroke: #fff; stroke-width: 2.2; filter: drop-shadow(0 0 2px #07111f); }
.globe-tooltip { position: absolute; z-index: 2; max-width: min(280px, calc(100% - 16px)); border-radius: .3rem; background: #fff; box-shadow: 0 3px 15px #0004; pointer-events: none; }
.globe-tooltip[hidden] { display: none; }
.globe-zoom-controls { position: absolute; left: 10px; bottom: 10px; display: grid; overflow: hidden; border: 1px solid var(--world-border); border-radius: 4px; }
.globe-zoom-controls button { width: 44px; height: 44px; padding: 0; border: 0; color: #263546; background: #f7f3e8; font: 700 1.6rem/44px Arial, sans-serif; cursor: pointer; }
.globe-zoom-controls button + button { border-top: 1px solid #bbc0c4; }
.globe-zoom-controls button:focus-visible { outline: 3px solid #926000; outline-offset: -4px; }
.globe-zoom-controls button:disabled { color: #8b9095; cursor: default; }
.globe-touch-toggle { display: none; position: absolute; right: 10px; bottom: 10px; min-height: 44px; padding: .65rem .85rem; border: 1px solid var(--world-border); border-radius: .3rem; background: var(--world-ocean); color: inherit; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.globe-touch-toggle[aria-pressed="true"] { background: var(--world-visited); border-color: var(--world-visited); color: var(--world-ocean); }
.globe-touch-toggle:focus-visible { outline: 3px solid var(--world-upcoming); outline-offset: 3px; }
@media (any-pointer: coarse), (max-width: 760px) { .globe-touch-toggle { display: block; } }
@media (max-width: 760px) {
  [data-world-overview] > .world-frame.is-globe { min-height: 0; }
  .travel-globe { height: 390px; }
  .world-view-switch { margin-top: -.5rem; }
}
.travel-globe.is-reduced-motion .globe-country { transition: none; }
@media (prefers-reduced-motion: reduce) { .globe-country { transition: none; } }
