.admin-ground-map-setup {
  display: grid;
  gap: 14px;
}

.admin-ground-map-setup .admin-ground-authoring-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.admin-ground-map-provider {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(88, 173, 192, 0.34);
  border-radius: 4px;
  background: #12262e;
  color: #a9dfeb;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.admin-ground-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(89, 111, 128, 0.28);
  background: #080c0f;
}

.admin-ground-map-canvas-shell {
  position: relative;
  min-width: 0;
  border-right: 1px solid rgba(89, 111, 128, 0.24);
}

.admin-ground-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 600px;
  background: #070b0d;
}

.admin-ground-map-canvas.is-drawing-area,
.admin-ground-map-canvas.is-drawing-area .leaflet-container {
  cursor: crosshair;
}

.admin-ground-map-canvas .leaflet-tile {
  image-rendering: pixelated;
}

.admin-ground-map-canvas .tibia-map-tile.is-missing {
  visibility: hidden;
}

.admin-ground-map-canvas .leaflet-control-zoom,
.admin-ground-map-canvas .leaflet-control-attribution,
.admin-ground-map-canvas .tibia-map-floor-control {
  border: 1px solid rgba(112, 142, 164, 0.38);
  border-radius: 4px;
  box-shadow: none;
}

.admin-ground-map-canvas .leaflet-control-zoom a {
  border-color: rgba(112, 142, 164, 0.24);
  background: #111a20;
  color: #edf4f7;
}

.admin-ground-map-canvas .leaflet-control-attribution {
  background: rgba(7, 11, 13, 0.9);
  color: #8da0ac;
  font-size: 10px;
}

.admin-ground-map-canvas .leaflet-control-attribution a {
  color: #8fd1dc;
}

.tibia-map-floor-control {
  display: grid;
  grid-template-columns: 32px;
  grid-template-rows: 30px 22px 30px;
  width: 34px;
  max-width: 34px;
  overflow: hidden;
  background: #111a20;
}

.tibia-map-floor-button {
  display: grid;
  width: 32px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #edf4f7;
  font-size: 0;
  cursor: pointer;
}

.tibia-map-floor-button::before {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 1px 1px 0 0;
  content: "";
}

.tibia-map-floor-button:first-child::before {
  transform: translateY(2px) rotate(-45deg);
}

.tibia-map-floor-button:last-child::before {
  transform: translateY(-2px) rotate(135deg);
}

.tibia-map-floor-button:hover,
.tibia-map-floor-button:focus-visible {
  background: #21313b;
  outline: none;
}

.tibia-map-floor-button:disabled {
  color: #52636f;
  cursor: default;
}

.tibia-map-floor-label {
  display: grid;
  width: 32px;
  min-width: 0;
  height: 22px;
  min-height: 0;
  place-items: center;
  padding: 0;
  border-block: 1px solid rgba(112, 142, 164, 0.24);
  background: #0b1115;
  color: #9eb1bc;
  font: 700 10px/1 "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.admin-ground-map-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  background: #11181d;
}

.admin-ground-map-capture-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.admin-ground-map-capture-actions .btn,
.admin-ground-map-controls > .btn {
  min-width: 0;
  padding-inline: 8px;
  white-space: normal;
}

.admin-ground-map-capture-actions .btn.is-active {
  border-color: #e6b454;
  background: #4a3514;
  color: #ffe3a3;
}

.admin-ground-map-selection-summary {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(89, 111, 128, 0.24);
  background: #0a1014;
}

.admin-ground-map-selection-summary strong {
  color: #edf4f7;
}

.admin-ground-map-selection-summary span {
  color: #8fa2ae;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.admin-ground-map-save-area {
  margin-top: 0;
}

.admin-ground-map-setup-status {
  min-height: 0;
  margin: 0;
}

.admin-ground-map-setup-status:empty {
  display: none;
}

.admin-ground-map-setup-status.is-error {
  color: #ffaaa1;
}

.admin-ground-map-setup-status.is-success {
  color: #9edbb7;
}

.admin-ground-map-captures {
  display: grid;
  gap: 9px;
}

.admin-ground-map-capture-list {
  display: grid;
  border-top: 1px solid rgba(89, 111, 128, 0.18);
}

.admin-ground-map-capture-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(89, 111, 128, 0.18);
}

.admin-ground-map-capture-row.is-selected {
  box-shadow: inset 3px 0 0 #e6b454;
  padding-left: 10px;
}

.admin-ground-map-capture-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-ground-map-capture-copy strong {
  color: #edf4f7;
}

.admin-ground-map-capture-copy span {
  color: #8296a4;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.admin-ground-map-capture-row-actions {
  display: flex;
  gap: 7px;
}

.admin-ground-map-capture-row-actions .btn {
  min-width: 0;
  padding: 7px 10px;
}

@media (max-width: 1180px) {
  .admin-ground-map-layout {
    grid-template-columns: 1fr;
  }

  .admin-ground-map-canvas-shell {
    border-right: 0;
    border-bottom: 1px solid rgba(89, 111, 128, 0.24);
  }

  .admin-ground-map-canvas {
    min-height: 520px;
  }

  .admin-ground-map-capture-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .admin-ground-map-canvas {
    min-height: 390px;
  }

  .admin-ground-map-capture-actions,
  .admin-ground-map-capture-row {
    grid-template-columns: 1fr;
  }

  .admin-ground-map-capture-row-actions {
    justify-content: stretch;
  }

  .admin-ground-map-capture-row-actions .btn {
    flex: 1;
  }
}
.admin-ground-workspace.is-map-editing .admin-ground-map-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
  min-height: clamp(720px, 74vh, 920px);
}

.admin-ground-workspace.is-map-editing .admin-ground-map-canvas {
  min-height: clamp(720px, 74vh, 920px);
}

@media (max-width: 1180px) {
  .admin-ground-workspace.is-map-editing .admin-ground-map-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .admin-ground-workspace.is-map-editing .admin-ground-map-canvas {
    min-height: clamp(560px, 68vh, 760px);
  }
}

@media (max-width: 680px) {
  .admin-ground-workspace.is-map-editing .admin-ground-map-canvas {
    min-height: 460px;
  }

  .tibia-map-floor-control {
    grid-template-columns: 32px;
    grid-template-rows: 30px 22px 30px;
  }

  .tibia-map-floor-button {
    width: 32px;
    height: 30px;
  }

  .tibia-map-floor-label {
    min-width: 0;
    min-height: 0;
  }
}
.admin-ground-mask-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(89, 111, 128, 0.28);
  background: #0b1115;
}

.admin-ground-mask-editor[hidden] {
  display: none;
}

.admin-ground-mask-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.admin-ground-mask-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-ground-mask-toolbar .btn {
  min-width: 82px;
  padding: 8px 12px;
}

.admin-ground-mask-toolbar .btn.is-active {
  border-color: #e6b454;
  background: #4a3514;
  color: #ffe3a3;
}

.admin-ground-mask-brush {
  display: grid;
  grid-template-columns: auto minmax(120px, 220px) 48px;
  gap: 9px;
  align-items: center;
  margin-left: auto;
  color: #a9b8c1;
  font-size: 0.78rem;
}

.admin-ground-mask-brush input {
  width: 100%;
  accent-color: #d7a84a;
}

.admin-ground-mask-brush output {
  color: #edf4f7;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.admin-ground-mask-viewport {
  position: relative;
  display: grid;
  min-height: 420px;
  max-height: 680px;
  place-items: center;
  overflow: auto;
  border: 1px solid rgba(112, 142, 164, 0.3);
  background: #000;
}

.admin-ground-mask-canvas {
  display: block;
  width: min(100%, 1100px);
  height: auto;
  max-height: 640px;
  object-fit: contain;
  object-position: center;
  image-rendering: pixelated;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.admin-ground-mask-canvas.is-loading {
  opacity: 0.25;
}

.admin-ground-mask-canvas.is-painting {
  cursor: none;
}

.admin-ground-mask-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 8, 10, 0.74);
  color: #b9c8d0;
  text-align: center;
}

.admin-ground-mask-loading[hidden] {
  display: none;
}

.admin-ground-mask-status {
  min-height: 20px;
  margin: 0;
}

.admin-ground-mask-status.is-error {
  color: #ffaaa1;
}

.admin-ground-mask-status.is-success {
  color: #9edbb7;
}

@media (max-width: 680px) {
  .admin-ground-mask-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-ground-mask-brush {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(80px, 1fr) 44px;
    margin-left: 0;
  }

  .admin-ground-mask-viewport {
    min-height: 320px;
  }
}