/* composernames.com/where-in-the-world — a globe of the cities where composers live. */
:root {
  --wiw-navy: #0b2a6b;
  --wiw-blue: #1660d8;
  --wiw-sky: #1e90ff;
  --wiw-ink: #1d2433;
  --wiw-muted: #5b6478;
  --wiw-line: #dfe5f0;
  --wiw-bar-h: 64px;
  --wiw-list-w: 320px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  font-family: "Barlow Condensed", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  color: var(--wiw-ink);
  background: #06143a;
}
button, input { font: inherit; color: inherit; }
.wiw-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Top bar ---------- */
.wiw-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--wiw-bar-h);
  padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  color: #fff;
  background: linear-gradient(135deg, #0b2a6b 0%, #1660d8 55%, #1e90ff 100%);
  z-index: 5;
}
.wiw-bar__home {
  flex: none;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.9;
  white-space: nowrap;
}
.wiw-bar__home:hover { opacity: 1; text-decoration: underline; }
.wiw-bar__title { flex: 1; min-width: 0; text-align: center; }
.wiw-bar__title h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wiw-bar__tagline { margin: 4px 0 0; font-size: 17px; font-style: italic; font-weight: 400; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiw-bar__stats { margin: 3px 0 0; font-size: 16px; font-weight: 300; opacity: 0.92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiw-bar__actions { flex: none; display: flex; gap: 8px; }
.wiw-btn {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: var(--wiw-blue);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.wiw-btn:hover { background: #eaf2ff; }
.wiw-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); }
.wiw-btn--ghost:hover, .wiw-btn--ghost[aria-expanded="true"] { background: rgba(255, 255, 255, 0.18); }
.wiw-short { display: none; }
#wiw-list-toggle { display: none; }
:focus-visible { outline: 3px solid #ffd24a; outline-offset: 2px; }

/* ---------- Layout ---------- */
.wiw-main { flex: 1; min-height: 0; display: flex; position: relative; }
.wiw-list {
  flex: none;
  width: var(--wiw-list-w);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--wiw-line);
  z-index: 3;
}
.wiw-list__search { flex: none; position: relative; padding: 12px; border-bottom: 1px solid var(--wiw-line); }
.wiw-search__list { top: 52px; left: 12px; right: 12px; }
.wiw-search__list li { display: flex; align-items: baseline; gap: 8px; }
.wiw-search__note { margin-left: auto; flex: none; color: var(--wiw-muted); font-size: 15px; font-weight: 300; }
.wiw-list__search input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #c5cede;
  border-radius: 8px;
  font-size: 18px;
}
.wiw-list__body { flex: 1; overflow-y: auto; padding: 4px 0 12px; overscroll-behavior: contain; }
.wiw-link { padding: 0; border: 0; background: none; color: var(--wiw-blue); font-weight: 600; cursor: pointer; text-decoration: underline; }
.wiw-note { margin: 18px 16px; color: var(--wiw-muted); line-height: 1.35; }
.wiw-country {
  margin: 14px 14px 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wiw-muted);
}
.wiw-city {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 7px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.wiw-city:hover, .wiw-city.is-active { background: #eef4ff; }
.wiw-city__name { font-weight: 600; font-size: 19px; }
.wiw-city__sub { color: var(--wiw-muted); font-size: 16px; font-weight: 300; }
.wiw-city__people { display: block; flex-basis: 100%; }
.wiw-city__count {
  margin-left: auto;
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 12px;
  background: var(--wiw-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.wiw-city__names { width: 100%; padding: 0 14px 6px; margin: -4px 0 0; color: var(--wiw-muted); font-size: 16px; font-weight: 300; line-height: 1.25; }

.wiw-stage { flex: 1; min-width: 0; position: relative; background: radial-gradient(ellipse at 50% 45%, #12348a 0%, #0a1f5c 45%, #050f2e 100%); }
.wiw-map { position: absolute; inset: 0; }
.wiw-map canvas { outline: none; }
.wiw-map .maplibregl-canvas-container { opacity: 0; transition: opacity 0.6s ease; }
.wiw-map.is-ready .maplibregl-canvas-container { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .wiw-map .maplibregl-canvas-container { transition: none; } }
/* Zoom all the way out and the map gives way to the solar system; the globe itself stays as Earth. */
.wiw-space { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at 50% 50%, #0a1436 0%, #04081c 55%, #01030c 100%); pointer-events: none; overflow: hidden; }
.wiw-space svg { display: block; width: 100%; height: 100%; }
.wiw-space__orbit { vector-effect: non-scaling-stroke; fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; }
.wiw-space__orbit--earth { stroke: rgba(120, 190, 255, 0.4); }
.wiw-space__name { fill: rgba(255, 255, 255, 0.5); font-size: 11px; font-weight: 300; letter-spacing: 0.08em; text-transform: uppercase; }
.wiw-space__arrow { fill: none; stroke: #ffd24a; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.wiw-space__say {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  color: #ffd24a;
  font-size: 26px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
}
.wiw-space__say--mars { color: #ff9a6b; font-size: 20px; transition: opacity 0.2s ease; }
.wiw-space__arrow--mars { stroke: #ff9a6b; stroke-width: 2; opacity: 0; transition: opacity 0.2s ease; }
.wiw-map.is-space .maplibregl-canvas-container { cursor: default; }
.wiw-map.is-space .maplibregl-marker { opacity: 0 !important; pointer-events: none; }
.wiw-stage.is-flat .wiw-space, .wiw-stage.is-flat .wiw-space__say { display: none; }
@media (prefers-reduced-motion: reduce) { .wiw-space__say--mars, .wiw-space__arrow--mars { transition: none; } }
.wiw-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  margin: 0;
  padding: 5px 14px;
  border-radius: 16px;
  background: rgba(5, 15, 46, 0.6);
  color: #fff;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.wiw-hint.is-gone { opacity: 0; }
/* The (i) note: the page's small print first, then the map credits. */
.maplibregl-ctrl-attrib .wiw-credit-add { font-weight: 700; }
.maplibregl-ctrl-attrib.maplibregl-compact { max-width: min(330px, calc(100% - 20px)); }
.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner,
.maplibregl-ctrl-attrib[open] .maplibregl-ctrl-attrib-inner { white-space: normal; line-height: 1.45; padding: 3px 0; }
.wiw-stage.is-flat .wiw-map, .wiw-stage.is-flat .wiw-hint { display: none; }
.wiw-stage__fallback { margin: 0; padding: 40px 24px; color: #fff; text-align: center; font-size: 20px; }

/* MapLibre chrome, toned to the page */
.maplibregl-ctrl-attrib { font-family: Helvetica, Arial, sans-serif; font-size: 10px; }
.maplibregl-ctrl-group { border-radius: 8px; }

/* ---------- Pins ---------- */
.wiw-pin {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: "Barlow Condensed", sans-serif;
}
/* A 40px slot whose centre sits on the city (globe.js anchors there), whatever is drawn in it:
   the small dot, the count, or the first headshot. The label hangs off to the right. */
.wiw-pin__lead { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.wiw-map[data-detail="2"] .wiw-pin.has-faces .wiw-pin__lead { display: none; }
.wiw-pin__dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--wiw-sky);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease;
}
.wiw-pin.is-single .wiw-pin__dot { width: 18px; height: 18px; }
.wiw-pin.is-cluster .wiw-pin__dot {
  width: 34px;
  height: 34px;
  background: #fff;
  border-color: var(--wiw-sky);
  color: var(--wiw-navy);
  font-size: 16px;
}
.wiw-pin:hover .wiw-pin__dot, .wiw-pin.is-active .wiw-pin__dot { transform: scale(1.18); background: #ffb020; }
.wiw-pin.is-cluster:hover .wiw-pin__dot { background: #fff3d6; }
.wiw-pin__faces { display: none; flex: none; }
.wiw-pin__face {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  background: var(--wiw-blue) center / cover no-repeat;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.wiw-pin__face + .wiw-pin__face { margin-left: -16px; }
.wiw-pin__label {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  padding: 3px 9px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: var(--wiw-ink);
  line-height: 1.1;
  white-space: nowrap;
  text-align: left;
}
.wiw-pin__city { font-weight: 600; font-size: 16px; }
.wiw-pin__names { display: none; font-weight: 300; font-size: 15px; color: #3a4459; }
/* Zoom detail: 0 = just the pin, 1 = + city name, 2 = + headshots and names. */
.wiw-map[data-detail="1"] .wiw-pin:not(.is-cluster) .wiw-pin__label,
.wiw-map[data-detail="2"] .wiw-pin:not(.is-cluster) .wiw-pin__label { display: flex; }
.wiw-map[data-detail="2"] .wiw-pin:not(.is-cluster) .wiw-pin__names { display: block; }
.wiw-map[data-detail="2"] .wiw-pin.has-faces .wiw-pin__faces { display: flex; }
/* Pins round the back of the globe */
.maplibregl-marker-covered { opacity: 0 !important; pointer-events: none; }
.maplibregl-marker { transition: opacity 0.2s ease; }
.maplibregl-marker:hover, .maplibregl-marker:has(.is-active) { z-index: 2; }

/* ---------- City card ---------- */
.wiw-card {
  position: absolute;
  top: 14px;
  right: 14px;
  width: min(340px, calc(100% - 28px));
  max-height: calc(100% - 60px);
  overflow-y: auto;
  padding: 18px 18px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 4;
}
.wiw-card[hidden] { display: none; }
.wiw-card__close, .wiw-dialog__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--wiw-muted);
  cursor: pointer;
}
/* The X is drawn as two bars from the exact middle of the circle: the "×" character sits wherever
   the font puts it, which is never quite the centre. */
.wiw-card__close, .wiw-dialog__close, .wiw-video__close { padding: 0; font-size: 0; line-height: 0; }
.wiw-card__close::before, .wiw-card__close::after,
.wiw-dialog__close::before, .wiw-dialog__close::after,
.wiw-video__close::before, .wiw-video__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  margin: -1px 0 0 -8px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.wiw-card__close::after, .wiw-dialog__close::after, .wiw-video__close::after { transform: rotate(-45deg); }
.wiw-card__close:hover, .wiw-dialog__close:hover { background: #eef1f6; color: var(--wiw-ink); }
.wiw-card__city { margin: 0 36px 0 0; font-size: 30px; font-weight: 600; line-height: 1.05; }
.wiw-card__where { margin: 2px 0 10px; color: var(--wiw-muted); font-weight: 300; }
.wiw-card__people { list-style: none; margin: 0; padding: 0; }
.wiw-person { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--wiw-line); }
.wiw-person__photo {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wiw-blue) center / cover no-repeat;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.wiw-hear {
  flex: none;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--wiw-blue);
  cursor: pointer;
}
.wiw-hear svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wiw-hear:hover { background: #d6e6ff; }
.wiw-hear.is-playing { background: var(--wiw-blue); color: #fff; animation: wiw-hear-pulse 0.9s ease-in-out infinite; }
@keyframes wiw-hear-pulse { 50% { box-shadow: 0 0 0 6px rgba(22, 96, 216, 0.22); } }
@media (prefers-reduced-motion: reduce) { .wiw-hear.is-playing { animation: none; } }
.wiw-person__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wiw-person__name { font-size: 22px; font-weight: 600; line-height: 1.1; }
.wiw-person__body a { color: var(--wiw-blue); font-size: 17px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiw-person__body a:hover { text-decoration: underline; }

/* ---------- Add-your-pin dialog ---------- */
.wiw-dialog {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 26px 26px 22px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  color: var(--wiw-ink);
  overflow-y: auto;
}
/* Click Mars in the solar system view: a video plays in a box */
.wiw-video { width: min(960px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 14px; background: #000; overflow: visible; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.wiw-video::backdrop { background: rgba(1, 3, 12, 0.82); }
.wiw-video__frame { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.wiw-video__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.wiw-video__close { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #0b2a6b; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
@media (max-width: 860px) { .wiw-video__close { top: -44px; right: 0; } }
.wiw-dialog::backdrop { background: rgba(5, 15, 46, 0.65); }
.wiw-dialog h2 { margin: 0 30px 6px 0; font-size: 32px; font-weight: 600; line-height: 1.05; }
.wiw-lede, .wiw-done p { margin: 0 0 16px; font-size: 19px; line-height: 1.3; font-weight: 300; }
.wiw-form[hidden], .wiw-done[hidden] { display: none; }
.wiw-field { display: block; margin: 0 0 14px; position: relative; }
.wiw-label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 18px; }
.wiw-optional { font-weight: 300; color: var(--wiw-muted); }
.wiw-field input[type="text"], .wiw-field input[type="email"], .wiw-field input[type="url"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #b9c3d6;
  border-radius: 8px;
  font-size: 19px;
  background: #fff;
}
.wiw-field input:focus { outline: none; border-color: var(--wiw-blue); box-shadow: 0 0 0 3px rgba(22, 96, 216, 0.2); }
.wiw-field input.is-picked { border-color: #1c9d5b; background: #f3fbf6; }
.wiw-hint-text { display: block; margin-top: 4px; font-size: 15px; line-height: 1.25; color: var(--wiw-muted); font-weight: 300; }
.wiw-combo__list {
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  z-index: 3;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #b9c3d6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: 260px;
  overflow-y: auto;
}
.wiw-combo__list[hidden] { display: none; }
.wiw-combo__list li { padding: 8px 12px; cursor: pointer; font-size: 18px; }
.wiw-combo__list li[aria-selected="true"], .wiw-combo__list li:hover { background: #eef4ff; }
.wiw-combo__list li.is-empty { cursor: default; color: var(--wiw-muted); background: none; }
.wiw-photo { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.wiw-photo__preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px dashed #b9c3d6;
  background: #f3f6fb center / cover no-repeat;
}
.wiw-photo__preview.has-photo { border-style: solid; border-color: var(--wiw-blue); }
.wiw-photo__text { color: var(--wiw-blue); font-weight: 600; text-decoration: underline; }
#wiw-photo-file:focus-visible + .wiw-hint-text { outline: 3px solid #ffd24a; }
.wiw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wiw-error { margin: 0 0 12px; padding: 9px 12px; border-radius: 8px; background: #fdecec; color: #a11a1a; font-size: 17px; }
.wiw-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 24px;
  background: var(--wiw-blue);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.wiw-submit:hover { background: #0f4fb8; }
.wiw-submit:disabled { opacity: 0.6; cursor: default; }
.wiw-submit--danger { background: #c0392b; }
.wiw-submit--danger:hover { background: #a02d21; }
.wiw-done__actions { display: flex; flex-direction: column; gap: 10px; }
.wiw-noscript { color: #fff; text-align: center; padding: 30px; }

/* ---------- Phones and narrow windows ---------- */
@media (max-width: 860px) {
  :root { --wiw-bar-h: 56px; }
  .wiw-bar { gap: 8px; }
  .wiw-bar__home { font-size: 0; }
  .wiw-bar__home span { font-size: 24px; }
  .wiw-bar__title { text-align: left; }
  .wiw-bar__title h1 { font-size: 23px; }
  .wiw-bar__stats { font-size: 14px; margin-top: 1px; }
  .wiw-btn { height: 36px; padding: 0 12px; font-size: 15px; }
  .wiw-long { display: none; }
  .wiw-short { display: inline; }
  #wiw-list-toggle { display: inline-block; }
  .wiw-list {
    position: absolute;
    inset: 0;
    width: auto;
    border-right: 0;
    transform: translateY(102%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 6;
  }
  .wiw-list.is-open { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .wiw-card {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-height: 55%;
    border-radius: 16px 16px 0 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .wiw-hint { font-size: 13px; bottom: 46px; }
  .wiw-space__say { font-size: 20px; }
  .wiw-bar__tagline { font-size: 14px; white-space: normal; text-wrap: balance; }
  .wiw-stage.is-flat { display: none; }
  .wiw-main:has(.wiw-stage.is-flat) .wiw-list { position: static; transform: none; visibility: visible; flex: 1; }
}
@media (min-width: 861px) {
  .wiw-stage.is-flat { flex: 0 0 0; }
  .wiw-main:has(.wiw-stage.is-flat) .wiw-list { flex: 1; width: auto; max-width: 640px; margin: 0 auto; border-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wiw-list, .wiw-pin__dot, .maplibregl-marker, .wiw-hint { transition: none; }
}

/* The list as the server first sends it (for crawlers): same look, until globe.js draws its own. */
div.wiw-city { cursor: default; }
.wiw-city__names a { color: inherit; text-decoration: none; }
