.atlas-page {
  padding-top: 28px;
  padding-bottom: 60px;
}
/* Wide embedded atlas: retain the portal header, navigation and footer. */
body.atlas-workspace {
  /* Inherit the portal's theme: charcoal, mint green and warm gold. */
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}
.atlas-workspace .atlas-title,
.atlas-workspace .breadcrumbs,
.atlas-workspace .atlas-note {
  display: none !important;
}
.atlas-workspace .atlas-page {
  position: relative;
  width: 100%;
  max-width: 1920px;
  padding: 12px 16px;
  margin: 0 auto;
}
.atlas-workspace .atlas-layout {
  position: relative;
  isolation: isolate;
  height: calc(100svh - var(--atlas-site-header, 100px) - 24px);
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 0;
}
.atlas-workspace .atlas-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-right: 1px solid var(--line);
  z-index: 1001;
  padding: 0 10px;
  scrollbar-width: thin;
}
.spawn-brand {
  display: block;
  color: var(--text);
  text-align: center;
  padding: 18px 0 15px;
  font:
    bold 21px Georgia,
    serif;
  letter-spacing: 1px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  margin: 0 -10px 12px;
}
.spawn-sticky-head {
  position: sticky;
  top: 0;
  z-index: 3;
  flex-shrink: 0;
  background: var(--bg);
  padding-bottom: 1px;
}
.spawn-results {
  flex-shrink: 0;
}
.spawn-loot {
  margin-top: 10px;
}
.spawn-loot summary {
  cursor: pointer;
  font-weight: 700;
}
.spawn-loot ul {
  max-height: 190px;
  overflow-y: auto;
  padding-left: 18px;
  margin: 8px 0 0;
  overscroll-behavior: contain;
}
.spawn-loot li {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.spawn-loot img {
  flex: 0 0 28px;
  object-fit: contain;
  image-rendering: pixelated;
}
#spawn-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px;
  margin: 8px 0 12px;
  font-size: 11px;
}
#spawn-details h3 {
  font: 600 13px system-ui;
  margin: 0 0 10px;
}
#spawn-details h4 {
  font: 600 12px system-ui;
  margin: 12px 0 6px;
}
#spawn-details summary {
  cursor: pointer;
  padding: 9px 0;
  color: var(--text);
}
#spawn-details .spawn-loot ul {
  list-style: none;
  padding: 0;
  max-height: 240px;
}
.spawn-coordinate-list {
  max-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.spawn-coordinate-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 5px;
  font: 11px monospace;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.spawn-coordinate-link:hover {
  background: color-mix(in srgb, var(--red) 16%, transparent);
}
.spawn-coordinates {
  white-space: nowrap;
  margin-top: 5px;
  font: 12px monospace;
}
.spawn-brand span {
  color: var(--red);
  margin-left: 4px;
}
.spawn-brand small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font:
    10px system-ui,
    sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.spawn-search-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 7px 2px;
}
#spawn-search {
  width: 100%;
  height: 42px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
}
.spawn-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  background: var(--panel);
  padding: 4px;
  border-radius: 8px;
  margin: 8px 0 12px;
}
.atlas-workspace button {
  cursor: pointer;
  color: var(--text);
}
.spawn-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 6px 3px;
  background: transparent;
  font-size: 11px;
}
.spawn-tabs button[aria-pressed="true"] {
  background: #196b57;
  color: white;
}
.spawn-tabs span {
  font-size: 9px;
  opacity: 0.8;
}
#spawn-feedback {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 3px 12px;
  line-height: 1.5;
}
.spawn-row {
  display: flex;
  align-items: center;
  border-radius: 7px;
  margin-bottom: 3px;
  border: 1px solid transparent;
}
.spawn-row:hover {
  background: var(--panel);
}
.spawn-row.is-active {
  background: color-mix(in srgb, var(--red) 15%, var(--panel));
  border-color: var(--red);
}
.spawn-monster {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 6px;
  font-size: 12px;
  line-height: 1.4;
}
.spawn-monster > span:last-child {
  overflow-wrap: anywhere;
}
.spawn-monogram {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  color: var(--gold);
  font:
    bold 16px Georgia,
    serif;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.spawn-monogram img {
  position: absolute;
  inset: 0;
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}
.spawn-map-sprite {
  image-rendering: pixelated;
  object-fit: contain;
}
.spawn-monster small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.spawn-star {
  border: 0;
  background: transparent;
  min-height: 40px;
  min-width: 32px;
  font-size: 21px;
  color: var(--gold) !important;
}
#spawn-selection {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--red);
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--red) 12%, var(--panel));
  margin: 10px 0;
}
#spawn-selection strong {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  display: block;
  font-size: 13px;
}
#spawn-selection .spawn-selection-clear {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  width: 40px;
  min-height: 40px;
  flex-shrink: 0;
}
#spawn-more,
#spawn-feedback button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 5px;
  padding: 8px;
  font-size: 11px;
}
#spawn-more {
  width: 100%;
  margin: 10px 0;
}
.spawn-sidebar-footer {
  margin-top: auto;
  padding: 16px 2px 12px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.spawn-sidebar-footer small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  margin: 8px 0 13px;
}
.spawn-sidebar-footer a {
  color: var(--red);
  font-size: 12px;
}
.atlas-workspace .atlas-stage {
  position: relative;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.atlas-workspace #atlas-map {
  height: 100%;
  width: 100%;
  max-height: none;
  min-height: 0;
}
.spawn-floorbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 92px);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 10px;
  z-index: 1000;
  box-shadow: 0 4px 18px #0003;
}
.spawn-floorbar > span {
  color: var(--muted);
  font-size: 9px;
}
#spawn-floors {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
#spawn-floors button {
  border: 0;
  border-radius: 6px;
  height: 30px;
  min-width: 29px;
  padding: 0 5px;
  background: var(--bg);
  color: var(--muted);
  font:
    11px system-ui,
    sans-serif;
  position: relative;
}
#spawn-floors button[aria-pressed="true"] {
  background: #196b57;
  color: #fff;
}
#spawn-floors button.has-spawns::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: calc(50% - 2px);
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
}
.atlas-workspace #atlas-map .leaflet-top.leaflet-right {
  top: 6px;
  right: 3px;
}
.atlas-workspace #atlas-map .leaflet-bar {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 4px 18px #0003;
}
.atlas-workspace #atlas-map .leaflet-bar a {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  width: 38px;
  height: 40px;
  line-height: 40px;
}
#spawn-home,
#spawn-menu {
  position: absolute;
  z-index: 1000;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 18px #0003;
}
#spawn-home {
  top: 107px;
  right: 13px;
  width: 40px;
  height: 40px;
  font-size: 25px;
}
#spawn-menu {
  display: none;
}
.atlas-workspace .atlas-footer {
  position: absolute;
  bottom: 20px;
  left: 12px;
  z-index: 999;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  display: grid;
  gap: 2px;
  max-width: calc(100% - 24px);
  font-size: 10px;
  pointer-events: none;
}
.atlas-workspace #atlas-status {
  font-size: 9px;
}
.spawn-credit {
  position: absolute;
  bottom: 26px;
  right: 13px;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  z-index: 999;
  padding: 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
}
.spawn-credit a {
  color: var(--red);
}
.atlas-workspace .atlas-toolbar {
  margin-bottom: 12px;
  padding: 8px 0;
}
.atlas-workspace #atlas-expand {
  display: none;
}
.atlas-workspace .atlas-panel {
  padding: 12px;
  margin-bottom: 10px;
}
.atlas-workspace .atlas-panel h2 {
  font-size: 19px;
}
.atlas-workspace [hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .atlas-workspace .atlas-page {
    padding: 8px;
  }
  .atlas-workspace .atlas-layout {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100svh - var(--atlas-site-header, 76px) - 16px);
    min-height: 380px;
  }
  .atlas-workspace .atlas-sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(300px, calc(100% - 62px));
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: 8px 0 24px #0005;
  }
  .atlas-workspace.spawn-sidebar-open .atlas-sidebar {
    transform: translateX(0);
  }
  .atlas-workspace:not(.spawn-sidebar-open) .atlas-sidebar {
    visibility: hidden;
  }
  #spawn-menu {
    display: block;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .spawn-sidebar-open #spawn-menu {
    left: min(312px, calc(100% - 50px));
  }
  .spawn-floorbar {
    left: 62px;
    max-width: calc(100% - 124px);
    padding: 7px;
  }
  .spawn-floorbar > span {
    display: none;
  }
  .spawn-credit {
    display: none;
  }
  .atlas-workspace .atlas-footer {
    bottom: 24px;
    font-size: 9px;
  }
}
.atlas-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 24px 0;
}
.atlas-title h1 {
  font:
    normal clamp(34px, 4vw, 52px) / 1.1 Georgia,
    serif;
  margin: 10px 0;
}
.atlas-title p:not(.eyebrow) {
  color: var(--muted);
  max-width: 660px;
}
.atlas-badge {
  font-size: 11px;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 30px;
  white-space: nowrap;
}
.atlas-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.atlas-sidebar {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.atlas-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.atlas-panel h2 {
  font:
    normal 22px Georgia,
    serif;
  margin: 0 0 14px;
}
.atlas-panel label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.atlas-panel input,
.atlas-panel select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  min-height: 42px;
}
.atlas-panel select {
  margin-bottom: 12px;
}
.atlas-panel button,
.atlas-toolbar button,
.atlas-toolbar select {
  min-height: 42px;
  border-radius: 7px;
  font-size: 12px;
  padding: 8px 12px;
}
.atlas-panel .primary {
  width: 100%;
  margin-top: 10px;
  justify-content: center;
}
.atlas-coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.atlas-panel p,
.atlas-panel summary {
  font-size: 12px;
  color: var(--muted);
}
.atlas-panel summary {
  cursor: pointer;
  margin-top: 12px;
}
.atlas-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.atlas-toolbar {
  padding: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.atlas-toolbar label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.atlas-toolbar select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  width: 130px;
}
.atlas-toolbar button {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
}
.atlas-toolbar button[aria-pressed="true"] {
  border-color: var(--red);
  color: var(--gold);
}
#atlas-map {
  height: 620px;
  height: clamp(420px, 67vh, 760px);
  background: #000;
  isolation: isolate;
  z-index: 0;
  touch-action: none;
}
#atlas-map[data-floor="7"] {
  background: #336699;
}
/* Disable double-tap page zoom on controls, not accessible page pinch zoom. */
.atlas-page button,
.atlas-page select,
#atlas-map .leaflet-bar a {
  touch-action: manipulation;
}
.atlas-page button,
#atlas-map .leaflet-bar a {
  -webkit-user-select: none;
  user-select: none;
}
/* iOS otherwise zooms the whole page when focusing a small-font input. */
@media (hover: none) and (pointer: coarse) {
  .atlas-panel input,
  .atlas-panel select,
  .atlas-toolbar select {
    font-size: 16px;
  }
}
#atlas-map .leaflet-tile {
  image-rendering: pixelated;
}
#atlas-map .atlas-raster {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
}
#atlas-map .leaflet-control-attribution {
  font-size: 10px;
  background: #111d;
  color: #ddd;
}
#atlas-map .leaflet-control-attribution a {
  color: #9bd5bf;
}
#atlas-map .leaflet-bar a {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
  width: 38px;
  height: 38px;
  line-height: 38px;
}
#atlas-map .leaflet-popup-content-wrapper,
#atlas-map .leaflet-popup-tip {
  background: var(--panel);
  color: var(--text);
}
#atlas-map .leaflet-popup-content {
  line-height: 1.6;
  max-width: 240px;
  overflow-wrap: anywhere;
}
#atlas-map .leaflet-popup-close-button {
  min-width: 34px;
  min-height: 34px;
  color: var(--text);
  font-size: 24px;
}
#atlas-map .leaflet-popup-content {
  margin-right: 32px;
}
.atlas-footer {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font: 11px/1.6 monospace;
  color: var(--muted);
}
#atlas-status[data-error="true"] {
  color: #efb36d;
}
.atlas-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 18px;
}
.atlas-note a {
  color: var(--red);
}
.atlas-results {
  display: grid;
  gap: 5px;
  margin-top: 7px;
  max-height: 230px;
  overflow: auto;
}
.atlas-results:empty {
  display: none;
}
.atlas-results button {
  text-align: left;
  font-size: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.atlas-pin-list {
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}
.atlas-pin-list li {
  display: flex;
  gap: 5px;
  align-items: center;
}
.atlas-pin-list button {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 6px;
  color: var(--text);
}
.atlas-pin-list .atlas-pin-go {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.atlas-pin-list small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.atlas-pin-list .atlas-pin-delete {
  flex: 0 0 36px;
  font-size: 18px;
}
.atlas-tibia-marker {
  image-rendering: pixelated;
  background: transparent;
  border: none;
  border-radius: 0;
}
.atlas-tibia-marker.own {
  filter: drop-shadow(0 0 2px #e8cc80);
}
.atlas-stage.atlas-expanded {
  position: fixed;
  inset: 10px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 20px #000b;
}
.atlas-expanded #atlas-map {
  flex: 1;
  height: auto;
  min-height: 0;
}
.atlas-stage button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.atlas-check {
  display: flex !important;
  gap: 8px;
  align-items: center;
  margin-top: 10px !important;
}
.atlas-check input {
  width: 18px;
  min-height: 18px;
}
.atlas-share {
  margin-top: 10px;
  display: none;
}
.atlas-share[data-open="true"] {
  display: block;
}
.atlas-share input {
  font-size: 11px;
}
.atlas-hint {
  min-height: 20px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .atlas-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .atlas-panel {
    padding: 14px;
  }
  .atlas-toolbar select {
    width: 110px;
  }
}
@media (max-width: 680px) {
  .atlas-title {
    margin-top: 18px;
    align-items: start;
  }
  .atlas-badge {
    display: none;
  }
  .atlas-layout {
    display: flex;
    flex-direction: column;
  }
  .atlas-stage {
    order: 0;
    width: 100%;
  }
  .atlas-sidebar {
    order: 1;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .atlas-sidebar > .atlas-panel:last-child {
    grid-column: 1/-1;
  }
  #atlas-map {
    height: 58vh;
    min-height: 360px;
    max-height: 620px;
  }
  .atlas-toolbar {
    gap: 6px;
  }
  .atlas-toolbar button {
    padding: 8px 10px;
  }
  .atlas-page {
    padding-top: 18px;
  }
  .atlas-title h1 {
    font-size: 36px;
  }
  .atlas-stage.atlas-expanded {
    inset: 0;
    border-radius: 0;
  }
  .atlas-title p:not(.eyebrow) {
    font-size: 13px;
  }
}
@media (max-width: 420px) {
  .atlas-sidebar {
    grid-template-columns: 1fr;
  }
  .atlas-sidebar > .atlas-panel:last-child {
    grid-column: auto;
  }
  .atlas-toolbar label {
    width: 100%;
  }
  .atlas-toolbar select {
    flex: 1;
  }
  .atlas-toolbar button {
    flex: 1;
  }
  .atlas-footer {
    font-size: 10px;
  }
}
