:root {
  color-scheme: light;
  --paper: #f3f8ff;
  --surface: #fff;
  --ink: #102c4e;
  --muted: #476483;
  --line: #d9e8f7;
  --blue: #0065fa;
  --turquoise: #01d5c6;
  --ocean: #102b4c;
  --land: #397c91;
  --font-ui: Geologica, system-ui, sans-serif;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.shell { width: min(1320px, calc(100% - 80px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; width: 132px; height: auto; }
nav { display: flex; align-items: center; gap: 7px; }
nav > * { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 750; white-space: nowrap; }
nav > *:hover, .nav-active { background: #e8f3ff; }
nav .top-cart { border-color: var(--line); }
.top-cart b { display: grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 4px; border-radius: 5px; background: var(--turquoise); font-size: 12px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; color: #345879; font: 750 12px/1.4 var(--font-ui); letter-spacing: .105em; }
.eyebrow > span { width: 8px; height: 8px; background: #087e87; border-radius: 2px; }
.eyebrow b { color: #35769d; }
h1 { margin: 12px 0; font-size: clamp(49px, 5.7vw, 85px); line-height: .96; letter-spacing: -.085em; font-weight: 790; }
h1 em { color: #007d87; font-style: normal; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(285px, 330px); align-items: stretch; gap: 16px; scroll-margin-top: 12px; }
.selection { min-width: 0; border: 1px solid #d5e6f7; border-radius: 14px; background: var(--surface); box-shadow: 0 6px 20px #143c6907; overflow: hidden; }
.map-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 15px; }
.empty-icon, .pixel-icon { display: grid; place-items: center; background: #e9f5fc; color: #256b98; border-radius: 8px; }
h2 { margin: 0; font-size: 20px; line-height: 1.15; letter-spacing: -.046em; }
.map-modes { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #eff7ff; }
.map-modes button { display: flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid transparent; background: transparent; border-radius: 5px; font-size: 12px; font-weight: 750; }
.map-modes svg { width: 14px; height: 14px; }
.map-modes [aria-pressed="true"] { background: #fff; border-color: #cfe3f7; box-shadow: 0 1px 3px #12355d12; }
#map { position: absolute; inset: 0; font-family: var(--font-ui); }
#map .maplibregl-canvas { cursor: crosshair; }
#map .maplibregl-canvas:active { cursor: grabbing; }
.map-search { position: absolute; top: 13px; left: 13px; width: min(272px, calc(100% - 68px)); display: flex; align-items: center; gap: 6px; padding: 4px 5px 4px 10px; border: 1px solid #fff5; border-radius: 8px; background: #f3f9ff; color: #205781; box-shadow: 0 2px 10px #102d4c44; }
.map-search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 6px 3px; color: var(--ink); font-size: 12px; }
.map-search input:focus { outline: none; }
.map-search:focus-within { outline: 2px solid #087e87; }
.map-search button { border: 0; border-radius: 5px; background: #dff4f9; padding: 5px 6px; }
.map-search button:hover { background: var(--turquoise); }
.map-controls { position: absolute; top: 13px; right: 13px; display: grid; gap: 5px; }
.map-controls button { display: grid; place-items: center; width: 34px; height: 33px; padding: 0; border: 0; border-radius: 6px; background: #f3f9ff; font-size: 21px; }
.map-controls button:hover { background: var(--turquoise); }
.maplibregl-ctrl-bottom-right { bottom: 0; }
.maplibregl-map .maplibregl-ctrl-attrib, .maplibregl-map .maplibregl-ctrl-scale { font-size: 12px; }
.region-label { color: #edfaff; text-shadow: 0 1px 4px #102b4c; font: 750 12px/1 var(--font-ui); letter-spacing: .1em; white-space: nowrap; pointer-events: none; }
.region-label.ocean { color: #add7ee; letter-spacing: .17em; }
.city-marker { display: grid; place-items: center; background: var(--turquoise); width: 13px; height: 13px; border: 2px solid #103d64; border-radius: 50%; padding: 0; box-shadow: 0 0 0 3px #01d5c64d; }
.city-marker:hover { background: #fff; }
.map-footer { min-height: 45px; flex-wrap: wrap; color: #456685; font-size: 12px; }
.map-position { font: 12px var(--font-ui); }
.selection { display: flex; flex-direction: column; }
.selection-head { padding: 19px 17px 13px; border-bottom: 1px solid var(--line); }
.selection-head h2 { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 8px; }
#selection-count { padding: 4px 7px; border-radius: 6px; background: #e1f6f9; color: #126073; font-size: 13px; letter-spacing: normal; }
.selection-content { flex: 1; min-height: 175px; display: flex; flex-direction: column; justify-content: center; padding: 12px 15px; }
.empty { text-align: center; padding: 14px 4px; }
.empty-icon { width: 50px; height: 50px; margin: 0 auto 13px; border: 1px solid #cce6f5; }
.empty-icon svg { width: 24px; height: 24px; }
.empty strong { display: block; font-size: 14px; }
.empty p { margin: 6px auto 0; max-width: 225px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.selection-bottom { padding: 15px 16px 12px; border-top: 1px solid var(--line); }
.total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.total strong { font-size: 23px; letter-spacing: -.06em; }
.primary, .secondary { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; padding: 11px; border: 1px solid #0056dc; border-radius: 8px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; }
.primary:hover:not(:disabled) { background: #0053cb; }
.primary:disabled { opacity: .57; }
.primary .end-icon { margin-left: auto; }
.secondary { background: #e8f3ff; border-color: #cfe3f7; color: var(--ink); }
.secondary:hover { background: #d9eeff; }
.micro { margin: 9px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
#destinations { display: flex; flex-wrap: wrap; gap: 7px; }
#destinations button { padding: 6px 8px; border-radius: 6px; border: 1px solid #d6e7f6; background: #fff; font-size: 12px; font-weight: 750; }
#destinations button:hover { background: #e9f5fc; }
#destinations svg { width: 12px; height: 12px; }
.pixel-list { list-style: none; padding: 0; margin: 0; overflow: auto; max-height: 292px; }
.pixel-row { display: flex; gap: 8px; align-items: center; padding: 8px 1px; border-bottom: 1px solid var(--line); }
.pixel-row:last-child { border-bottom: 0; }
.pixel-icon { width: 31px; height: 31px; flex: none; }
.pixel-location { display: grid; gap: 3px; text-align: left; flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; }
.pixel-location:hover strong { text-decoration: underline; }
.pixel-location strong { font-size: 12px; overflow-wrap: anywhere; }
.pixel-location small { font: 12px var(--font-ui); color: var(--muted); }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.icon-button:hover { background: #e8f3ff; }
dialog { width: min(455px, calc(100% - 20px)); max-height: calc(100% - 20px); padding: 0; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); box-shadow: 0 12px 48px #102b4c40; }
dialog::backdrop { background: #102b4c88; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin-top: 6px; }
#panel-content { padding: 15px 18px 18px; }
#panel-content .total { margin-top: 13px; }
.profile-form { display: grid; gap: 7px; }
.profile-form label { font-size: 13px; font-weight: 750; }
.profile-form input { width: 100%; border: 1px solid #cbdff1; padding: 9px; border-radius: 7px; }
.account-heading { margin: 20px 0 7px; font-size: 15px; }
.toast { position: fixed; z-index: 2; bottom: 17px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); border-radius: 8px; background: #123c64; color: #fff; padding: 10px 14px; box-shadow: 0 4px 16px #102b4c44; font-size: 13px; pointer-events: none; }
.toast:empty { display: none; }
@media (max-width: 930px) {
  .shell { width: calc(100% - 44px); }
  .workspace { grid-template-columns: minmax(0, 1fr) 265px; gap: 11px; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 24px); }
  .top-inner { min-height: 62px; }
  nav { gap: 3px; }
  nav > * { padding: 8px; }
  nav .nav-active { display: none; }
  h1 { font-size: clamp(48px, 12vw, 73px); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 370px) {
  nav button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .map-modes button { padding-inline: 4px; }
}
.map-controls[hidden] { display: none; }
.canvas-map { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.canvas-map:active { cursor: grabbing; }
.canvas-attribution { position: absolute; bottom: 0; right: 0; padding: 2px 5px; color: #163957; background: #f4fbffe8; font-size: 12px; }
.canvas-attribution a { text-decoration: underline; }

/* The atlas is the page. Interface panels float above the map. */
body { overflow: hidden; background: var(--ocean); }
.top { position: fixed; z-index: 1; inset: 0 0 auto; background: #fbfdff; }
.top-inner { min-height: 62px; }
.workspace { position: fixed; inset: 0; display: block; color: var(--ink); }
#map { position: absolute; inset: 0; background: var(--ocean); }
.map-intro { position: absolute; top: 84px; left: clamp(12px, 2.5vw, 40px); width: min(310px, calc(100vw - 24px)); padding: 15px; border-radius: 13px; background: #f9fcfff5; box-shadow: 0 8px 28px #0a284838; }
.map-intro-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-emblem { flex: none; object-fit: contain; }
.map-intro h1 { font-size: clamp(31px, 3.7vw, 46px); margin: 8px 0 13px; }
.map-search { position: static; width: 100%; box-shadow: none; border-color: #cfe4f6; background: #fff; }
#destinations { margin-top: 9px; gap: 5px; }
#destinations button { padding: 4px 6px; font-size: 12px; }
.selection { position: absolute; top: 84px; right: clamp(12px, 2.5vw, 40px); width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - 150px); box-shadow: 0 8px 28px #0a284838; }
.selection-head { padding: 12px; }
.selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.selection-head h2 { flex: 1; margin: 0; font-size: 17px; }
.selection-heading .icon-button { width: 26px; height: 26px; font-size: 17px; }
.palette { padding: 0; border: 0; min-width: 0; margin: 9px 0; }
.palette legend { padding: 0; margin-bottom: 5px; font-size: 12px; font-weight: 750; }
.color-options { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
#palette-options { display: contents; }
.color-swatch, .custom-color { width: 25px; height: 25px; border-radius: 6px; padding: 2px; background: #fff; border: 1px solid #afc8e2; }
.color-swatch::before { display: block; width: 100%; height: 100%; border-radius: 3px; background: var(--color); content: ""; }
.color-swatch[aria-pressed="true"], .custom-color.is-active { border: 2px solid #134f89; padding: 1px; }
.custom-color { display: block; }
.custom-color input { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 3px; background: transparent; cursor: pointer; }
.custom-color input::-webkit-color-swatch-wrapper { padding: 0; }
.custom-color input::-webkit-color-swatch { border: 0; border-radius: 3px; }
.custom-color input::-moz-color-swatch { border: 0; border-radius: 3px; }
.map-modes button { flex: 1; justify-content: center; }
.selection-content { display: block; flex: 0 1 auto; min-height: 0; overflow: auto; padding: 4px 12px; }
.selection-content .empty { padding: 8px 0; }
.selection-content .empty p { margin: 0 auto; max-width: none; }
.selection-bottom { padding: 9px 12px; }
.selection-bottom .total { margin-bottom: 7px; }
.selection.is-collapsed .selection-content, .selection.is-collapsed .selection-bottom { display: none; }
.selection.is-collapsed #selection-tools { display: none; }
.selection.is-collapsed .selection-head { border-bottom: 0; }
.pixel-color-chip { background: var(--pixel-color); border: 1px solid #152f5426; }
.map-controls { z-index: 1; top: auto; right: auto; bottom: 38px; left: clamp(12px, 2.5vw, 40px); width: min(310px, calc(100vw - 24px)); display: grid; gap: 5px; padding: 9px; border-radius: 11px; background: #f7fcfffa; box-shadow: 0 6px 20px #0a284838; }
.zoom-heading, .zoom-rail { display: flex; gap: 6px; align-items: center; }
.zoom-heading { justify-content: space-between; font-size: 12px; font-weight: 800; }
#zoom-current { padding: 2px 5px; border-radius: 4px; background: #e1f0ff; font: 750 12px/1.2 var(--font-ui); }
.zoom-rail button { flex: none; width: 27px; height: 27px; border: 1px solid var(--line); font-size: 17px; }
.zoom-rail svg { width: 14px; height: 14px; }
.zoom-track { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
#zoom-level { width: 100%; height: 22px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.zoom-mark { pointer-events: none; position: absolute; left: clamp(8px, var(--selection-stop, 75%), calc(100% - 8px)); top: 17px; width: 2px; height: 5px; background: #1765a8; }
.map-controls .zoom-threshold { display: block; width: fit-content; height: auto; padding: 3px 5px; background: #e2f2ff; font-size: 12px; font-weight: 800; }
.map-controls .zoom-threshold.is-ready { background: var(--turquoise); }
.map-footer { position: absolute; left: clamp(12px, 2.5vw, 40px); bottom: 9px; min-height: 0; justify-content: start; padding: 4px 7px; color: #edf8ff; background: #102b4ce8; border-radius: 5px; pointer-events: none; max-width: calc(100vw - 245px); }
.map-position { color: #b8d7f9; }
.canvas-attribution, #map .maplibregl-ctrl-bottom-right { z-index: 1; }
.toast { bottom: 135px; }
@media (max-width: 720px) {
  .top-inner { min-height: 52px; }
  .brand img { width: 112px; }
  .map-intro { top: 61px; width: min(238px, calc(100vw - 24px)); padding: 8px 10px; }
  .map-emblem { width: 38px; height: 41px; }
  .map-intro h1 { font-size: clamp(24px, 7.4vw, 33px); margin: 4px 0 7px; }
  #destinations { display: none; }
  .selection { top: auto; left: 12px; right: 12px; bottom: 145px; width: auto; max-height: min(36dvh, 230px); }
  .selection-head { padding: 7px 9px; }
  .selection-head h2 { font-size: 14px; }
  #selection-tools { display: grid; gap: 6px; }
  .color-options { gap: 4px; }
  .color-swatch, .custom-color { width: 23px; height: 23px; }
  .palette { margin: 3px 0 0; }
  .palette legend { margin-bottom: 3px; }
  .selection-content:has(.empty) { display: none; }
  .selection-bottom { padding: 6px 9px; }
  .selection-bottom .total { margin-bottom: 3px; }
  .selection-bottom .total strong { font-size: 17px; }
  .selection-bottom .primary { padding: 5px; }
  .map-controls { left: 12px; bottom: 54px; padding: 6px 8px; }
  .map-footer { left: 12px; bottom: 25px; max-width: calc(100vw - 24px); }
  .map-position { display: none; }
  .toast { bottom: 147px; }
}
@media (max-height: 500px) {
  .map-intro h1 { font-size: 26px; }
  #destinations { display: none; }
  .selection { overflow: auto; }
}
