/* Map tools use map space; the catalogue and notebook keep their existing rails. */
.atlas-dock {
  position: fixed;
  z-index: 2;
  top: 12px;
  left: 372px;
  max-width: min(390px, calc(100vw - 452px));
  pointer-events: none;
  color: var(--ink);
}
.atlas-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: auto;
}
.atlas-tools button,
.atlas-reset {
  background: #fff;
  border: 1px solid var(--ink);
  color: var(--ink);
  min-height: 36px;
  padding: 4px 10px;
  font:
    500 var(--body) var(--font);
  cursor: pointer;
}
.atlas-state {
  display: table;
  margin: 4px 0 0;
  background: #fff;
  padding: 2px 6px;
  font:
    500 var(--small)/1.45 var(--font);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.atlas-reset {
  pointer-events: auto;
  font-size: var(--small);
  min-height: 32px;
  margin-top: 4px;
}
.atlas-modes {
  display: grid;
  gap: 4px;
  margin: 12px 0;
}
.atlas-modes button {
  display: block;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  padding: 8px 4px;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
}
.atlas-modes button[aria-pressed='true'] {
  border-left: 3px solid var(--ink);
  padding-left: 8px;
  background: var(--wash);
}
.atlas-modes b,
.atlas-modes small {
  display: block;
}
.atlas-modes small {
  font-size: var(--small);
  line-height: 1.45;
  margin-top: 2px;
  color: var(--ink-80);
}
.atlas-area {
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}
.atlas-area summary {
  min-height: 32px;
  cursor: pointer;
}
.atlas-area select {
  display: block;
  width: 100%;
  font: inherit;
  min-height: 44px;
  margin: 8px 0;
}
.atlas-places,
.atlas-key,
.atlas-triangles {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.atlas-places li,
.atlas-triangles li {
  border-top: 1px solid var(--rule);
}
.atlas-places button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  text-align: left;
  padding: 8px 0;
  border: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.atlas-places img {
  flex: none;
}
.atlas-places b {
  font-weight: 500;
}
.atlas-places small,
.atlas-triangles small {
  display: block;
  color: var(--ink-80);
  font-size: var(--small);
  line-height: 1.45;
}
.atlas-key li {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  line-height: 1.4;
}
.atlas-key img {
  flex: none;
}
.atlas-triangles button {
  width: 100%;
  text-align: left;
  min-height: 44px;
  padding: 10px 0;
  color: var(--ink);
  background: #fff;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.atlas-sheet p {
  line-height: 1.5;
}
.atlas-facts {
  border-top: 1px solid var(--rule);
  padding: 8px 0;
  font-size: var(--body);
}
.atlas-facts summary {
  min-height: 32px;
  cursor: pointer;
}
.atlas-facts p {
  font-size: var(--small);
  line-height: 1.5;
}
/* The rail's Find / Explore / Key own these actions at every width (one control per action, MSH).
   The dock keeps only an active view's status, its way out and "Show matches"; the proxies still press these hidden buttons. */
.atlas-tools [data-work-start], .atlas-tools [data-atlas-open], .atlas-tools [data-atlas-key] { display: none !important; }
.atlas-dock:not(:has(.atlas-reset:not([hidden]))) .atlas-state { display: none; }
@media (max-width: 899px) {
  .atlas-dock {
    left: 10px;
    top: 102px;
    max-width: calc(100vw - 76px);
  }
  .atlas-tools button {
    font-size: var(--body);
    padding: 4px 8px;
  }
  .atlas-state {
    font-size: var(--small);
    max-width: 230px;
  }
  .atlas-sheet {
    max-height: 58dvh;
  }
}
