:root {
  --ink: #05080d;
  --deep: #064f94;
  --ocean: #1f8fdd;
  --paper: #eef8ff;
  --lime: #71ef83;
  color: var(--ink);
  background: var(--ocean);
  font-family: Nunito, sans-serif;
  font-weight: 800;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 12% 14%, #9fddff 0%, transparent 40%), var(--ocean); }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
button, select, .atlas-nav a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #001f42; outline-offset: 4px; }
.atlas { width: min(1440px, 100% - 36px); margin: auto; padding: 18px 0 26px; }
.atlas-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #fff; background: #102947; padding: 9px 16px; border: 2px solid var(--ink); border-radius: 25px 9px; box-shadow: 5px 6px #082b5599; }
.atlas-nav a { text-decoration: none; }
.atlas-nav a:hover { text-decoration: underline; }
.atlas-brand { display: flex; gap: 8px; align-items: center; font-family: Fredoka, sans-serif; font-size: 1.16rem; }
.atlas-brand img { border-radius: 11px 5px; border: 2px solid var(--ink); background: var(--ocean); }
.atlas-head { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 24px; margin: 34px 0 18px; }
.atlas-head h1 { margin: 0; color: white; font: 700 clamp(3.6rem, 9vw, 8rem)/.82 Fredoka, sans-serif; letter-spacing: -.04em; text-shadow: 2px 3px var(--ink), 4px 6px var(--ink); }
.atlas-head h1 span { color: var(--lime); }
.atlas-head p { margin: 16px 0 0; max-width: 46ch; }
.atlas-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.atlas-stats div { display: flex; flex-direction: column-reverse; gap: 2px; padding: clamp(8px, 2vw, 20px); background: #cff1ff; border: 2px solid var(--ink); border-radius: 22px 6px; box-shadow: 4px 5px #082b5599; }
.atlas-stats div:nth-child(2) { background: var(--lime); border-radius: 6px 22px; }
.atlas-stats div:nth-child(3) { background: #ffda80; }
.atlas-stats dd { margin: 0; font: 700 clamp(1.9rem, 5vw, 4.4rem)/1 Fredoka, sans-serif; }
.atlas-stats dt { font-size: clamp(.68rem, 1.2vw, .9rem); }
.atlas-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(225px, 280px); overflow: hidden; border: 2px solid var(--ink); border-radius: 30px 9px; box-shadow: 7px 8px #082b5599; background: var(--paper); }
.atlas-world { display: grid; align-items: center; position: relative; min-width: 0; min-height: 250px; padding: 10px 4px 34px; background: #0875bb; }
.atlas-world svg { display: block; width: 100%; }
.atlas-land { stroke: #083d65; stroke-width: .38; stroke-linejoin: round; cursor: pointer; }
.atlas-land:hover, .atlas-land.is-selected { fill: #fff2ae; stroke: var(--ink); stroke-width: 1; }
.atlas-pin { fill: var(--lime); stroke: var(--ink); stroke-width: 1.1; cursor: pointer; }
.atlas-pin:hover, .atlas-pin.is-selected { fill: white; stroke-width: 1.7; }
.atlas-pin:focus-visible { outline: none; stroke: white; stroke-width: 2; paint-order: stroke; }
.atlas-pin-preview { position: absolute; z-index: 2; width: max-content; max-width: min(232px, 72%); padding: 8px; display: grid; gap: 4px; pointer-events: none; border: 2px solid var(--ink); border-radius: 12px 4px; background: var(--paper); box-shadow: 3px 4px var(--ink); }
.atlas-pin-preview > span, .atlas-country-pins > p { margin: 0; font-size: .75rem; }
.atlas-portraits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.atlas-pin-preview .atlas-portraits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.atlas-portrait { min-width: 0; margin: 0; text-align: center; font-size: .65rem; }
.atlas-portrait img, .atlas-profile-image { display: block; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); border-radius: 9px 4px; background: #b9ddff; }
.atlas-portrait img { width: 100%; height: auto; }
.atlas-portrait figcaption { overflow-wrap: anywhere; }
.atlas-profile, .atlas-country-pins { display: grid; gap: 6px; min-width: 0; }
.atlas-profile input { max-width: 100%; font-size: .78rem; }
.atlas-mobile-wallets { margin: 4px 0; border-top: 1px solid #b2cbe3; padding-top: 8px; }
.atlas-mobile-wallets summary { cursor: pointer; color: var(--deep); font-size: .88rem; font-weight: 900; }
.atlas-mobile-wallets p { margin: 6px 0; font-size: .77rem; }
.atlas-mobile-wallets input { width: 100%; margin-top: 6px; font: inherit; font-size: .75rem; }
.atlas-wallet-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.atlas-wallet-links a, .atlas-wallet-links button { display: grid; place-items: center; min-height: 40px; padding: 4px; border: 1px solid var(--ink); border-radius: 8px 3px; background: #d5f0ff; font: inherit; font-size: .74rem; text-align: center; text-decoration: none; }
.atlas-wallet-links a:hover, .atlas-wallet-links button:hover { background: var(--lime); }
.atlas-portrait-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-portrait-pages button { padding: 5px 8px; border: 1px solid var(--ink); border-radius: 8px 3px; background: white; font-size: .75rem; }
.atlas-country-pins { padding-bottom: 8px; border-bottom: 1px solid #b2cbe3; }
.atlas-views { position: absolute; bottom: 10px; left: 12px; display: flex; flex-wrap: wrap; gap: 5px; }
.atlas-console { padding: 17px; border-left: 2px solid var(--ink); display: grid; align-content: center; gap: 8px; min-width: 0; }
.atlas-console label { color: var(--deep); font-weight: 900; }
.atlas-console select, .atlas-place, .atlas-views button, .atlas-ranked button { padding: 8px 11px; min-height: 40px; border: 2px solid var(--ink); border-radius: 11px 4px; background: white; }
.atlas-console select { width: 100%; min-width: 0; }
.atlas-country { display: grid; gap: 3px; margin: 5px 0; }
.atlas-country strong { font: 700 1.65rem/1 Fredoka, sans-serif; overflow-wrap: anywhere; }
.atlas-place { background: var(--lime); box-shadow: 3px 4px var(--ink); font-size: .9rem; }
.atlas-place:hover:not(:disabled) { background: #a9ffae; }
.atlas-privacy, .atlas-status { margin: 2px 0; font-size: .77rem; }
.atlas-status { min-height: 1.3em; color: var(--deep); font-weight: 900; }
.atlas-status[data-error] { color: #8e1730; }
.atlas-ranked { margin: 22px 0 0; padding: 16px 18px; border: 2px solid var(--ink); border-radius: 8px 23px; background: var(--paper); box-shadow: 5px 6px #082b5599; }
.atlas-ranked h2 { margin: 0; font: 700 2rem/1 Fredoka, sans-serif; }
.atlas-ranked p { margin: 8px 0 0; }
.atlas-ranked ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0 0; list-style: none; }
.atlas-ranked button { background: #d5f0ff; }
.atlas-ranked button:hover { background: var(--lime); }
.atlas footer { margin-top: 16px; font-size: .75rem; }
@media (max-width: 780px) {
  .atlas-head { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .atlas-board { grid-template-columns: 1fr; }
  .atlas-console { border-left: 0; border-top: 2px solid var(--ink); }
}
@media (max-width: 440px) {
  .atlas { width: calc(100% - 22px); padding-top: 10px; }
  .atlas-world { min-height: 216px; }
}
