dialog {
  color: var(--ink);
  background: var(--abyss);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  max-width: min(620px, calc(100vw - 48px));
  padding: 24px;
  max-height: 80dvh;
  overflow-y: auto;
}
dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-family: var(--display);
  font-size: 30px;
  margin: 0 0 12px;
}
dialog p {
  color: var(--ink-dim);
}
dialog .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
dialog button,
dialog input {
  border: 1px solid var(--panel-line);
  background: var(--panel);
  border-radius: 6px;
  padding: 8px 12px;
}
dialog input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
}
dialog .close-dialog {
  float: right;
}
#savedViews {
  padding: 0;
  list-style: none;
}
#savedViews li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0;
}
#savedViews li button:first-child {
  text-align: left;
  flex: 1;
  overflow-wrap: anywhere;
}
.service-line {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  font: 10px/1.4 var(--mono);
  color: var(--ink-dim);
}
#serviceStatus {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 5px;
  padding: 4px 7px;
}
#serviceStatus[data-state='notice'] {
  color: var(--port);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#searchStatus {
  position: absolute;
  top: 100%;
  right: 0;
  padding: 8px;
  margin-top: 6px;
  background: var(--panel);
  border-radius: 5px;
  max-width: 30ch;
}
#searchStatus:empty {
  display: none;
}
#about {
  max-width: min(1000px, calc(100vw - 48px));
  width: 900px;
}
#about .table-scroll {
  overflow-x: auto;
}
#sourceCatalog td {
  vertical-align: top;
}
#map:focus-visible {
  outline-offset: -4px;
}
.profile-note {
  color: var(--port);
  font-size: 12px;
}

#mast {
  z-index: 7;
}
#feed {
  box-sizing: border-box;
}
#detail {
  box-sizing: border-box;
  max-height: calc(100dvh - 112px - var(--radar-feed-height, 132px) - 40px);
}
#layers {
  max-height: calc(100dvh - var(--mast-height, 100px) - 28px);
  overflow-y: auto;
}
@media (max-width: 760px) {
  #mast {
    gap: 8px;
  }
  .brand h1 {
    font-size: 25px;
  }
  .brand p {
    display: none;
  }
  #profileStatus {
    max-width: 28ch;
  }
  .tools {
    gap: 5px;
  }
  .tools button {
    min-height: 36px;
  }
  #search {
    width: min(210px, 45vw);
  }
  #feed {
    max-height: 32dvh;
    overflow: auto;
  }
  #feedText {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3em;
  }
  #detail,
  #layers {
    bottom: calc(env(safe-area-inset-bottom, 0px) + var(--radar-feed-height, 132px) + 28px);
    max-height: max(100px, calc(100dvh - var(--mast-height, 184px) - var(--radar-feed-height, 132px) - 50px));
  }
  #layers {
    box-sizing: border-box;
    z-index: 6;
  }
}
