/* Shared owner / public visual design. Both modes use the SAME real MapLibre globe. */
:root {
  --atlas-topbar:146px;
  --atlas-footer-height:calc(60px + env(safe-area-inset-bottom,0px));
  --atlas-cta-height:0px;
}
body.atlas-public-view {
  --atlas-cta-height:60px;
}
body { background:#051724; }
.topbar {
  height:var(--atlas-topbar);
  min-height:var(--atlas-topbar);
  padding:12px max(18px,calc((100vw - 980px)/2));
  display:grid;
  grid-template-columns:minmax(0,1fr) 48px;
  grid-template-rows:58px 62px;
  gap:7px 12px;
  background:linear-gradient(180deg,rgba(5,22,34,.985),rgba(6,24,36,.97));
  border-bottom:1px solid rgba(43,113,129,.35);
  backdrop-filter:blur(18px);
  z-index:1400;
}
.topbar .atlas-brand {
  grid-column:1;
  grid-row:1;
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  padding:0;
  margin:0;
  text-align:left;
  overflow:hidden;
  white-space:normal;
}
.atlas-logo { display:block; width:57px; height:49px; flex:none; color:#E6C08B; }
.atlas-brand-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.atlas-brand-text strong {
  color:#E6C08B;
  font-size:clamp(19px,3vw,27px);
  line-height:1.05;
  font-weight:750;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
}
.atlas-brand-text small { color:#9fb5c5; font-size:clamp(12px,2vw,16px); font-weight:400; }

.topbar .atlas-more-button {
  grid-column:2;grid-row:1;
  width:44px;height:44px;
  padding:0; margin:0; align-self:center;justify-self:end;
  display:grid;place-items:center;
  font-size:30px;line-height:1;
  border:none;background:transparent;color:#e8f5ff;
  border-radius:12px;
}
.topbar .atlas-more-button:hover { background:#243e4b; }
.atlas-more-menu {
  position:absolute;
  top:69px;
  right:max(14px,calc((100vw - 980px)/2));
  width:min(240px,calc(100vw - 24px));
  display:grid;
  gap:5px;
  padding:8px;
  background:#152c3b;
  border:1px solid #4a6575;
  border-radius:14px;
  box-shadow:0 15px 35px #0009;
  z-index:3500;
}
.atlas-more-menu[hidden] { display:none; }
.atlas-more-menu button {
  padding:12px 14px;
  text-align:left;
  background:transparent;
  border:none;
  border-radius:8px;
  font-size:14px;
}
.atlas-more-menu button:hover { background:#294353; }

/* Legacy region counter stays in DOM for app logic, not in the header. */
.topbar #regionStat { display:none !important; }

.topbar .atlas-stat-grid {
  grid-column:1 / -1;grid-row:2;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  height:62px;
  width:100%;
  max-width:none;
  padding:0;
  margin:0;
  align-items:stretch;
  justify-content:stretch;
}
.topbar .atlas-stat {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  min-width:0;
  min-height:0;
  padding:5px 10px;
  border:1px solid #31596d;
  border-radius:17px;
  background:linear-gradient(145deg,#142f41,#092733);
  box-shadow:inset 0 0 15px #133c4330;
  color:#e7f4fc;
}
.atlas-stat svg {
  width:34px;height:34px;flex:none;display:block;
}
.atlas-stat-countries svg { color:#4df6a4; }
.atlas-stat-cities svg { color:#ff6373; }
.atlas-stat-wanted svg { color:#f690c8; }
.atlas-stat > div {
  display:flex;flex-direction:column;align-items:flex-start;
  min-width:0;
}
.topbar .atlas-stat strong {
  font-size:clamp(20px,2.8vw,29px);
  color:#f3fbff;
  line-height:1.05;
  font-weight:750;
}
.topbar .atlas-stat span {
  font-size:clamp(11px,1.8vw,16px);
  font-weight:450;
  color:#d3e4ef;
  text-transform:none;
  letter-spacing:0;
  white-space:nowrap;
}

#map { top:var(--atlas-topbar); bottom:calc(var(--atlas-footer-height) + var(--atlas-cta-height) + 22px); }
/* Owner globe meets the compact footer; public viewer still reserves CTA space. */
body:not(.atlas-public-view):not(.show-directory) #map { bottom:var(--atlas-footer-height); }
.directory-screen { top:var(--atlas-topbar); bottom:calc(var(--atlas-footer-height) + var(--atlas-cta-height) + 22px); }
.stamps-screen { top:var(--atlas-topbar); bottom:calc(var(--atlas-footer-height) + var(--atlas-cta-height) + 22px); }
.map-legend { top:calc(var(--atlas-topbar) + 12px); }
.map-legend-collapsed { top:calc(var(--atlas-topbar) + 12px); }

.atlas-main-cta {
  box-sizing:border-box;
  position:fixed;
  left:50%;
  bottom:calc(var(--atlas-footer-height) + 11px);
  transform:translateX(-50%);
  width:min(900px,calc(100% - 28px));
  height:var(--atlas-cta-height);
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border:1px solid #72ffc0;
  border-radius:17px;
  background:linear-gradient(120deg,#71ffbb,#36f79b);
  color:#052638;
  text-decoration:none;
  box-shadow:0 4px 24px #092927aa;
  font-weight:800;
  font-size:clamp(16px,3.9vw,24px);
  text-align:center;
  z-index:1320;
}
.atlas-main-cta svg { width:26px;height:26px;flex:none; }
.atlas-main-cta:hover { background:linear-gradient(120deg,#a1ffd2,#58ffad); color:#052638; }
.atlas-main-cta:focus-visible { outline:3px solid white;outline-offset:3px; }

.bottom-nav {
  height:var(--atlas-footer-height);
  min-height:var(--atlas-footer-height);
  align-items:center;
  gap:clamp(12px,6vw,55px);
  padding:3px 15px calc(3px + env(safe-area-inset-bottom,0px));
  border-radius:16px 16px 0 0;
  border:1px solid #204c5f;
  background:linear-gradient(180deg,#0c2837,#061e2a);
  box-shadow:0 -5px 20px #0005;
}
.bottom-nav .nav-button {
  flex:0 1 190px;
  height:50px;
  max-width:200px;
  display:flex;flex-direction:column;gap:2px;
  padding:3px 10px 6px;
  align-items:center;justify-content:center;
  background:transparent;border:none;
  border-radius:12px;
  color:#a5bbcb;
  font-size:12px;
  line-height:1.15;
  font-weight:600;
  position:relative;
}
.bottom-nav .nav-button[hidden] { display:none; }
.bottom-nav .nav-button.active {
  background:transparent;
  color:#55f8a2;
}
.bottom-nav .nav-button.active::after {
  content:"";position:absolute;bottom:1px;
  left:34%;right:34%;height:3px;
  border-radius:5px;background:#55f8a2;
}
.bottom-nav .nav-icon {display:flex;align-items:center;justify-content:center;}
 .bottom-nav .nav-icon svg {width:22px;height:22px;}
.bottom-nav .nav-button:focus-visible { outline:2px solid #55f8a2; outline-offset:3px; }

/* Guests see the exact same interface and data-driven globe/tickets, read-only. */
.atlas-public-view .place-actions,
.atlas-public-view .city-quick-actions,
.atlas-public-view #exportBtn,
.atlas-public-view #importInput,
.atlas-public-view #clearBtn,
.atlas-public-view #atlasMenuShare,
.atlas-public-view .file-label { display:none !important; }
.atlas-public-view .travel-ticket { cursor:pointer; }

/* The new public-link controls live in the existing PNG sharing modal. */
.atlas-public-sharing {
  display:grid;gap:9px;
  padding:12px;margin-bottom:14px;
  border:1px solid #396478;border-radius:12px;
  background:#0c2836;
  text-align:center;
}
.atlas-public-sharing > strong { font-size:15px; }
.atlas-public-sharing p { font-size:12px;color:#a7bcc8;margin:0;line-height:1.5; }
.atlas-public-sharing input {
  font-size:13px;margin:0;background:#061b25;color:#e8f5fb;
  text-align:center;min-width:0;width:100%;
}
.atlas-public-sharing .atlas-public-actions { display:flex;flex-wrap:wrap;gap:8px;justify-content:center; }
.atlas-public-sharing button {
  background:#26505c;color:#e9faff;border:1px solid #417988;
  padding:9px 12px;min-height:42px;border-radius:9px;
}
.atlas-public-sharing .atlas-publish-main { background:#35c779;color:#07271c;border-color:#61f3ac;font-weight:700; }
.atlas-public-sharing .atlas-publish-disable { color:#ffb7bb;background:#4b303c; }
.atlas-public-sharing button[hidden], .atlas-public-sharing input[hidden] {display:none}
.atlas-public-sharing button:disabled {opacity:.55}
.atlas-public-sharing [role="status"] {min-height:1em;color:#c3d5e1;font-size:12px}

@media (max-width:760px) {
  :root {
    --atlas-topbar:calc(154px + env(safe-area-inset-top,0px));
    --atlas-mobile-topbar:var(--atlas-topbar);
    --atlas-footer-height:calc(60px + env(safe-area-inset-bottom,0px));
    --atlas-mobile-bottomnav:var(--atlas-footer-height);
    --atlas-cta-height:0px;
  }
  body.atlas-public-view { --atlas-cta-height:58px; }
  .topbar {
    height:var(--atlas-topbar);
    min-height:var(--atlas-topbar);
    padding:calc(9px + env(safe-area-inset-top,0px)) 14px 9px;
    display:grid;grid-template-columns:minmax(0,1fr) 38px;
    grid-template-rows:60px minmax(0,1fr);
    gap:7px 8px;
  }
  .topbar::before { content:none; display:none; }
  .topbar .atlas-brand {
    grid-column:1;grid-row:1;
    padding:0;text-align:left;margin:0;
    display:flex;min-width:0;
  }
  .atlas-logo { width:54px;height:45px; }
  .atlas-brand-text strong {font-size:clamp(18px,5.3vw,24px);}
  .atlas-brand-text small {font-size:clamp(11px,3.4vw,14px);}
  .topbar .atlas-more-button { grid-column:2;grid-row:1; }
  .atlas-more-menu {top:calc(64px + env(safe-area-inset-top,0px));right:10px;}
  .topbar .atlas-stat-grid {
    grid-column:1 / -1;grid-row:2;
    height:65px;display:grid;gap:7px;margin:0;
  }
  .topbar .atlas-stat {padding:6px 4px;gap:7px;border-radius:13px;min-height:0;}
  .atlas-stat svg {width:26px;height:26px;}
  .topbar .atlas-stat strong {font-size:clamp(19px,5vw,25px);}
  .topbar .atlas-stat span {font-size:clamp(10px,2.9vw,13px);}
  #map,.directory-screen {top:var(--atlas-topbar);bottom:calc(var(--atlas-footer-height) + var(--atlas-cta-height) + 22px);}
  .stamps-screen {top:var(--atlas-topbar);bottom:calc(var(--atlas-footer-height) + var(--atlas-cta-height) + 22px);}
  .map-legend,.map-legend-collapsed {top:calc(var(--atlas-topbar) + 9px);}
  .atlas-main-cta { bottom:calc(var(--atlas-footer-height) + 10px);width:calc(100% - 26px);height:var(--atlas-cta-height); }
  .bottom-nav {height:var(--atlas-footer-height);gap:20px;padding:3px 9px calc(3px + env(safe-area-inset-bottom,0px));}
  .bottom-nav .nav-button {flex:1 1 0;width:auto;min-width:0;max-width:170px;height:50px;font-size:12px;gap:2px;padding:3px 3px 6px;}
  .bottom-nav .nav-icon svg {width:22px;height:22px;}
}
@media (max-width:370px) {
  .topbar {padding-inline:8px;}
  .atlas-logo {width:45px;height:42px;}
  .atlas-brand-text strong {font-size:17px;}
  .topbar .atlas-stat-grid {gap:5px;}
  .topbar .atlas-stat {gap:4px;padding:4px 2px;}
  .atlas-stat svg {width:22px;height:22px;}
  .topbar .atlas-stat strong {font-size:19px;}
  .topbar .atlas-stat span {font-size:10px;}
  .atlas-main-cta {font-size:16px;}
}

/* Owner-only header share icon. Keep it in the existing header grid instead
   of the old third column from share.css. */
.topbar .atlas-share-launch {
  grid-column:2;
  grid-row:1;
  position:static;
  display:grid;
  place-items:center;
  justify-self:end;
  align-self:center;
  width:44px;
  height:44px;
  padding:8px;
  margin:0;
  border:1px solid #386579;
  border-radius:13px;
  background:rgba(19,52,65,.8);
  color:#65ffb4;
}
.topbar .atlas-share-launch svg {
  display:block;
  width:24px;
  height:24px;
}
/* Public links are for browsing the author's globe and tickets only.
   Owners keep their Search tab and full 3-button navigation. */
body.atlas-public-view #placesTab { display:none !important; }

body.atlas-public-view .topbar .atlas-share-launch { display:none !important; }
.atlas-main-cta[hidden], body:not(.atlas-public-view) .atlas-main-cta {
  display:none !important;
}
/* No tall share CTA for the owner: give that height back to the real globe. */
@media (max-width:760px) {
  .topbar .atlas-share-launch {
    grid-column:2;
    grid-row:1;
    position:static;
    width:42px;
    height:42px;
    padding:7px;
  }
  .bottom-nav { gap:8px; }
  .bottom-nav .nav-button { min-width:0; }
}


/* Premium live-link pane. Only displayed inside the Link tab. */
.atlas-public-sharing {
  display:grid;
  gap:15px;
  margin:0;
  padding:17px;
  text-align:left;
  border:1px solid rgba(80,133,143,.58);
  border-radius:16px;
  background:linear-gradient(160deg,#123542 0%,#0c2936 70%,#0a2633 100%);
  box-shadow:inset 0 1px 0 #5ff6b114;
}
.atlas-publish-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
}
.atlas-publish-identity {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.atlas-publish-globe {
  flex:none;
  display:grid;
  place-items:center;
  width:41px;
  height:41px;
  background:#1a4b4d;
  border:1px solid #396b6b;
  border-radius:12px;
  color:#71ffc2;
}
.atlas-publish-globe svg {width:25px;height:25px;}
.atlas-publish-identity-text {display:flex;flex-direction:column;gap:2px;min-width:0;}
.atlas-publish-identity-text strong {color:#f3fffa;font-size:15px;font-weight:750;}
.atlas-publish-identity-text small {color:#9dbcc6;font-size:11px;line-height:1.35;}
.atlas-publish-badge {
  font-size:11px;
  font-weight:650;
  color:#acc3cc;
  background:#223e49;
  padding:6px 9px;
  border-radius:100px;
  border:1px solid #375867;
  white-space:nowrap;
}
.atlas-publish-badge.is-live {
  color:#74f7b7;
  background:#173e36;
  border-color:#326a55;
}
.atlas-publish-description {
  font-size:12px!important;
  color:#b3cbd3!important;
  line-height:1.6!important;
  margin:0!important;
}
.atlas-public-inputwrap {
  display:flex;
  gap:10px;
  align-items:center;
  min-width:0;
  padding:2px 12px;
  min-height:45px;
  background:#071e29;
  border:1px solid #315465;
  border-radius:11px;
}
.atlas-public-inputwrap[hidden] {display:none!important;}
.atlas-public-inputwrap svg {width:18px;height:18px;flex:none;color:#8caebb;}
.atlas-public-sharing .atlas-public-inputwrap input {
  width:100%;
  min-width:0;
  height:39px;
  padding:0;
  margin:0;
  background:transparent;
  color:#effafd;
  border:0;
  outline:0;
  box-shadow:none;
  font-size:12px;
  text-align:left;
  text-overflow:ellipsis;
  white-space:nowrap;
  cursor:text;
}
.atlas-public-sharing .atlas-public-actions {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  margin:0;
}
.atlas-public-sharing .atlas-public-actions button {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:47px;
  padding:11px 13px;
  border-radius:11px;
  font-size:13px;
  font-weight:650;
  transition:background .14s ease;
}
.atlas-public-sharing .atlas-public-actions button[hidden] {display:none!important;}
.atlas-public-sharing .atlas-public-actions button svg {
  display:block;
  width:18px;
  height:18px;
  flex:none;
}
.atlas-public-sharing .atlas-public-actions .atlas-publish-main {
  background:linear-gradient(105deg,#69fcb8,#45eaa0);
  color:#052b20;
  border:1px solid #82ffcd;
  font-weight:750;
}
.atlas-public-sharing .atlas-public-actions .atlas-publish-main:hover {
  background:linear-gradient(105deg,#8bffcd,#64ffb4);
}
.atlas-public-sharing .atlas-public-actions .atlas-publish-secondary {
  background:transparent;
  color:#d9ecf1;
  border:1px solid #426577;
}
.atlas-public-sharing .atlas-public-actions .atlas-publish-secondary:hover {
  background:#173d4b;
}
.atlas-publish-footer {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  padding-top:4px;
}
.atlas-publish-privacy {
  font-size:11px;
  line-height:1.4;
  color:#91b5c2;
}
.atlas-public-sharing .atlas-publish-footer .atlas-publish-disable {
  min-height:0;
  padding:4px 0;
  font-size:11px;
  font-weight:550;
  color:#e5a0ac;
  border:0;
  background:none;
  text-decoration:underline;
  text-decoration-color:transparent;
  text-underline-offset:3px;
}
.atlas-public-sharing .atlas-publish-footer .atlas-publish-disable:hover {
  color:#ffb9c4;
  text-decoration-color:currentColor;
  background:transparent;
}
.atlas-public-sharing .atlas-publish-footer button[hidden] {display:none!important;}
.atlas-public-sharing #atlasPublishStatus {
  min-height:0;
  margin:0;
  font-size:12px;
  line-height:1.5;
  color:#acc4ce;
}
.atlas-public-sharing #atlasPublishStatus:empty {display:none;}
@media (max-width:480px) {
  .atlas-public-sharing {padding:13px;gap:12px;}
  .atlas-publish-identity-text strong {font-size:14px;}
  .atlas-publish-identity-text small {font-size:10px;}
  .atlas-publish-header {gap:8px;}
  .atlas-publish-badge {font-size:10px;}
  .atlas-publish-privacy {font-size:10px;}
}


/* Inline copy affordance: the link icon is a real accessible button. */
.atlas-public-inputwrap .atlas-public-copy-icon {
  flex:0 0 36px;
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  padding:7px;
  margin-right:-6px;
  color:#75ecc0;
  background:rgba(91,218,173,.09);
  border:1px solid transparent;
  border-radius:9px;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease;
}
.atlas-public-inputwrap .atlas-public-copy-icon:hover,
.atlas-public-inputwrap .atlas-public-copy-icon:focus-visible {
  color:#b8ffe2;
  border-color:#477e77;
  background:#1e504f;
}
.atlas-public-inputwrap .atlas-public-copy-icon:focus-visible {
  outline:2px solid #5bf8b1;
  outline-offset:2px;
}
.atlas-public-inputwrap .atlas-public-copy-icon svg {
  display:block;
  width:20px;
  height:20px;
  stroke:currentColor;
}

/* In-app publishing confirmation replaces the browser/Telegram confirm(). */
.atlas-public-sharing .atlas-publish-confirm {
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid #3f7866;
  border-radius:12px;
  background:linear-gradient(145deg,#153c42,#0b3038);
}
.atlas-public-sharing .atlas-publish-confirm[hidden] { display:none!important; }
.atlas-public-sharing .atlas-publish-confirm strong {
  font-size:14px;
  font-weight:750;
  color:#f2fff9;
}
.atlas-public-sharing .atlas-publish-confirm p {
  margin:0;
  font-size:12px;
  line-height:1.55;
  color:#bbd3d7;
  text-align:left;
}
.atlas-public-sharing .atlas-publish-confirm-actions {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
  gap:8px;
}
.atlas-public-sharing .atlas-publish-confirm-actions button {
  width:100%;
  min-height:42px;
  padding:10px 8px;
  font-size:13px;
  font-weight:650;
  color:#dae9eb;
  background:#254957;
  border:1px solid #3c6470;
  border-radius:10px;
}
.atlas-public-sharing .atlas-publish-confirm-actions .atlas-publish-confirm-yes {
  color:#062b20;
  background:#66f6b3;
  border-color:#7affe0;
}
.atlas-public-sharing .atlas-publish-confirm-actions button:disabled {opacity:.55;cursor:wait;}
@media (max-width:360px) {
  .atlas-public-sharing .atlas-publish-confirm {padding:11px;}
  .atlas-public-sharing .atlas-publish-confirm-actions button {font-size:12px;}
}


/* Tiny loading flight-board inside the existing stats: no overlay on globe. */
.atlas-stat-grid.atlas-stats-loading .atlas-stat {
  border-color:#376475;
  background:linear-gradient(145deg,#173845,#0d2d3a);
}
.atlas-stat-grid .atlas-stat strong .atlas-stat-loading-plane {
  display:block;
  width:26px;
  height:26px;
  overflow:visible;
  transform-origin:center;
  will-change:transform,opacity;
  animation:atlas-stat-plane-fly 1.35s ease-in-out infinite;
}
.atlas-stat-countries .atlas-stat-loading-plane { color:#59f4af; }
.atlas-stat-cities .atlas-stat-loading-plane {
  color:#ff828d;
  animation-delay:-.24s!important;
}
.atlas-stat-wanted .atlas-stat-loading-plane {
  color:#f6a0d3;
  animation-delay:-.48s!important;
}
.atlas-brand-text small.atlas-loading-caption {
  color:#83e9b7;
  letter-spacing:.075em;
  font-size:clamp(10px,1.9vw,13px);
  font-weight:650;
  animation:atlas-data-caption-pulse 1.5s ease-in-out infinite;
}
@keyframes atlas-stat-plane-fly {
  0%,100% { transform:translate(-2px,2px) rotate(-9deg);opacity:.62; }
  50% { transform:translate(3px,-3px) rotate(7deg);opacity:1; }
}
@keyframes atlas-data-caption-pulse {
  0%,100% {opacity:.7;}
  50% {opacity:1;}
}
@media(max-width:760px) {
  .atlas-stat-grid .atlas-stat strong .atlas-stat-loading-plane {
    width:24px;height:24px;
  }
}
@media(max-width:370px) {
  .atlas-stat-grid .atlas-stat strong .atlas-stat-loading-plane {
    width:22px;height:22px;
  }
  .atlas-brand-text small.atlas-loading-caption {
    font-size:10px;
    letter-spacing:.04em;
  }
}
@media(prefers-reduced-motion:reduce) {
  .atlas-stat-grid .atlas-stat strong .atlas-stat-loading-plane,
  .atlas-brand-text small.atlas-loading-caption {
    animation:none!important;
    opacity:1;
    transform:none;
  }
}


/* Map-first navigation: Search is a small floating tool, settings live beside Share. */
.topbar { grid-template-columns:minmax(0,1fr) auto; }
.topbar .atlas-header-actions {
  grid-column:2; grid-row:1;
  display:flex; align-items:center; justify-self:end; align-self:center; gap:7px;
}
.topbar .atlas-header-actions .atlas-share-launch,
.topbar .atlas-header-actions .atlas-settings-launch {
  position:static; grid-column:auto; grid-row:auto;
  display:grid; place-items:center;
  justify-self:auto; align-self:auto; flex:0 0 42px;
  width:42px; height:42px; margin:0; padding:9px;
  border:1px solid #356074; border-radius:13px;
  background:rgba(19,52,65,.85); color:#dcecf1;
  box-shadow:0 3px 12px #00162250;
}
.topbar .atlas-header-actions .atlas-share-launch { color:#65ffb4; }
.topbar .atlas-header-actions .atlas-settings-launch svg,
.topbar .atlas-header-actions .atlas-share-launch svg {
  display:block; width:22px; height:22px; fill:none; stroke:currentColor;
}
.topbar .atlas-header-actions .atlas-settings-launch:hover,
.topbar .atlas-header-actions .atlas-share-launch:hover {
  background:#224c58; border-color:#518a8d;
}
.topbar .atlas-header-actions button:focus-visible,
.atlas-map-search-fab:focus-visible,
.atlas-tools-close:focus-visible {
  outline:2px solid #64f8b6; outline-offset:3px;
}
body.atlas-public-view .topbar .atlas-header-actions { display:none!important; }

/* Search action floats over the globe, without a permanent text field. */
.atlas-map-search-fab {
  position:fixed;
  z-index:1650;
  top:calc(var(--atlas-topbar) + 15px);
  right:14px;
  width:46px; height:46px;
  display:grid; place-items:center;
  padding:10px; margin:0;
  border:1px solid rgba(96,161,170,.69); border-radius:50%;
  background:rgba(9,35,49,.89); color:#eaf9ff;
  box-shadow:0 6px 18px #00131bb0, inset 0 1px 0 #ffffff12;
  backdrop-filter:blur(12px);
}
.atlas-map-search-fab svg { width:23px; height:23px; fill:none; stroke:currentColor; }
.atlas-map-search-fab:hover,.atlas-map-search-fab[aria-expanded="true"] {
  border-color:#60e9af; color:#73ffbe; background:rgba(20,65,68,.97);
}
body.show-trips .atlas-map-search-fab,
body.show-stamps .atlas-map-search-fab,
body.atlas-public-view .atlas-map-search-fab { display:none!important; }

/* Legend moves to the opposite side of the search action; no icon overlap. */
body:not(.atlas-public-view) .map-legend,
body:not(.atlas-public-view) .map-legend-collapsed {
  left:12px; right:auto;
}
body.atlas-tools-open .map-legend,
body.atlas-tools-open .map-legend-collapsed { display:none!important; }

.atlas-tools-scrim {
  position:fixed; z-index:1690;
  top:var(--atlas-topbar); left:0; right:0; bottom:var(--atlas-footer-height);
  background:rgba(2,12,22,.37); backdrop-filter:blur(2px);
}
.atlas-tools-scrim[hidden] { display:none!important; }

/* A bottom sheet on mobile, a compact bottom-right panel on wide screens. */
#directoryScreen.atlas-tools-sheet {
  position:fixed; z-index:1700;
  top:auto; left:auto; right:12px;
  bottom:calc(var(--atlas-footer-height) + 10px);
  display:block; visibility:visible;
  width:min(460px,calc(100% - 24px));
  height:min(72dvh,650px);
  max-height:calc(100dvh - var(--atlas-topbar) - var(--atlas-footer-height) - 23px);
  overflow-y:auto; overscroll-behavior:contain;
  padding:0 20px 24px;
  background:linear-gradient(160deg,#123443,#071f2d 75%);
  border:1px solid #427786; border-radius:22px;
  color:#eaf5f8;
  box-shadow:0 18px 56px rgba(0,0,0,.62);
  scrollbar-width:thin;
  animation:atlas-tools-sheet-enter .18s ease-out;
}
@keyframes atlas-tools-sheet-enter {
  from { opacity:.82; transform:translateY(20px); }
  to { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion:reduce) {
  #directoryScreen.atlas-tools-sheet { animation:none; }
}
body.show-trips .map-legend-collapsed { display:none!important; }
#directoryScreen.atlas-tools-sheet[hidden] { display:none!important; }
#directoryScreen .atlas-tools-grip {
  width:46px; height:4px; margin:11px auto 0;
  border-radius:99px; background:#6a8b9b90;
}
#directoryScreen .atlas-tools-head {
  position:sticky; top:0; z-index:2;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; min-height:62px;
  background:linear-gradient(180deg,#103240 84%,rgba(16,50,64,.96));
  border-bottom:1px solid #315464;
}
#directoryScreen .atlas-tools-head h2 {
  margin:0; font-size:20px; font-weight:750;
  color:#f4ffff;
}
#directoryScreen .atlas-tools-close {
  width:38px; height:38px; min-width:38px;
  padding:9px; display:grid; place-items:center;
  border:1px solid #375f6d; border-radius:11px;
  color:#bcd3dc; background:#1a3b49;
}
#directoryScreen .atlas-tools-close svg {width:18px;height:18px;}
#directoryScreen .directory-content { max-width:100%; margin:0; padding:7px 0 0; }
#directoryScreen .atlas-tools-pane[hidden] { display:none!important; }
#directoryScreen .directory-content h2 {
  margin:21px 0 10px; font-size:14px; font-weight:700; color:#d7f4ed;
}
#directoryScreen .search-field { margin:5px 0 10px; }
#directoryScreen .search-field #searchInput {
  width:100%; padding:13px 43px 13px 15px; margin:0;
  border:1px solid #46717f; border-radius:13px;
  background:#082533; color:#f2faff; font-size:16px;
}
#directoryScreen .search-field #searchInput:focus {
  outline:1px solid #54dbaa; border-color:#54dbaa;
}
#directoryScreen .search-results {
  max-height:240px; overflow-y:auto; margin:5px 0;
  border-radius:10px;
}
#directoryScreen .catalog-section { margin:9px 0; }
#directoryScreen .filter-option { margin:14px 0; padding:13px; border:1px solid #315566; border-radius:13px; background:#123441; }
#directoryScreen .filter-note { margin:6px 0 12px; padding-left:8px; }
#directoryScreen .language-picker { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
#directoryScreen .language-option { width:100%; height:48px; margin:0; }
#directoryScreen .actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
#directoryScreen .actions button,
#directoryScreen .actions .file-label {
  width:100%; min-height:44px; margin:0;
  display:flex; align-items:center; justify-content:center;
  text-align:center; padding:10px 8px; font-size:12px;
  border-radius:11px; border:1px solid #41687a; background:#1c4252;
}
#directoryScreen .actions .danger {
  grid-column:1/-1; color:#ffbdc0; border-color:#934956; background:#432a39;
}
#directoryScreen .progress { margin:10px 0 12px; }
@media (max-width:760px) {
  .topbar { grid-template-columns:minmax(0,1fr) auto; }
  .topbar .atlas-header-actions { gap:6px; }
  .topbar .atlas-header-actions .atlas-share-launch,
  .topbar .atlas-header-actions .atlas-settings-launch {
    flex-basis:38px; width:38px; height:38px; padding:8px; border-radius:11px;
  }
  .topbar .atlas-header-actions .atlas-settings-launch svg,
  .topbar .atlas-header-actions .atlas-share-launch svg { width:21px; height:21px; }
  .atlas-map-search-fab { top:calc(var(--atlas-topbar) + 12px); right:12px; width:44px; height:44px; }
  #directoryScreen.atlas-tools-sheet {
    width:100%; left:0; right:0;
    bottom:var(--atlas-footer-height);
    height:min(68dvh,680px);
    max-height:calc(100dvh - var(--atlas-topbar) - var(--atlas-footer-height) - 8px);
    padding:0 17px calc(23px + env(safe-area-inset-bottom,0px));
    border-radius:22px 22px 0 0;
    border-left:0; border-right:0; border-bottom:0;
  }
  body:not(.atlas-public-view) .map-legend,
  body:not(.atlas-public-view) .map-legend-collapsed { left:10px; right:auto; }
}
@media (max-width:370px) {
  .topbar .atlas-header-actions { gap:4px; }
  .topbar .atlas-header-actions .atlas-share-launch,
  .topbar .atlas-header-actions .atlas-settings-launch {
    flex-basis:35px; width:35px; height:35px; padding:7px;
  }
  .topbar .atlas-brand { gap:6px; }
  .topbar .atlas-brand-text strong { font-size:16px; }
}


/* Cleaner standard header actions and a true above-everything search/settings modal. */
.topbar .atlas-header-actions { gap:8px; }
.topbar .atlas-header-actions .atlas-settings-launch,
.topbar .atlas-header-actions .atlas-share-launch {
  color:#cfe6ee;
  border:1px solid rgba(105,151,165,.44);
  border-radius:12px;
  background:rgba(16,48,63,.68);
  box-shadow:none;
}
.topbar .atlas-header-actions .atlas-share-launch {
  color:#73eab1;
}
.topbar .atlas-header-actions .atlas-settings-launch svg,
.topbar .atlas-header-actions .atlas-share-launch svg {
  width:22px; height:22px; fill:none; stroke:currentColor;
}
body.atlas-tools-open { overflow:hidden; }
body.atlas-tools-open .atlas-map-search-fab { opacity:0; pointer-events:none; }
.atlas-tools-scrim {
  position:fixed;
  z-index:5000;
  inset:0;
  background:rgba(1,11,19,.7);
  backdrop-filter:blur(6px);
}
#directoryScreen.atlas-tools-sheet {
  z-index:5100;
  box-sizing:border-box;
  position:fixed;
  inset:auto max(12px,env(safe-area-inset-right,0px)) 0 auto;
  width:min(540px,calc(100vw - 24px));
  height:min(86dvh,820px);
  max-height:calc(100dvh - 14px);
  overflow-y:auto;
  overflow-x:hidden;
  padding:0 20px 30px;
  background:#092331;
  border:1px solid #345d6e;
  border-bottom:0;
  border-radius:23px 23px 0 0;
  box-shadow:0 0 65px rgba(0,0,0,.68);
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
#directoryScreen.atlas-tools-sheet[hidden],
#directoryScreen #atlasSearchShortcuts[hidden],
#directoryScreen #atlasVisitedListPanel[hidden],
#directoryScreen #atlasWantedListPanel[hidden],
#directoryScreen #searchResults[hidden] {
  display:none!important;
}
#directoryScreen .atlas-tools-grip {
  width:42px; height:4px;
  margin:10px auto 0;
  background:rgba(138,173,185,.5);
}
#directoryScreen .atlas-tools-head {
  position:sticky;
  top:0;
  z-index:15;
  min-height:54px;
  background:#092331;
  border-bottom:0;
  padding:0 0 4px;
}
#directoryScreen .atlas-tools-head h2 {
  font-size:19px;
  font-weight:700;
  letter-spacing:-.02em;
}
#directoryScreen .atlas-tools-close {
  width:36px; height:36px; min-width:36px;
  border:0; border-radius:10px;
  background:#183847; color:#b7d0d9;
}
#directoryScreen .atlas-tools-close:hover { background:#244c5b; }
#directoryScreen .directory-content {
  padding:0;
  width:100%;
}
#directoryScreen .search-field.atlas-search-input-wrap {
  position:sticky;
  top:54px;
  z-index:14;
  display:flex;
  align-items:center;
  width:100%;
  margin:0 0 14px;
  background:#112f40;
  border:1px solid #507582;
  border-radius:13px;
  box-shadow:0 8px 16px rgba(5,25,35,.2);
}
#directoryScreen .atlas-search-input-wrap > svg {
  width:20px; height:20px;
  position:absolute; left:14px;
  stroke:#8db9c5; fill:none;
  pointer-events:none;
}
#directoryScreen .search-field #searchInput {
  appearance:none;
  -webkit-appearance:none;
  min-width:0;
  width:100%;
  min-height:54px;
  padding:12px 43px 12px 45px;
  margin:0;
  border:0; outline:0;
  background:transparent;
  color:#f3fbff;
  font-size:16px;
  line-height:1.25;
}
#directoryScreen .search-field #searchInput:focus {
  outline:0; border:0;
}
#directoryScreen .atlas-search-input-wrap:focus-within {
  border-color:#58e7ac;
  box-shadow:0 0 0 2px rgba(69,240,169,.15);
}
#directoryScreen .search-field #searchInput::-webkit-search-cancel-button {
  -webkit-appearance:none;
}
#directoryScreen .search-clear {
  top:50%;
  transform:translateY(-50%);
  right:6px; margin:0;
  width:34px; height:34px; min-width:34px;
  border-radius:9px;
  color:#b6cfda;
}
#directoryScreen .search-results {
  max-height:none;
  overflow:visible;
  margin:0;
  padding:0 0 15px;
}
#directoryScreen .atlas-search-result {
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0;
  padding:14px 12px;
  text-align:left;
  color:#e6f3f9;
  border:0;
  border-bottom:1px solid rgba(92,135,148,.22);
  border-radius:0;
  background:transparent;
  cursor:pointer;
}
#directoryScreen .atlas-search-result:hover,
#directoryScreen .atlas-search-result:focus-visible {
  background:rgba(93,169,173,.12);
  outline:none;
  border-radius:10px;
}
#directoryScreen .atlas-search-result-text {
  min-width:0;
  display:flex;
  flex:1;
  flex-direction:column;
  gap:4px;
}
#directoryScreen .atlas-search-result-text strong {
  font-size:15px;
  font-weight:650;
  line-height:1.25;
  white-space:normal;
  overflow-wrap:anywhere;
}
#directoryScreen .atlas-search-result-text small {
  margin:0;
  color:#94b1bf;
  font-size:12px;
  line-height:1.25;
}
#directoryScreen .atlas-search-result-status {
  width:26px; height:26px; min-width:26px;
  display:grid; place-items:center;
  border-radius:50%;
  color:#92adbb;
  font-size:20px;
  font-weight:650;
}
#directoryScreen .atlas-search-result-status.is-visited { color:#6ce7a7; font-size:17px; }
#directoryScreen .atlas-search-result-status.is-wanted { color:#ffa5c5; font-size:17px; }
#directoryScreen .atlas-search-shortcuts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:0 0 12px;
}
#directoryScreen .atlas-search-shortcut {
  min-width:0; min-height:52px;
  display:flex; justify-content:center; align-items:center;
  gap:8px;
  margin:0;
  padding:8px 10px;
  border:1px solid #315969;
  border-radius:12px;
  background:#133644;
  color:#c6dce5;
  font-size:13px;
  font-weight:600;
}
#directoryScreen .atlas-search-shortcut > span:first-child {
  font-size:19px; line-height:1;
  color:#62e4a5;
}
#directoryScreen #atlasWantedListBtn > span:first-child { color:#ef9bbc; }
#directoryScreen .atlas-search-shortcut:hover,
#directoryScreen .atlas-search-shortcut.is-active {
  border-color:#5ea9a0;
  background:#22504e;
  color:#ecfff6;
}
#directoryScreen .atlas-search-saved-panel { padding:0 0 20px; }
#directoryScreen .atlas-search-saved-panel .catalog-section {
  margin:7px 0;
  border-color:#315768;
  border-radius:12px;
  overflow:hidden;
}
#directoryScreen .atlas-search-saved-panel .catalog-section summary {
  padding:13px 15px;
  background:#133443;
  color:#e3f2f6;
  font-size:13px;
}
#directoryScreen .atlas-search-saved-panel .catalog-item {
  min-height:42px;
  padding:11px 9px;
  color:#e3f1f8;
  font-size:13px;
}
#directoryScreen .atlas-search-saved-panel .catalog-item:hover {
  background:rgba(76,155,152,.13);
}
#directoryScreen .atlas-tools-pane[hidden] { display:none!important; }
@media (max-width:760px) {
  #directoryScreen.atlas-tools-sheet {
    inset:env(safe-area-inset-top,0px) 0 0 0;
    width:100vw;
    height:calc(100dvh - env(safe-area-inset-top,0px));
    max-height:none;
    padding:0 16px calc(20px + env(safe-area-inset-bottom,0px));
    border:0;
    border-radius:21px 21px 0 0;
  }
  #directoryScreen .atlas-tools-head {
    min-height:56px;
  }
  #directoryScreen .search-field.atlas-search-input-wrap {
    top:56px;
  }
  #directoryScreen .atlas-search-shortcut { font-size:12px; }
}
@media (max-width:370px) {
  #directoryScreen.atlas-tools-sheet { padding-inline:12px; }
  #directoryScreen .atlas-search-shortcuts { gap:7px; }
  #directoryScreen .atlas-search-shortcut { padding:8px 6px; font-size:11px; }
}


/* Precise alignment of the two familiar header icons, at every breakpoint.
   Override the historical Share order/padding from share.css. */
.topbar .atlas-header-actions > #shareAtlasBtn,
.topbar .atlas-header-actions > #atlasSettingsBtn {
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  justify-self:center;
  align-self:center;
  flex-shrink:0;
  padding:0;
  margin:0;
  line-height:0;
}
.topbar .atlas-header-actions > #shareAtlasBtn { order:0; }
.topbar .atlas-header-actions > #atlasSettingsBtn { order:1; }
.topbar .atlas-header-actions > #shareAtlasBtn > svg,
.topbar .atlas-header-actions > #atlasSettingsBtn > svg {
  display:block;
  flex:0 0 22px;
  width:22px;
  height:22px;
  margin:0;
  padding:0;
  pointer-events:none;
}

/* Restore the original two quick-status controls in each search result.
   A row stays clickable to edit the place; the two buttons are separate
   sibling controls, not nested buttons. */
#directoryScreen .atlas-search-result {
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:9px 6px;
}
#directoryScreen .atlas-search-result-text { min-width:0; flex:1 1 0; }
#directoryScreen .atlas-search-result-trigger {
  width:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  text-align:left;
  padding:5px 0;
  margin:0;
  color:#e6f3f9;
  background:transparent;
  border:0;
  border-radius:8px;
  cursor:pointer;
}
#directoryScreen .atlas-search-result-trigger:focus-visible {
  outline:2px solid #82f7bf;
  outline-offset:2px;
}
#directoryScreen .atlas-search-result-actions {
  flex:0 0 auto;
  display:flex;
  gap:5px;
  align-items:center;
}
#directoryScreen .atlas-search-result-actions .city-quick-button {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-width:62px;
  min-height:36px;
  padding:7px 8px;
  margin:0;
  border:1px solid #425967;
  border-radius:9px;
  background:#202e3b;
  color:#e8eef3;
  font-size:11px;
  line-height:1.2;
  white-space:nowrap;
}
#directoryScreen .atlas-search-result-actions .city-quick-button.is-active[data-status="visited"] {
  background:#22784d;
  border-color:#6bedaa;
  color:#fff;
}
#directoryScreen .atlas-search-result-actions .city-quick-button.is-active[data-status="wanted"] {
  background:#823956;
  border-color:#ff9ec4;
  color:#fff;
}
#directoryScreen .atlas-search-result-actions .city-quick-button:focus-visible {
  outline:2px solid #82f7bf;
  outline-offset:2px;
}
@media (max-width:370px) {
  #directoryScreen .atlas-search-result { gap:6px; }
  #directoryScreen .atlas-search-result-actions { gap:4px; }
  #directoryScreen .atlas-search-result-actions .city-quick-button {
    min-width:54px; min-height:34px; padding:6px 5px; font-size:10px;
  }
}

/* Atlas semantics: mint actions, pink wishlist, gold brand/collections,
   red visited city pins (existing map styles). */
:root {
  --atlas-brand-gold:#E6C08B;
  --atlas-action-mint:#62f5b4;
  --atlas-wishlist-pink:#f7a4d4;
  --atlas-visited-red:#c45f64;
}
.tickets-eyebrow {color:var(--atlas-brand-gold)!important}
#map .atlas-first-country-prompt {
  position:absolute;top:45%;left:50%;transform:translate(-50%,-50%);
  z-index:1100;min-height:48px;max-width:calc(100% - 36px);
  padding:13px 22px;border-radius:999px;border:1px solid #d2ac73;
  background:linear-gradient(120deg,#163747,#102b38);
  box-shadow:0 8px 30px #0009,0 0 0 5px #e6c08b12;
  font-size:clamp(14px,3.7vw,18px);font-weight:750;
  color:var(--atlas-brand-gold);cursor:pointer;text-align:center;
  white-space:normal;
}
#map .atlas-first-country-prompt:hover {background:#1b4655}
#map .atlas-first-country-prompt:focus-visible {outline:2px solid var(--atlas-action-mint);outline-offset:3px}
#map .atlas-first-country-prompt[hidden] {display:none!important}
.ticket-group[data-status="visited"] .ticket-group-count {
  color:var(--atlas-brand-gold);
  white-space:nowrap;
  font-weight:800;
}
/* Search status controls remain available for owner across mobile widths. */
body:not(.atlas-public-view) #directoryScreen .atlas-search-result-actions {
  display:flex!important;visibility:visible;opacity:1;
  flex:0 0 auto;align-items:center;gap:6px;min-width:0;
}
body:not(.atlas-public-view) #directoryScreen .atlas-search-result-actions .city-quick-button {
  display:inline-flex!important;align-items:center;justify-content:center;
  flex:0 0 auto;min-width:59px;min-height:38px;
  white-space:nowrap;opacity:1;visibility:visible;cursor:pointer;
}
@media (max-width:520px) {
  /* On phones preserve one row: title/type on the left, actions on the right. */
  #directoryScreen .atlas-search-result {
    flex-wrap:nowrap;
    align-items:center;
    column-gap:8px;
    row-gap:0;
  }
  #directoryScreen .atlas-search-result-text {
    flex:1 1 0;
    width:auto;
    min-width:0;
    padding:0;
  }
  body:not(.atlas-public-view) #directoryScreen .atlas-search-result-actions {
    flex:0 0 auto;
    width:auto;
    min-width:0;
    margin-left:auto;
    justify-content:flex-end;
    flex-wrap:nowrap;
    padding:0;
    gap:5px;
  }
  body:not(.atlas-public-view) #directoryScreen .atlas-search-result-actions .city-quick-button {
    min-width:59px;
    min-height:34px;
    padding:7px 7px;
    font-size:11px;
  }
}
@media (max-width:370px) {
  #directoryScreen .atlas-search-result {column-gap:5px;}
  body:not(.atlas-public-view) #directoryScreen .atlas-search-result-actions {gap:4px;}
  body:not(.atlas-public-view) #directoryScreen .atlas-search-result-actions .city-quick-button {
    min-width:52px;
    padding:6px 5px;
    font-size:10px;
  }
}

/* Search fallback for provincial towns not covered by Natural Earth. */
.atlas-custom-city-trigger {
  display:block;width:100%;padding:14px 16px;min-height:46px;
  border:1px dashed #bda074;border-radius:11px;background:#123545;
  color:#E6C08B;text-align:center;font-size:13px;font-weight:700;cursor:pointer;
}
.atlas-custom-city-backdrop {
  position:fixed;inset:0;z-index:99999;background:#03131ccc;
  display:flex;align-items:center;justify-content:center;padding:16px;
}
.atlas-custom-city-dialog {
  display:flex;flex-direction:column;gap:11px;
  width:min(100%,400px);max-height:calc(100dvh - 32px);overflow:auto;
  padding:20px 17px;background:#102c3a;color:#edf9f8;
  border:1px solid #a88860;border-radius:16px;box-shadow:0 18px 60px #000b;
}
.atlas-custom-city-dialog h2 {color:#E6C08B;margin:0 0 3px;font-size:19px}
.atlas-custom-city-dialog label {display:flex;flex-direction:column;gap:5px;font-size:12px;color:#c2dce1}
.atlas-custom-city-dialog input,.atlas-custom-city-dialog select {
  width:100%;box-sizing:border-box;border:1px solid #426877;border-radius:9px;
  padding:10px;background:#071e2b;color:#e8f7f6;font:inherit;font-size:14px;
}
.atlas-custom-city-dialog p {margin:2px 0;font-size:11px;line-height:1.45;color:#adc3cf}
.atlas-custom-city-actions {display:flex;gap:9px;justify-content:flex-end}
.atlas-custom-city-actions button {
  min-height:44px;padding:9px 13px;border-radius:9px;
  border:1px solid #547381;color:#f2fbf9;background:#284b59;font-weight:650;
}
.atlas-custom-city-actions button[type="submit"] {
  background:#62f5b4;border-color:#62f5b4;color:#07302b;
}

/* Only shown while the lazily fetched GeoNames catalog is loading. */
.atlas-extra-cities-status {
  padding:12px 14px;
  margin:6px 2px;
  color:#afcdd9;
  font-size:12px;
  text-align:center;
  border:1px solid #33566a;
  border-radius:10px;
  background:#102d3e;
}
#atlasSettingsPane .filter-note a {
  color:#e6c08b;
  text-decoration:underline;
  text-underline-offset:2px;
}

/* More worldwide towns: initial search stays fast, all hits can be paged.
   Online geocoding only runs after an explicit user click. */
#directoryScreen .atlas-search-more,
#directoryScreen .atlas-search-online {
  display:flex;align-items:center;justify-content:center;gap:8px;
  min-height:43px;width:100%;margin:9px 0 4px;padding:9px 12px;
  border:1px solid #416d76;border-radius:11px;
  background:#133d4a;color:#d9f6ef;font-size:12px;font-weight:750;
  text-align:center;cursor:pointer;line-height:1.4;
}
#directoryScreen .atlas-search-online {
  color:#e6c08b;background:#163545;border-color:#a58457;
}
#directoryScreen .atlas-search-online:disabled {
  opacity:.65;cursor:wait;
}
#directoryScreen .atlas-search-more:focus-visible,
#directoryScreen .atlas-search-online:focus-visible {
  outline:2px solid #7cf3bd;outline-offset:2px;
}
#directoryScreen .atlas-online-attribution {
  display:block;margin:5px 4px 10px;font-size:10px;
  color:#a6c0c8;line-height:1.4;
}
#directoryScreen .atlas-online-attribution a {
  color:#e6c08b;text-decoration:underline;text-underline-offset:2px;
}

#directoryScreen .atlas-online-place-credit {
  flex:0 0 auto;padding:2px 4px;
  font-size:10px;color:#e6c08b;text-decoration:underline;
  text-underline-offset:2px;white-space:nowrap;
}
#directoryScreen .atlas-online-place-credit:focus-visible {
  outline:2px solid #e6c08b;outline-offset:2px;
}
@media(max-width:520px){
  #directoryScreen .atlas-online-place-credit {
    margin-left:auto;margin-top:-4px;
  }
}

/* Price explorer: preserve the existing atlas brand; no extra map counters. */
.atlas-prices-screen[hidden],.atlas-public-view .atlas-prices-screen,.atlas-public-view #pricesTab{display:none!important}
body.show-prices{--atlas-topbar:72px}
body.show-prices .topbar{grid-template-rows:58px;padding-top:7px;padding-bottom:7px}
body.show-prices .atlas-stat-grid,body.show-prices .atlas-map-search-fab,body.show-prices .map-legend,body.show-prices .map-legend-collapsed{display:none!important}
.atlas-prices-screen{position:fixed;top:var(--atlas-topbar);bottom:var(--atlas-footer-height);left:0;right:0;z-index:1150;background:#061d2a;overflow:auto;overscroll-behavior:contain}
body:not(.atlas-public-view) .bottom-nav{gap:4px}
body:not(.atlas-public-view) .bottom-nav .nav-button{flex:1 1 0;min-width:0;max-width:170px;padding-left:2px;padding-right:2px}
@media(max-width:600px){body.show-prices{--atlas-topbar:calc(68px + env(safe-area-inset-top,0px))}body.show-prices .topbar{grid-template-rows:50px;padding-top:calc(7px + env(safe-area-inset-top,0px));padding-bottom:7px}.bottom-nav .nav-button{font-size:11px}}

/* Compact branding ONLY on the price explorer; keep the other screens unchanged. */
body.show-prices{--atlas-topbar:calc(46px + env(safe-area-inset-top,0px))}
body.show-prices .topbar{height:var(--atlas-topbar);min-height:var(--atlas-topbar);grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr) auto;gap:0 6px;padding:calc(4px + env(safe-area-inset-top,0px)) 10px 4px;border-radius:0}
body.show-prices .topbar .atlas-brand{gap:7px}
body.show-prices .topbar .atlas-logo{width:35px;height:31px}
body.show-prices .topbar .atlas-brand-text strong{font-size:17px}
body.show-prices .topbar .atlas-header-actions{gap:5px}
body.show-prices .topbar .atlas-header-actions > #shareAtlasBtn,body.show-prices .topbar .atlas-header-actions > #atlasSettingsBtn{width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border-radius:9px}
body.show-prices .topbar .atlas-header-actions > #shareAtlasBtn > svg,body.show-prices .topbar .atlas-header-actions > #atlasSettingsBtn > svg{width:18px;height:18px}
body.show-prices .atlas-prices-screen{overflow-y:auto;overflow-x:hidden}

/* Keep the former ticket view/assets available internally but remove its entry. */
#stampsTab{display:none!important}
