.modal-overlay {
  position: fixed;
  inset: 0;

  display: none; /* ← важно */
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);

  z-index: 1000;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-content {
  width: min(92%, 640px);
  max-height: 90vh;
  overflow-y: auto;

  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;

  border: 1px solid var(--line);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-top h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 10px;
}

.icon-btn {
  align-self: flex-start; /* ← ключевое */
  
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  border: 1px solid var(--line);

  background: var(--panel);
  color: var(--text);

  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--accent);
}
