.app-confirm {
  inset: 0;
  width: min(26rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  overflow: visible;
}

.app-confirm::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.app-confirm__panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 0.875rem;
  box-shadow: var(--card-shadow);
}

.app-confirm__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-confirm__message {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.app-confirm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.app-confirm__button {
  min-width: 6rem;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: filter 0.15s ease, background 0.15s ease;
}

.app-confirm__button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-confirm__button--cancel {
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--border);
}

.app-confirm__button--cancel:hover {
  background: var(--border-soft);
}

.app-confirm__button--confirm {
  color: var(--on-accent);
  background: var(--accent);
  border: 1.5px solid var(--accent);
}

.app-confirm__button--confirm:hover {
  filter: brightness(1.08);
}

.app-confirm--danger .app-confirm__button--confirm {
  color: var(--on-danger, #ffffff);
  background: var(--danger);
  border-color: var(--danger);
}

.app-confirm[hidden] {
  display: none;
}

@media (max-width: 30rem) {
  .app-confirm__actions {
    flex-direction: column-reverse;
  }

  .app-confirm__button {
    width: 100%;
  }
}
